Energy Unit Resourceยถ
Get Energy Unitยถ
HTTP Request
GET /api/energyUnit/{id}
๐ Description: Retrieves detailed information about a specific energy unit identified by the provided ID, enabling users to access critical data for energy management and reporting.
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
id |
path |
integer(int64) |
true |
Unique identifier for the resource |
Responses
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
OK |
Example Responses
1{
2 "id": 0,
3 "createdBy": "string",
4 "createdAt": "2019-08-24T14:15:22Z",
5 "displayId": "string",
6 "name": "string",
7 "objectAvailable": true
8}
Update Energy Unitยถ
HTTP Request
PUT /api/energyUnit/{id}
๐ Description: Updates the details of a specific energy unit identified by its unique ID, allowing for modifications to its attributes to ensure accurate energy management and reporting.
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
id |
path |
integer(int64) |
true |
Unique identifier for the resource |
body |
body |
true |
Request body containing the updated energy unit details, including attributes such as name, measurement type, and conversion factors, to ensure accurate energy management. |
Body Parameters
1{
2 "id": 0,
3 "createdBy": "string",
4 "createdAt": "2019-08-24T14:15:22Z",
5 "displayId": "string",
6 "name": "string",
7 "objectAvailable": true
8}
Responses
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
OK |
Inline |
Example Responses
1{}
Response Schema
Delete Energy Unitยถ
HTTP Request
DELETE /api/energyUnit/{id}
๐ Description: Deletes a specified energy unit from the system, ensuring that outdated or unnecessary entries are removed to maintain data integrity and operational efficiency.
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
id |
path |
integer(int64) |
true |
Unique identifier for the resource |
Responses
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
204 |
No Content |
None |
Get All Energy Unitยถ
HTTP Request
GET /api/energyUnit
๐ Description: Retrieves a list of available energy units, providing essential information for energy management and optimization within your business operations.
Responses
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
OK |
Inline |
Example Responses
1[
2 {
3 "id": 0,
4 "createdBy": "string",
5 "createdAt": "2019-08-24T14:15:22Z",
6 "displayId": "string",
7 "name": "string",
8 "objectAvailable": true
9 }
10]
Response Schema
Status Code 200
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
anonymous |
false |
none |
[Data transfer object representing an energy unit, encapsulating key attributes such as measurement type and value, essential for energy consumption analysis and reporting within enterprise resource management.] |
|
ยป id |
integer(int64) |
false |
none |
Unique identifier for the resource |
ยป createdBy |
string |
false |
none |
Username of who created this resource |
ยป createdAt |
string(date-time) |
false |
none |
Timestamp when this resource was created |
ยป displayId |
string |
false |
none |
Unique identifier for the display |
ยป name |
string |
true |
none |
Name of the resource |
ยป objectAvailable |
boolean |
false |
none |
Indicates whether the energy unit is currently available for allocation or use within the system. |
Create Energy Unitยถ
HTTP Request
POST /api/energyUnit
๐ Description: Creates a new energy unit entry in the system, allowing businesses to effectively manage and track energy consumption metrics.
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
body |
body |
true |
Request body containing the energy unit details, including measurement type, value, and associated metadata for effective energy management. |
Body Parameters
1{
2 "id": 0,
3 "createdBy": "string",
4 "createdAt": "2019-08-24T14:15:22Z",
5 "displayId": "string",
6 "name": "string",
7 "objectAvailable": true
8}
Responses
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
201 |
Created |
Inline |
Example Responses
1{}