List Datasets
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/custom-kpi-datasets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/custom-kpi-datasets"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.dcycle.io/v1/custom-kpi-datasets \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"id": "<string>",
"organization_id": "<string>",
"name": "<string>",
"description": "<string>",
"created_by": "<string>",
"created_at": {},
"updated_at": {}
}List Datasets
List all custom KPI datasets for your organization
GET
/
v1
/
custom-kpi-datasets
List Datasets
const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/custom-kpi-datasets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/custom-kpi-datasets"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.dcycle.io/v1/custom-kpi-datasets \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"id": "<string>",
"organization_id": "<string>",
"name": "<string>",
"description": "<string>",
"created_by": "<string>",
"created_at": {},
"updated_at": {}
}← Custom KPI
Retrieve all custom KPI datasets belonging to your organization. Each dataset defines a collection of KPI questions that can be assigned to data owners via campaigns.
Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faResponse
Returns an array of dataset objects with HTTP 200.string
UUID of the dataset
string
UUID of the owning organization
string
Dataset name
string
Dataset description (nullable)
string
UUID of the user who created the dataset (nullable)
datetime
ISO 8601 timestamp
datetime | null
ISO 8601 timestamp (nullable)
Example
curl -X GET "https://api.dcycle.io/v1/custom-kpi-datasets" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}"
import requests
import os
headers = {
"x-api-key": os.getenv("DCYCLE_API_KEY"),
"x-organization-id": os.getenv("DCYCLE_ORG_ID"),
}
response = requests.get(
"https://api.dcycle.io/v1/custom-kpi-datasets",
headers=headers,
)
datasets = response.json()
for ds in datasets:
print(f"{ds['name']} — {len(ds.get('kpis', []))} KPIs")
const axios = require('axios');
const headers = {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
};
axios.get('https://api.dcycle.io/v1/custom-kpi-datasets', { headers })
.then(response => {
response.data.forEach(ds => console.log(`${ds.name}`));
});
Successful Response
[
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"organization_id": "a8315ef3-dd50-43f8-b7ce-d839e68d51fa",
"name": "Water Usage Survey",
"description": "Monthly water consumption across facilities",
"created_by": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"updated_by": null,
"created_at": "2025-01-15T10:30:00Z",
"updated_at": null
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"organization_id": "a8315ef3-dd50-43f8-b7ce-d839e68d51fa",
"name": "Waste Tracking",
"description": null,
"created_by": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"updated_by": null,
"created_at": "2025-02-01T09:00:00Z",
"updated_at": null
}
]
Common Errors
401 Unauthorized
Cause: Missing or invalid API key{"detail": "Invalid API key for organization", "code": "INVALID_API_KEY"}
403 Forbidden
Cause: The authenticated user is not a member of the organization{"detail": "Logged User is not Member of Organization", "code": "LOGGED_USER_NOT_MEMBER"}
Related Endpoints
Create Dataset
Create a new dataset with KPI definitions
Get Dataset
View a dataset with its KPIs
Was this page helpful?