Retrieves electricity trend analysis data.
Operation description
The API returns a list. Each element in the list contains emission data for a specific type of electricity.
Each emission list contains the following elements: the year and month of the emission, the electricity consumption and its unit, the corresponding carbon emissions, and the ratio of this consumption to the total electricity consumption for that month.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
energy:GetElecTrend |
none |
*All Resource
|
None | None |
Request syntax
POST /api/v1/carbon/emission/analysis/elec/trend HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| code |
string |
Yes |
The enterprise code. |
C-20240115-3 |
| yearList |
array |
Yes |
A list of years. |
|
|
integer |
Yes |
Year. |
2023 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response struct. |
||
| requestId |
string |
The request ID. |
83A5A7DD-8974-5769-952E-590A97BEA34E |
| data |
object |
The returned data. |
|
| water |
array<object> |
The monthly electricity consumption and carbon emission data for hydropower. |
|
|
object |
The data struct for monthly electricity consumption and carbon emissions of hydropower. |
||
| carbonEmissionData |
number |
The carbon emissions. |
3.14 |
| rawData |
number |
Electricity consumption. |
3.14 |
| ratio |
number |
The ratio of the electricity consumption to the total electricity consumption for the month. For example, a value of 0.5 indicates 50%. |
0.5 |
| dataUnit |
string |
The unit. |
kWh |
| name |
string |
The name of the electricity type. |
水电 |
| nameKey |
string |
The code of the electricity type. |
carbonInventory.check.water_electricity |
| month |
integer |
The month. |
12 |
| year |
string |
The year. |
2024 |
| light |
array<object> |
The monthly electricity consumption and carbon emission data for photovoltaic power. |
|
|
object |
The data struct for monthly electricity consumption and carbon emissions of photovoltaic power. |
||
| carbonEmissionData |
number |
The carbon emissions. |
3.14 |
| rawData |
number |
Electricity consumption. |
3.14 |
| ratio |
number |
The ratio of the electricity consumption to the total electricity consumption for the month. For example, a value of 0.5 indicates 50%. |
0.5 |
| dataUnit |
string |
The unit. |
kWh |
| name |
string |
The name of the electricity type. |
光电 |
| nameKey |
string |
The code of the electricity type. |
carbonInventory.check.light_electricity |
| month |
integer |
The month. |
12 |
| year |
string |
The year. |
2024 |
| urban |
array<object> |
The monthly electricity consumption and carbon emission data for grid power. |
|
|
object |
The data struct for monthly electricity consumption and carbon emissions of grid power. |
||
| carbonEmissionData |
number |
The carbon emissions. |
3.14 |
| rawData |
number |
Electricity consumption. |
3.14 |
| ratio |
number |
The ratio of the electricity consumption to the total electricity consumption for the month. For example, a value of 0.5 indicates 50%. |
0.5 |
| dataUnit |
string |
The unit. |
kWh |
| name |
string |
The name of the electricity type. |
市电 |
| nameKey |
string |
The code of the electricity type. |
carbonInventory.check.urban_electricity |
| month |
integer |
The month. |
12 |
| year |
string |
The year. |
2024 |
| wind |
array<object> |
The monthly electricity consumption and carbon emission data for wind power. |
|
|
object |
The data struct for monthly electricity consumption and carbon emissions of wind power. |
||
| carbonEmissionData |
number |
The carbon emissions. |
3.14 |
| rawData |
number |
Electricity consumption. |
3.14 |
| ratio |
number |
The ratio of the electricity consumption to the total electricity consumption for the month. For example, a value of 0.5 indicates 50%. |
0.5 |
| dataUnit |
string |
The unit. |
kWh |
| name |
string |
The name of the electricity type. |
风电 |
| nameKey |
string |
The code of the electricity type. |
carbonInventory.check.wind_electricity |
| month |
integer |
The month. |
12 |
| year |
string |
The year. |
2024 |
| nuclear |
array<object> |
The monthly electricity consumption and carbon emission data for nuclear power. |
|
|
object |
The data struct for monthly electricity consumption and carbon emissions of nuclear power. |
||
| carbonEmissionData |
number |
The carbon emissions. |
3.14 |
| rawData |
number |
Electricity consumption. |
3.14 |
| ratio |
number |
The ratio of the electricity consumption to the total electricity consumption for the month. For example, a value of 0.5 indicates 50%. |
0.5 |
| dataUnit |
string |
The unit. |
kWh |
| name |
string |
The name of the electricity type. |
核电 |
| nameKey |
string |
The code of the electricity type. |
carbonInventory.check.nuclear_electricity |
| month |
integer |
The month. |
12 |
| year |
string |
The year. |
2024 |
| renewing |
array<object> |
The monthly electricity consumption and carbon emission data for renewable electricity. |
|
|
object |
The data struct for monthly electricity consumption and carbon emissions of renewable electricity. |
||
| carbonEmissionData |
number |
The carbon emissions. |
3.14 |
| rawData |
number |
Electricity consumption. |
3.14 |
| ratio |
number |
The ratio of the electricity consumption to the total electricity consumption for the month. For example, a value of 0.5 indicates 50%. |
0.5 |
| dataUnit |
string |
The unit. |
kWh |
| name |
string |
The name of the electricity type. |
可再生电 |
| nameKey |
string |
The code of the electricity type. |
carbonInventory.carbonEmissionAnalysis.components.CarbonDetail.lingTanDianLi |
| month |
integer |
The month. |
12 |
| year |
string |
The year. |
2024 |
| zero |
array<object> |
The monthly electricity consumption and carbon emission data for zero-carbon electricity. |
|
|
object |
The data struct for monthly electricity consumption and carbon emissions of zero-carbon electricity. |
||
| carbonEmissionData |
number |
The carbon emissions. |
3.14 |
| rawData |
number |
Electricity consumption. |
3.14 |
| ratio |
number |
The ratio of the electricity consumption to the total electricity consumption for the month. For example, a value of 0.5 indicates 50%. |
0.5 |
| dataUnit |
string |
The unit. |
kWh |
| name |
string |
The name of the electricity type. |
零电 |
| nameKey |
string |
The code of the electricity type. |
carbonInventory.carbonEmissionAnalysis.components.CarbonDetail.lingTanDianLi |
| month |
integer |
The month. |
12 |
| year |
string |
The year. |
2024 |
| code |
string |
The response code. A value of `200` indicates that the request was successful. Other values indicate that the request failed. For more information, see the `msg` parameter. |
200 |
Examples
Success response
JSON format
{
"requestId": "83A5A7DD-8974-5769-952E-590A97BEA34E",
"data": {
"water": [
{
"carbonEmissionData": 3.14,
"rawData": 3.14,
"ratio": 0.5,
"dataUnit": "kWh",
"name": "水电",
"nameKey": "carbonInventory.check.water_electricity",
"month": 12,
"year": "2024"
}
],
"light": [
{
"carbonEmissionData": 3.14,
"rawData": 3.14,
"ratio": 0.5,
"dataUnit": "kWh",
"name": "光电",
"nameKey": "carbonInventory.check.light_electricity",
"month": 12,
"year": "2024"
}
],
"urban": [
{
"carbonEmissionData": 3.14,
"rawData": 3.14,
"ratio": 0.5,
"dataUnit": "kWh",
"name": "市电",
"nameKey": "carbonInventory.check.urban_electricity",
"month": 12,
"year": "2024"
}
],
"wind": [
{
"carbonEmissionData": 3.14,
"rawData": 3.14,
"ratio": 0.5,
"dataUnit": "kWh",
"name": "风电",
"nameKey": "carbonInventory.check.wind_electricity",
"month": 12,
"year": "2024"
}
],
"nuclear": [
{
"carbonEmissionData": 3.14,
"rawData": 3.14,
"ratio": 0.5,
"dataUnit": "kWh",
"name": "核电",
"nameKey": "carbonInventory.check.nuclear_electricity",
"month": 12,
"year": "2024"
}
],
"renewing": [
{
"carbonEmissionData": 3.14,
"rawData": 3.14,
"ratio": 0.5,
"dataUnit": "kWh",
"name": "可再生电",
"nameKey": "carbonInventory.carbonEmissionAnalysis.components.CarbonDetail.lingTanDianLi",
"month": 12,
"year": "2024"
}
],
"zero": [
{
"carbonEmissionData": 3.14,
"rawData": 3.14,
"ratio": 0.5,
"dataUnit": "kWh",
"name": "零电",
"nameKey": "carbonInventory.carbonEmissionAnalysis.components.CarbonDetail.lingTanDianLi",
"month": 12,
"year": "2024"
}
]
},
"code": "200"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.