Retrieves a descending list of emissions for a specified environmental impact (methodType), grouping level (group), and calculation method (emissionType).
Operation description
This API retrieves a descending list of emissions for a specified product ID, environmental impact (methodType), grouping level (group), and calculation method (emissionType). You can use this API to understand the emissions associated with various environmental impacts.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
energy:GetInventoryList |
none |
*All Resource
|
None | None |
Request syntax
POST /api/v1/carbon/footprint/result/inventory/list HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request parameters. |
|
| code |
string |
Yes |
The enterprise code. |
C-20080808-1 |
| productId |
integer |
Yes |
The product ID. |
1024 |
| productType |
integer |
Yes |
The product type. A value of `1` indicates a product carbon footprint request. A value of `5` indicates a supply chain carbon footprint request. |
1 |
| methodType |
string |
Yes |
The type of environmental impact. A value of `gwp` indicates the climate change carbon footprint. For other values, see the `type` value in the enumeration list. For more information, see the appendix. |
gwp |
| emissionType |
string |
Yes |
The emission type. Note
Valid values: `footprint` and `emission`. `footprint`: All inventories are included in the calculation. `emission`: Only inventories with positive or zero emissions are included. Negative values are excluded. |
footprint |
| group |
string |
Yes |
The grouping basis. Note
Valid values: `resource`, `process`, `resourceType`, and `processType`. `resource`: Groups by inventory. `process`: Groups by process. `resourceType`: Groups by inventory type. `processType`: Groups by stage. |
resource |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
The request ID. This value is unique for each request and helps with troubleshooting. |
83A5A7DD-8974-5769-952E-590A97BEA34E |
| data |
object |
The returned data. |
|
| unit |
string |
The unit of emissions. The default is `kgCO₂e/productUnit`, where `productUnit` is the unit of the product. The `unit` automatically adjusts to `tCO₂e/productUnit` or `gCO₂e/productUnit` based on the emission quantity. For details about the conversion rules, see the `carbonEmission` parameter. |
kgCO₂e/kg |
| productUnit |
string |
The unit of the product. |
kg |
| items |
array<object> |
The details of the emission list. |
|
|
object |
|||
| name |
string |
The name. Note
The meaning of this parameter depends on the `group` request parameter. If `group` is `resource`, `name` is the inventory name. If `group` is `process`, `name` is the process name. If `group` is `resourceType`, `name` is the inventory type name. If `group` is `processType`, `name` is the stage name. |
电力 |
| carbonEmission |
number |
The emission quantity. The value can be positive, negative, or zero. To ensure accuracy, the calculation retains 24 decimal places. For display and use, truncate the value as needed. |
1000.000000000000000000000000000000 |
| percent |
string |
The percentage. |
99.01 |
| processName |
string |
The process name. This parameter is valid only when the `group` request parameter is set to `resource`. |
Process-1 |
Examples
Success response
JSON format
{
"requestId": "83A5A7DD-8974-5769-952E-590A97BEA34E",
"data": {
"unit": "kgCO₂e/kg",
"productUnit": "kg",
"items": [
{
"name": "电力",
"carbonEmission": 1000,
"percent": "99.01",
"processName": "Process-1"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.