Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 182 additions & 2 deletions source/includes/acts/delete_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,192 @@ This section outlines the available Delete APIs designed for modifying ACTS data

In the current release, one DELETE API End point is provided to remove or delete from the following table

* Analysis
* Analysis Compound
* Equipment Analysis
* Emission Factor
* Operation

DELETE requests to these endpoints should be formatted in JSON.

### 1. Emission Factor Table
### 1. Analysis Table

This section guides you through the process of removing/deleting the existing records from the Analysis table using the designated API endpoint.

**Analysis DELETE endpoint**

`DELETE` /api/v1/analysis

> Example Request & JSON Input Body

```javascript
var request = require("request");

var options = { method: 'DELETE',
url: 'https://[tenant].actsapi.intelex.com/v1/analysis',
headers: { 'content-type': 'application/json' },
body:
{
[analysisId1, analysisId2, analysisId3....]
},
json: true };

request(options, function (error, response, body) {
if (error) throw new Error(error);

console.log(body);
});
```

```csharp

var client = new RestClient("https://[tenant].actsapi.intelex.com/v1/analysis");
var request = new RestRequest(Method.DELETE);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\r\n [operationId1, operationId2, operationId3....] \r\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
> Input JSON Body

```json

{
[analysisId1, analysisId2, analysisId3....]
}

```
> Example Response

```json
{
"insertedRowCount" : 0 ,
"updatedRowCount" : 0 ,
"deletedRowCount" : 1 ,
"failureCount" : 0 ,
"errorMessage" : []
}

```

### 2. Analysis Compound Table

This section guides you through the process of removing/deleting the existing records from the Analysis Compound table using the designated API endpoint.

**Analysis Compound DELETE endpoint**

`DELETE` /api/v1/analysiscompound

> Example Request & JSON Input Body

```javascript
var request = require("request");

var options = { method: 'DELETE',
url: 'https://[tenant].actsapi.intelex.com/v1/analysiscompound',
headers: { 'content-type': 'application/json' },
body:
{
[analysisCompoundId1, analysisCompoundId2, analysisCompoundId3....]
},
json: true };

request(options, function (error, response, body) {
if (error) throw new Error(error);

console.log(body);
});
```

```csharp

var client = new RestClient("https://[tenant].actsapi.intelex.com/v1/analysiscompound");
var request = new RestRequest(Method.DELETE);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\r\n [analysisCompoundId1, analysisCompoundId2, analysisCompoundId3....] \r\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
> Input JSON Body

```json

{
[analysisCompoundId1, analysisCompoundId2, analysisCompoundId3....]
}

```
> Example Response

```json
{
"insertedRowCount" : 0 ,
"updatedRowCount" : 0 ,
"deletedRowCount" : 1 ,
"failureCount" : 0 ,
"errorMessage" : []
}

```

### 3. Equipment Analysis Table

This section guides you through the process of removing/deleting the existing records from the Equipment Analysis table using the designated API endpoint.

**Equipment Analysis DELETE endpoint**

`DELETE` /api/v1/equipmentanalysis

> Example Request & JSON Input Body

```javascript
var request = require("request");

var options = { method: 'DELETE',
url: 'https://[tenant].actsapi.intelex.com/v1/equipmentanalysis',
headers: { 'content-type': 'application/json' },
body:
{
[equipmentanalysisId1, equipmentanalysisId2, equipmentanalysisId3....]
},
json: true };

request(options, function (error, response, body) {
if (error) throw new Error(error);

console.log(body);
});
```

```csharp

var client = new RestClient("https://[tenant].actsapi.intelex.com/v1/equipmentanalysis");
var request = new RestRequest(Method.DELETE);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\r\n [equipmentanalysisId1, equipmentanalysisId2, equipmentanalysisId3....] \r\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```
> Input JSON Body

```json

{
[equipmentanalysisId1, equipmentanalysisId2, equipmentanalysisId3....]
}

```
> Example Response

```json
{
"insertedRowCount" : 0 ,
"updatedRowCount" : 0 ,
"deletedRowCount" : 1 ,
"failureCount" : 0 ,
"errorMessage" : []
}

```

### 4. Emission Factor Table

This section guides you through the process of removing/deleting the existing records from the Emission Factor table using the designated API endpoint.

Expand Down Expand Up @@ -71,7 +251,7 @@ IRestResponse response = client.Execute(request);
```


### 2. Operation Table
### 5. Operation Table

This section guides you through the process of removing/deleting the existing records from the Operation table using the designated API endpoint.

Expand Down
Loading