Update Dataset
const options = {
method: 'PATCH',
headers: {
'x-api-key': '<x-api-key>',
'x-organization-id': '<x-organization-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', description: '<string>'})
};
fetch('https://api.dcycle.io/v1/custom-kpi-datasets/{dataset_id}', 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}"
payload = {
"name": "<string>",
"description": "<string>"
}
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)curl --request PATCH \
--url https://api.dcycle.io/v1/custom-kpi-datasets/{dataset_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>' \
--data '
{
"name": "<string>",
"description": "<string>"
}
'{
"id": "<string>",
"name": "<string>",
"description": {},
"kpis": {},
"created_at": {},
"updated_at": {}
}Update Dataset
Update a custom KPI dataset’s name or description
PATCH
/
v1
/
custom-kpi-datasets
/
{dataset_id}
Update Dataset
const options = {
method: 'PATCH',
headers: {
'x-api-key': '<x-api-key>',
'x-organization-id': '<x-organization-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', description: '<string>'})
};
fetch('https://api.dcycle.io/v1/custom-kpi-datasets/{dataset_id}', 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}"
payload = {
"name": "<string>",
"description": "<string>"
}
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)curl --request PATCH \
--url https://api.dcycle.io/v1/custom-kpi-datasets/{dataset_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>' \
--data '
{
"name": "<string>",
"description": "<string>"
}
'{
"id": "<string>",
"name": "<string>",
"description": {},
"kpis": {},
"created_at": {},
"updated_at": {}
}Update the name or description of an existing custom KPI dataset. Only send the fields you want to change.
To manage the KPIs within a dataset, use the KPI endpoints (create, update, delete KPIs individually).
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 to updateExample:
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"Body Parameters
All fields are optional — only send what you want to change.string
New dataset name (1–255 characters)
string
New dataset description (max 2000 characters)
Response
Returns the updated dataset with its KPI definitions (HTTP 200). See Get Dataset for the full response shape.string
Dataset UUID.
string
Dataset display name.
string | null
Dataset description.
array[object]
KPI definitions. See Get Dataset for the nested KPI object shape.
datetime
Creation timestamp (ISO 8601).
string | null
Last update timestamp (ISO 8601).
Example
curl -X PATCH "https://api.dcycle.io/v1/custom-kpi-datasets/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "x-api-key: ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}" \
-H "Content-Type: application/json" \
-d '{"name": "Water & Waste Survey 2025", "description": "Updated to include waste metrics"}'
import requests
import os
headers = {
"x-api-key": os.getenv("DCYCLE_API_KEY"),
"x-organization-id": os.getenv("DCYCLE_ORG_ID"),
"Content-Type": "application/json",
}
dataset_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
response = requests.patch(
f"https://api.dcycle.io/v1/custom-kpi-datasets/{dataset_id}",
headers=headers,
json={"name": "Water & Waste Survey 2025", "description": "Updated to include waste metrics"},
)
dataset = response.json()
print(f"Updated: {dataset['name']}")
const axios = require('axios');
const headers = {
'x-api-key': process.env.DCYCLE_API_KEY,
'x-organization-id': process.env.DCYCLE_ORG_ID,
'Content-Type': 'application/json',
};
const id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890';
axios.patch(`https://api.dcycle.io/v1/custom-kpi-datasets/${id}`, {
name: 'Water & Waste Survey 2025',
description: 'Updated to include waste metrics',
}, { headers })
.then(response => console.log(`Updated: ${response.data.name}`));
Successful Response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"organization_id": "a8315ef3-dd50-43f8-b7ce-d839e68d51fa",
"name": "Water & Waste Survey 2025",
"description": "Updated to include waste metrics",
"created_by": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"updated_by": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"created_at": "2025-05-01T09:00:00Z",
"updated_at": "2025-06-18T14:30:00Z"
}
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: Dataset not found{
"detail": "Dataset not found"
}
Related Endpoints
Get Dataset
View current dataset details
List Datasets
View all datasets
Was this page helpful?