Skip to content

Commit 79b68be

Browse files
[ILX-48044] Emission Calculation endpoint in API document (#23)
* Updated for EmissionCalculation endpoints. * Removed attribute name from the emission calculation request body and made changes in the doument as per Katy. --------- Co-authored-by: Sharath Upadhyaya <sharath.upadhyaya@intelex.com>
1 parent e5e6286 commit 79b68be

File tree

1 file changed

+33
-30
lines changed

1 file changed

+33
-30
lines changed

source/includes/acts/post_api.md

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
## Add or Modify Database Table
22

3-
This section outlines the available POST APIs designed for modifying ACTS data. These APIs offer options for updating existing records and inserting new ones.
3+
This section outlines the available POST APIs designed for modifying ACTS data. These APIs let you update existing records and insert new records. POSTs should be formatted in JSON.
44

55
* To insert new records, set the primary key to 0
6-
* To updates to existing records, use the primary key of the record.
6+
* To update existing records, use the primary key of the record.
77

88
<aside class="notice">
99
For efficient handling of larger data inserts, it is recommended to perform batch POSTs containing up to 500 rows each.
1010

1111
Note that excessively large batch POSTs may encounter throttling or failure, depending on system resources.
1212
</aside>
1313

14-
In the following release, the POST APIs End points are provided to add or update following table
14+
In the following release, the POST APIs End points are provided to add or update following:
1515

1616
* Equipment
17+
* Equipment Emissions Recalculate
1718
* Equipment Attribute
1819
* Facility
1920
* Facility Attribute
2021
* Operation
22+
* Operation Emissions Recalculate
2123
* Workflow
2224
* Workflow Answer
2325
* Workflow Equipment
@@ -139,9 +141,11 @@ IRestResponse response = client.Execute(request);
139141
}
140142

141143
```
142-
**Equipment/EmissionCalculation POST endpoint**
144+
### 2. Equipment Emissions Recalculate
145+
146+
This section guides you through the process of an on-demand update to the emissions calculation for a specific equipment using the designated API endpoint. While this API endpoint is a child of the Equipment table, adding or updating an equipment will not cause an update on its own.
143147

144-
Emission Calculation using equipment ids can be triggered using below operation.
148+
**Equipment/EmissionCalculation POST endpoint**
145149

146150
`POST` api/v1/equipment/emissioncalculation
147151

@@ -154,7 +158,7 @@ var options = { method: 'POST',
154158
url: 'https://[tenant].actsapi.intelex.com/v1/equipment/emissioncalculation',
155159
headers: { 'content-type': 'application/json' },
156160
body:
157-
{ [EquipmentId: 'number']
161+
{ [EquipmentId1, EquipmentId2, EquipmentId3....]
158162
},
159163
json: true };
160164

@@ -169,18 +173,16 @@ request(options, function (error, response, body) {
169173
var client = new RestClient("https://[tenant].actsapi.intelex.com/v1/equipment/emissioncalculation");
170174
var request = new RestRequest(Method.POST);
171175
request.AddHeader("content-type", "application/json");
172-
request.AddParameter("application/json", "{\r\n \"EquipmentId\": \"number\",\r\n}", ParameterType.RequestBody);
176+
request.AddParameter("application/json", "{\r\n [EquipmentId1, EquipmentId2, EquipmentId3....]\r\n}", ParameterType.RequestBody);
173177
IRestResponse response = client.Execute(request);
174178
```
175179

176180
> Input JSON Body
177181
178182
```json
179-
[
180-
{
181-
"EquipmentId": "number"
182-
}
183-
]
183+
{
184+
[EquipmentId1, EquipmentId2, EquipmentId3....]
185+
}
184186
```
185187
> Example Response
186188
@@ -211,7 +213,8 @@ IRestResponse response = client.Execute(request);
211213

212214
```
213215

214-
### 2. Equipment Attribute Table
216+
217+
### 3. Equipment Attribute Table
215218

216219
This section outlines the process of adding new entries or modifying existing records within the Equipment Attribute table using the dedicated API endpoint.
217220

@@ -298,7 +301,7 @@ IRestResponse response = client.Execute(request);
298301

299302
```
300303

301-
### 3. Facility Table
304+
### 4. Facility Table
302305

303306
This section outlines the process of adding new entries or modifying existing records within the Facility table using the dedicated API endpoint.
304307

@@ -402,7 +405,7 @@ IRestResponse response = client.Execute(request);
402405

403406
```
404407

405-
### 4. Facility Attribute Table
408+
### 5. Facility Attribute Table
406409

407410
This section outlines the process of adding new entries or modifying existing records within the Facility Attribute table using the dedicated API endpoint.
408411

@@ -489,7 +492,7 @@ IRestResponse response = client.Execute(request);
489492

490493
```
491494

492-
### 5. Operation Table
495+
### 6. Operation Table
493496

494497
This section outlines the process of adding new entries or modifying existing records within the Operation table using the dedicated API endpoint.
495498

@@ -600,9 +603,11 @@ IRestResponse response = client.Execute(request);
600603

601604
```
602605

603-
**Operation/EmissionCalculation POST endpoint**
606+
### 7. Operation Emissions Recalculate
607+
608+
This section guides you through the process of an on-demand update to the emissions calculation for a specific operation using the designated API endpoint. While this API endpoint is a child of the Operation table, adding or updating an operation with the API will not cause an update on its own.
604609

605-
Emission Calculation using Operation ids can be triggered using below operation.
610+
**Operation/EmissionCalculation POST endpoint**
606611

607612
`POST` api/v1/operation/emissioncalculation
608613

@@ -615,7 +620,7 @@ var options = { method: 'POST',
615620
url: 'https://[tenant].actsapi.intelex.com/v1/operation/emissioncalculation',
616621
headers: { 'content-type': 'application/json' },
617622
body:
618-
{ [OperationId: 'number']
623+
{ [OperationId1, OperationId2, OperationId3....]
619624
},
620625
json: true };
621626

@@ -630,18 +635,16 @@ request(options, function (error, response, body) {
630635
var client = new RestClient("https://[tenant].actsapi.intelex.com/v1/operation/emissioncalculation");
631636
var request = new RestRequest(Method.POST);
632637
request.AddHeader("content-type", "application/json");
633-
request.AddParameter("application/json", "{\r\n \"OperationId\": \"number\",\r\n}", ParameterType.RequestBody);
638+
request.AddParameter("application/json", "{\r\n [OperationId1, OperationId2, OperationId3....]\r\n}", ParameterType.RequestBody);
634639
IRestResponse response = client.Execute(request);
635640
```
636641

637642
> Input JSON Body
638643
639644
```json
640-
[
641-
{
642-
"OperationId": "number"
643-
}
644-
]
645+
{
646+
[OperationId1, OperationId2, OperationId3....]
647+
}
645648
```
646649
> Example Response
647650
@@ -672,7 +675,7 @@ IRestResponse response = client.Execute(request);
672675

673676
```
674677

675-
### 6. Workflow Table
678+
### 8. Workflow Table
676679

677680
This section outlines the process of adding new entries or modifying existing records within the Workflow table using the dedicated API endpoint.
678681

@@ -756,7 +759,7 @@ IRestResponse response = client.Execute(request);
756759
}
757760

758761
```
759-
### 7. Workflow Answer Table
762+
### 9. Workflow Answer Table
760763
761764
This section outlines the process of adding new entries or modifying existing records within the Workflow Answer table using the dedicated API endpoint.
762765
@@ -852,7 +855,7 @@ IRestResponse response = client.Execute(request);
852855
}
853856

854857
```
855-
### 8. Workflow Equipment Table
858+
### 10. Workflow Equipment Table
856859
857860
This section outlines the process of adding new entries or modifying existing records within the Workflow Equipment table using the dedicated API endpoint.
858861
@@ -936,7 +939,7 @@ IRestResponse response = client.Execute(request);
936939
}
937940

938941
```
939-
### 9. Workflow Facility Table
942+
### 11. Workflow Facility Table
940943
941944
This section outlines the process of adding new entries or modifying existing records within the Workflow Facility table using the dedicated API endpoint.
942945
@@ -1021,7 +1024,7 @@ IRestResponse response = client.Execute(request);
10211024
}
10221025

10231026
```
1024-
### 10. Workflow Person Table
1027+
### 12. Workflow Person Table
10251028
10261029
This section outlines the process of adding new entries or modifying existing records within the Workflow Person table using the dedicated API endpoint.
10271030

0 commit comments

Comments
 (0)