curl -X GET "https://api.dcycle.io/v1/emission-factors/custom-databases/5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7b/versions" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
import os
import requests
response = requests.get(
"https://api.dcycle.io/v1/emission-factors/custom-databases/5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7b/versions",
headers={
"x-api-key": os.environ["DCYCLE_API_KEY"],
"x-organization-id": os.environ["DCYCLE_ORG_ID"],
},
timeout=30,
)
response.raise_for_status()
print(response.json())
const axios = require('axios');
const response = await axios.get('https://api.dcycle.io/v1/emission-factors/custom-databases/5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7b/versions', {
headers: {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
},
});
console.log(response.status, response.data);
[
{
"id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
"name": "custom:5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7b:acme-measured-factors",
"version": "2024 measured",
"internal_incremental_version": 1,
"reference_year": 2024,
"url": null,
"record_count": 3,
"matching_record_count": null
}
]
List Custom Database Versions
Versions of a custom emission factor database
GET
/
v1
/
emission-factors
/
custom-databases
/
{database_id}
/
versions
curl -X GET "https://api.dcycle.io/v1/emission-factors/custom-databases/5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7b/versions" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
import os
import requests
response = requests.get(
"https://api.dcycle.io/v1/emission-factors/custom-databases/5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7b/versions",
headers={
"x-api-key": os.environ["DCYCLE_API_KEY"],
"x-organization-id": os.environ["DCYCLE_ORG_ID"],
},
timeout=30,
)
response.raise_for_status()
print(response.json())
const axios = require('axios');
const response = await axios.get('https://api.dcycle.io/v1/emission-factors/custom-databases/5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7b/versions', {
headers: {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
},
});
console.log(response.status, response.data);
[
{
"id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
"name": "custom:5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7b:acme-measured-factors",
"version": "2024 measured",
"internal_incremental_version": 1,
"reference_year": 2024,
"url": null,
"record_count": 3,
"matching_record_count": null
}
]
← Custom Emission Factors
The versions of a database your organization can see. Record endpoints take a version id as
source_id.
Beta. Part of the custom emission factors API, currently in beta. The contract may still change before general
availability.
curl -X GET "https://api.dcycle.io/v1/emission-factors/custom-databases/5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7b/versions" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
import os
import requests
response = requests.get(
"https://api.dcycle.io/v1/emission-factors/custom-databases/5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7b/versions",
headers={
"x-api-key": os.environ["DCYCLE_API_KEY"],
"x-organization-id": os.environ["DCYCLE_ORG_ID"],
},
timeout=30,
)
response.raise_for_status()
print(response.json())
const axios = require('axios');
const response = await axios.get('https://api.dcycle.io/v1/emission-factors/custom-databases/5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7b/versions', {
headers: {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
},
});
console.log(response.status, response.data);
[
{
"id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
"name": "custom:5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7b:acme-measured-factors",
"version": "2024 measured",
"internal_incremental_version": 1,
"reference_year": 2024,
"url": null,
"record_count": 3,
"matching_record_count": null
}
]
Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51fauuid
required
The database id.Example:
5f1c2e7a-3b4d-4e8f-9a01-2c3d4e5f6a7bstring
Also count, per version, the records linked to this category (
matching_record_count).Example: wastesResponse
An array of versions:uuid
Version id: the
source_id used in record paths.string
Internal name, generated from the database.
string
The version label you set.
integer
1 for the first version of the database, then 2, 3…
integer | null
Year the factors refer to.
string | null
Reference URL.
integer
Number of records.
integer | null
Records linked to the
activity_category you filtered by; null without the filter.Common Errors
401 Unauthorized
Missing or invalid API key.403 Forbidden
LOGGED_USER_NOT_MEMBER: the API key’s user is not a member of the organization in x-organization-id.
404 CUSTOM_DATABASE_NOT_FOUND
The database does not exist or is not visible to your organization.Related Endpoints
Create Version
A new version of the database
List Records
Records of a version
Was this page helpful?