Attach and snapshot native report evidence
curl --request POST \
--url https://app.chatobserver.com/api/v2/reports/{reportId}/native-data-sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"stableKey": "<string>",
"displayName": "<string>",
"datasetId": "<string>",
"selectedFieldIds": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {
'x-workspace-id': '<x-workspace-id>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
stableKey: '<string>',
displayName: '<string>',
datasetId: '<string>',
selectedFieldIds: ['<string>']
})
};
fetch('https://app.chatobserver.com/api/v2/reports/{reportId}/native-data-sources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.chatobserver.com/api/v2/reports/{reportId}/native-data-sources"
payload = {
"stableKey": "<string>",
"displayName": "<string>",
"datasetId": "<string>",
"selectedFieldIds": ["<string>"]
}
headers = {
"x-workspace-id": "<x-workspace-id>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"attachmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reportId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stableKey": "<string>",
"displayName": "<string>",
"attachmentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"generationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"catalogue": {
"version": 1,
"attachmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": {
"kind": "metrics_query",
"connectorKey": "<string>",
"sourceAccountIds": [
123
],
"catalogueSnapshotIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"fields": [
{
"id": "<string>",
"sourceFieldId": "<string>",
"displayName": "<string>",
"description": "<string>",
"role": "dimension",
"dataType": "string",
"defaultAggregation": "none",
"allowedAggregations": [
"<unknown>"
],
"format": {
"kind": "number",
"locale": "<string>",
"currencyCode": "<string>",
"minimumFractionDigits": 10,
"maximumFractionDigits": 10,
"compact": true,
"dateStyle": "short",
"timeStyle": "short"
},
"semanticTags": [
"<string>"
],
"nullable": true,
"hidden": true,
"sensitive": true,
"filter": {
"allowed": true,
"operators": [
"<string>"
],
"valueResolverId": "<string>"
},
"orderable": true,
"lineage": {
"kind": "metrics",
"connectorKey": "<string>",
"sourceAccountId": 123,
"catalogueSnapshotId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceFieldId": "<string>",
"providerFieldId": "<string>",
"origin": "<string>"
}
}
],
"generatedAt": "2023-11-07T05:31:56Z",
"schemaFingerprint": "<string>"
},
"generation": {
"status": "<string>",
"freshness": "<string>",
"rowCount": 1,
"warnings": [
"<string>"
]
}
},
"adoption": {
"state": "complete",
"issueCode": "<string>",
"generationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"requestId": "<string>"
}Reports
Attach and snapshot native report evidence
Attach a built-in dataset from the native catalogue to this report and materialize an immutable generation using its saved date range. Returns report-owned attachment and semantic field identities for native charts, KPIs and tables. Requires current report edit and independent Data access. External analytics remains a reusable Data query; this operation never runs a provider.
POST
/
api
/
v2
/
reports
/
{reportId}
/
native-data-sources
Attach and snapshot native report evidence
curl --request POST \
--url https://app.chatobserver.com/api/v2/reports/{reportId}/native-data-sources \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"stableKey": "<string>",
"displayName": "<string>",
"datasetId": "<string>",
"selectedFieldIds": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {
'x-workspace-id': '<x-workspace-id>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
stableKey: '<string>',
displayName: '<string>',
datasetId: '<string>',
selectedFieldIds: ['<string>']
})
};
fetch('https://app.chatobserver.com/api/v2/reports/{reportId}/native-data-sources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.chatobserver.com/api/v2/reports/{reportId}/native-data-sources"
payload = {
"stableKey": "<string>",
"displayName": "<string>",
"datasetId": "<string>",
"selectedFieldIds": ["<string>"]
}
headers = {
"x-workspace-id": "<x-workspace-id>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"attachmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reportId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stableKey": "<string>",
"displayName": "<string>",
"attachmentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"generationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"catalogue": {
"version": 1,
"attachmentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": {
"kind": "metrics_query",
"connectorKey": "<string>",
"sourceAccountIds": [
123
],
"catalogueSnapshotIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"fields": [
{
"id": "<string>",
"sourceFieldId": "<string>",
"displayName": "<string>",
"description": "<string>",
"role": "dimension",
"dataType": "string",
"defaultAggregation": "none",
"allowedAggregations": [
"<unknown>"
],
"format": {
"kind": "number",
"locale": "<string>",
"currencyCode": "<string>",
"minimumFractionDigits": 10,
"maximumFractionDigits": 10,
"compact": true,
"dateStyle": "short",
"timeStyle": "short"
},
"semanticTags": [
"<string>"
],
"nullable": true,
"hidden": true,
"sensitive": true,
"filter": {
"allowed": true,
"operators": [
"<string>"
],
"valueResolverId": "<string>"
},
"orderable": true,
"lineage": {
"kind": "metrics",
"connectorKey": "<string>",
"sourceAccountId": 123,
"catalogueSnapshotId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceFieldId": "<string>",
"providerFieldId": "<string>",
"origin": "<string>"
}
}
],
"generatedAt": "2023-11-07T05:31:56Z",
"schemaFingerprint": "<string>"
},
"generation": {
"status": "<string>",
"freshness": "<string>",
"rowCount": 1,
"warnings": [
"<string>"
]
}
},
"adoption": {
"state": "complete",
"issueCode": "<string>",
"generationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"requestId": "<string>"
}Required scopes:
reports:write, data:read.Authorizations
Headers
Body
application/json