List Dataset Values
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/{dataset_id}/values', 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/{dataset_id}/values"
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/{dataset_id}/values \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"items": {},
"total": 123,
"response_count": 123
}List Dataset Values
Paginated cross-campaign view of all submitted values in a dataset
GET
/
v1
/
custom-kpi-datasets
/
{dataset_id}
/
values
List Dataset Values
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/{dataset_id}/values', 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/{dataset_id}/values"
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/{dataset_id}/values \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"items": {},
"total": 123,
"response_count": 123
}← Custom KPI
Retrieve a paginated, cross-campaign view of all submitted KPI values in a dataset. Each row is enriched with campaign context, KPI metadata, data owner, organization, and facility names — useful for building aggregate dashboards.
Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faPath Parameters
string
required
UUID of the dataset
Query Parameters
integer
default:"1"
Page number (1-based)
integer
default:"20"
Page size (1–100)
string
default:"-submitted_at"
Sort field. Prefix with
- for descending.Response
array[object]
Value rows enriched with campaign and display context:
| Field | Type | Description |
|---|---|---|
id | string | Value UUID |
campaign_id | string | Campaign UUID |
campaign_name | string | Campaign display name |
campaign_period_start | string | Campaign period start (ISO date) |
campaign_period_end | string | Campaign period end (ISO date) |
campaign_assignment_id | string | Campaign-assignment UUID |
assignment_id | string | Dataset assignment UUID |
kpi_id | string | KPI definition UUID |
kpi_name | string | KPI display name |
kpi_unit | string | Measurement unit (nullable) |
value_numeric | number | Numeric answer (nullable) |
value_text | string | Text answer (nullable) |
value_date | string | Date answer (nullable) |
option_id | string | Selected option UUID (nullable) |
submitted_at | string | ISO 8601 timestamp |
submitter_email | string | Who submitted (nullable) |
data_owner_email | string | Assigned data owner |
organization_name | string | Organization name |
facility_name | string | Facility name (nullable) |
attachments | array | Evidence files (file_id, file_name, file_url) |
integer
Total number of value rows across all pages
integer
Total number of distinct response submissions
Example
curl -X GET "https://api.dcycle.io/v1/custom-kpi-datasets/${DATASET_ID}/values?page=1&size=10" \
-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"),
}
dataset_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
response = requests.get(
f"https://api.dcycle.io/v1/custom-kpi-datasets/{dataset_id}/values",
headers=headers,
params={"page": 1, "size": 10, "sort": "-submitted_at"},
)
data = response.json()
print(f"Showing {len(data['items'])}/{data['total']} values ({data['response_count']} submissions)")
for v in data["items"]:
print(f" [{v['campaign_name']}] {v['kpi_name']}: {v['value_numeric']} — {v['data_owner_email']}")
const axios = require('axios');
const headers = {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
};
const datasetId = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';
axios.get(`https://api.dcycle.io/v1/custom-kpi-datasets/${datasetId}/values`, {
headers,
params: { page: 1, size: 10 },
})
.then(response => {
const { items, total, response_count } = response.data;
console.log(`${items.length}/${total} values (${response_count} submissions)`);
items.forEach(v => console.log(`[${v.campaign_name}] ${v.kpi_name}: ${v.value_numeric}`));
});
Successful Response
{
"items": [
{
"id": "e1f2a3b4-c5d6-7890-abcd-ef1234567890",
"campaign_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"campaign_name": "Q1 2025 Water Survey",
"campaign_period_start": "2025-01-01",
"campaign_period_end": "2025-03-31",
"campaign_assignment_id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890",
"assignment_id": "d4e5f6a7-b8c9-0123-defa-234567890123",
"kpi_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"value_numeric": 1250.5,
"value_text": null,
"value_date": null,
"option_id": null,
"submitted_at": "2025-06-20T14:30:00Z",
"submitter_email": "supplier@example.com",
"submitter_user_id": null,
"kpi_name": "Total water consumption",
"kpi_unit": "m³",
"data_owner_email": "supplier@example.com",
"organization_name": "Acme Corp",
"facility_name": "Madrid Office",
"attachments": [
{
"file_id": "a1b2c3d4-0000-0000-0000-000000000001",
"file_name": "water-bill-q1.pdf",
"file_url": "https://storage.dcycle.io/..."
}
]
}
],
"total": 24,
"response_count": 8
}
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"}
404 Not Found
Cause: The dataset does not exist or belongs to another organization{"detail": "Not Found"}
Related Endpoints
Campaign Values
View values scoped to a single campaign
Submit Response
Submit new KPI values
Was this page helpful?