Replace saved charts
curl --request PUT \
--url https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/charts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"charts": [
{
"id": "<string>",
"kind": "bar",
"title": "<string>",
"agg": "count",
"field": "<string>",
"dimension": "<string>"
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
charts: [
{
id: '<string>',
kind: 'bar',
title: '<string>',
agg: 'count',
field: '<string>',
dimension: '<string>'
}
]
})
};
fetch('https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/charts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/charts"
payload = { "charts": [
{
"id": "<string>",
"kind": "bar",
"title": "<string>",
"agg": "count",
"field": "<string>",
"dimension": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"saved": true,
"collection_id": "<string>",
"charts": [
{
"id": "<string>",
"kind": "bar",
"title": "<string>",
"agg": "count",
"field": "<string>",
"dimension": "<string>"
}
]
}{
"error": "InvalidArguments",
"message": "<string>"
}Collections
Replace saved charts
Replaces the full set of chart specs (max 50). Send the whole array.
PUT
/
v1
/
collections
/
{collection_id}
/
charts
Replace saved charts
curl --request PUT \
--url https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/charts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"charts": [
{
"id": "<string>",
"kind": "bar",
"title": "<string>",
"agg": "count",
"field": "<string>",
"dimension": "<string>"
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
charts: [
{
id: '<string>',
kind: 'bar',
title: '<string>',
agg: 'count',
field: '<string>',
dimension: '<string>'
}
]
})
};
fetch('https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/charts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:ai-collection-v3/webhooks/v1/collections/{collection_id}/charts"
payload = { "charts": [
{
"id": "<string>",
"kind": "bar",
"title": "<string>",
"agg": "count",
"field": "<string>",
"dimension": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"saved": true,
"collection_id": "<string>",
"charts": [
{
"id": "<string>",
"kind": "bar",
"title": "<string>",
"agg": "count",
"field": "<string>",
"dimension": "<string>"
}
]
}{
"error": "InvalidArguments",
"message": "<string>"
}Authorizations
BearerAuthOrgApiKeyAuth
User session JWT. Send as Authorization: Bearer <token>.
Path Parameters
Collection identifier returned at creation.
Body
application/json
Was this page helpful?
⌘I