Skip to content

Commit 2e5d30e

Browse files
[ILX 48044] modified endpoint response in the document to align with the API response by removing underscores in the response (#25)
* Updated for EmissionCalculation endpoints. * Removed attribute name from the emission calculation request body and made changes in the doument as per Katy. * Added Emission factor end point for GET,POST,DELETE and QueryResults ned point for GET * modified reference.md to inlcude all the GET and POST endpoint reference * modified endpoint response to make it align with the API response by removing underscores in the response * set camelCase for request parameter for emission calculation --------- Co-authored-by: Sharath Upadhyaya <sharath.upadhyaya@intelex.com>
1 parent c3a2b02 commit 2e5d30e

File tree

4 files changed

+252
-245
lines changed

4 files changed

+252
-245
lines changed

source/includes/acts/delete_api.md

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -88,26 +88,8 @@ var options = { method: 'DELETE',
8888
url: 'https://[tenant].actsapi.intelex.com/v1/operation',
8989
headers: { 'content-type': 'application/json' },
9090
body:
91-
{ operationId: 'number',
92-
equipmentId: 'number',
93-
emissionTypeId: 'number',
94-
emissionCategoryId: 'number',
95-
operationTypeId: 'number',
96-
activeDate: '2023-06-25T04:00:00Z',
97-
unitId: 'number',
98-
controlledInd: 'string',
99-
estimatedInd: 'string',
100-
invalidInd: 'string',
101-
calculateEmissionsInd: 'string',
102-
collectionDate: '2023-06-25T04:00:00Z',
103-
fieldEventId: 'number',
104-
inactiveDate: "2023-06-25T04:00:00Z",
105-
dataLockTypeId: 'number',
106-
lastModifiedDate: "2023-06-25T04:00:00Z",
107-
externalIdentifier: 'string',
108-
comments: 'string',
109-
badDataFlag: 'number(1,0)',
110-
operationAmount: 'number' },
91+
{ [operationId1, operationId2, operationId3....]
92+
},
11193
json: true };
11294

11395
request(options, function (error, response, body) {
@@ -122,7 +104,28 @@ request(options, function (error, response, body) {
122104
var client = new RestClient("https://[tenant].actsapi.intelex.com/v1/operation");
123105
var request = new RestRequest(Method.DELETE);
124106
request.AddHeader("content-type", "application/json");
125-
request.AddParameter("application/json", "{\r\n \"ActionsTaken\": \"string\",\r\n \"Date\": \"2017-02-13T22:15:30.203Z\",\r\n \"Description\": \"string\",\r\n \"IncidentNo\": 0,\r\n \"ReportedDate\": \"2017-02-13T22:15:30.203Z\",\r\n \"SuspectedCause\": \"string\"\r\n}", ParameterType.RequestBody);
107+
request.AddParameter("application/json", "{\r\n [operationId1, operationId2, operationId3....]\r\n}", ParameterType.RequestBody);
126108
IRestResponse response = client.Execute(request);
127109
```
128110

111+
> Input JSON Body
112+
113+
```json
114+
115+
{
116+
[operationId1, operationId2, operationId3....]
117+
}
118+
119+
```
120+
> Example Response
121+
122+
```json
123+
{
124+
"deletedRowCount": 1,
125+
"notFoundCount": 0,
126+
"failureCount": 0,
127+
"errorMessage" : []
128+
}
129+
130+
```
131+

0 commit comments

Comments
 (0)