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
4 changes: 2 additions & 2 deletions source/includes/acts/get_api.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Retrieve data from Database Table
## Retrieve Data

This section outlines the various GET APIs available for fetching data from different tables. Each API provides the capability to retrieve specific data based on provided parameters. Pagination support is available for managing large datasets effectively.The user can pass the set of parameters of same or different filter options at once .

Expand Down Expand Up @@ -80,7 +80,7 @@ PageSize | int | The number of results per page
attributeTypeIds | int | Attribute ID is one of the filter parameter is a integer data type
attributeTypes | string | Attribute Types is for the project detail type

### 2. Compound API Table
### 2. Compound Table

This section guides you through the process of fetching data from the Compound table using the dedicated API endpoint. The endpoint offers the flexibility to retrieve all data from the Compound table or selectively acquire information by including Compound Ids, Compound Type Ids, Compound Status Ids, Compound Names, External Identifiers, or CAS Numbers. Additionally, the Compound endpoint is equipped with pagination capabilities to facilitate efficient management of substantial datasets.

Expand Down
157 changes: 78 additions & 79 deletions source/includes/acts/post_api.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Add or Modify Database Table
## Add or Modify Data

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.

Expand All @@ -16,11 +16,11 @@ In the following release, the POST APIs End points are provided to add or update
* Emission Factor
* Equipment
* Equipment Attribute
* Equipment Emissions Recalculate
* Emissions Recalculate By Equipment
* Facility
* Facility Attribute
* Operation
* Operation Emissions Recalculate
* Emissions Recalculate By Operation
* Workflow
* Workflow Answer
* Workflow Equipment
Expand Down Expand Up @@ -338,7 +338,7 @@ IRestResponse response = client.Execute(request);

```

### 4. Equipment Emissions Recalculate
### 4. Emissions Recalculate By Equipment

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.

Expand Down Expand Up @@ -410,8 +410,79 @@ IRestResponse response = client.Execute(request);

```

### 5. Emissions Recalculate By Operation

### 5. Facility Table
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.

**Operation/EmissionCalculation POST endpoint**

`POST` api/v1/operation/emissioncalculation

> Example Request & JSON Input Body

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

var options = { method: 'POST',
url: 'https://[tenant].actsapi.intelex.com/v1/operation/emissioncalculation',
headers: { 'content-type': 'application/json' },
body:
{ [operationId1, operationId2, operationId3....]
},
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/operation/emissioncalculation");
var request = new RestRequest(Method.POST);
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
{
[operationId1, operationId2, operationId3....]
}
```
> Example Response

```json
{
"processedIds": [
"34",
"36"
],
"invalidIds": [
"1234"
],
"errorMessages": []
}

```

> Example Output when data is missing

```json
{
"processedIds": [],
"invalidIds": [],
"errorMessages": [
"Operation ids are missing."
]
}

```

### 6. Facility Table

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

Expand Down Expand Up @@ -539,7 +610,7 @@ IRestResponse response = client.Execute(request);

```

### 6. Facility Attribute Table
### 7. Facility Attribute Table

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

Expand Down Expand Up @@ -628,7 +699,7 @@ IRestResponse response = client.Execute(request);

```

### 7. Operation Table
### 8. Operation Table

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

Expand Down Expand Up @@ -743,78 +814,6 @@ IRestResponse response = client.Execute(request);

```

### 8. Operation Emissions Recalculate

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.

**Operation/EmissionCalculation POST endpoint**

`POST` api/v1/operation/emissioncalculation

> Example Request & JSON Input Body

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

var options = { method: 'POST',
url: 'https://[tenant].actsapi.intelex.com/v1/operation/emissioncalculation',
headers: { 'content-type': 'application/json' },
body:
{ [operationId1, operationId2, operationId3....]
},
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/operation/emissioncalculation");
var request = new RestRequest(Method.POST);
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
{
[operationId1, operationId2, operationId3....]
}
```
> Example Response

```json
{
"processedIds": [
"34",
"36"
],
"invalidIds": [
"1234"
],
"errorMessages": []
}

```

> Example Output when data is missing

```json
{
"processedIds": [],
"invalidIds": [],
"errorMessages": [
"Operation ids are missing."
]
}

```

### 9. Workflow Table

This section outlines the process of adding new entries or modifying existing records within the Workflow table using the dedicated API endpoint.
Expand Down
10 changes: 5 additions & 5 deletions source/includes/acts/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ Database Tables supporting POST requests
1. Emission Factor
2. Equipment
3. Equipment Attribute
4. Equipment Emissions Recalculate
5. Facility
6. Facility Attribute
7. Operation
8. Operation Emissions Recalculate
4. Emissions Recalculate By Equipment
5. Emissions Recalculate By Operation
6. Facility
7. Facility Attribute
8. Operation
9. Workflow
10. Workflow Answer
11. Workflow Equipment
Expand Down