Create a version of a delivery destination
curl --request POST \
--url https://app.chatobserver.com/api/v2/metrics/destinations/{destinationId}/versions \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-chatobserver-key: <api-key>' \
--data '
{
"definition": {
"region": "<string>",
"schemaVersion": 2,
"destinationKind": "<string>",
"connectionVersionId": "<string>",
"target": {},
"residency": "<string>",
"capabilitySnapshot": {},
"testedAt": "2023-11-07T05:31:56Z",
"safeDisplay": {},
"ownership": "customer",
"durability": "external_destination"
}
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'x-chatobserver-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
definition: {
region: '<string>',
schemaVersion: 2,
destinationKind: '<string>',
connectionVersionId: '<string>',
target: {},
residency: '<string>',
capabilitySnapshot: {},
testedAt: '2023-11-07T05:31:56Z',
safeDisplay: {},
ownership: 'customer',
durability: 'external_destination'
}
})
};
fetch('https://app.chatobserver.com/api/v2/metrics/destinations/{destinationId}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.chatobserver.com/api/v2/metrics/destinations/{destinationId}/versions"
payload = { "definition": {
"region": "<string>",
"schemaVersion": 2,
"destinationKind": "<string>",
"connectionVersionId": "<string>",
"target": {},
"residency": "<string>",
"capabilitySnapshot": {},
"testedAt": "2023-11-07T05:31:56Z",
"safeDisplay": {},
"ownership": "customer",
"durability": "external_destination"
} }
headers = {
"Idempotency-Key": "<idempotency-key>",
"x-chatobserver-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"actorId": "<string>",
"canonicalHash": "<string>",
"destinationId": "<string>",
"versionId": "<string>",
"versionNumber": 123,
"versionStatus": "draft"
},
"replayed": false
}{
"data": {
"actorId": "<string>",
"canonicalHash": "<string>",
"destinationId": "<string>",
"versionId": "<string>",
"versionNumber": 123,
"versionStatus": "draft"
},
"replayed": false
}{
"error": {
"code": "internal",
"fieldPath": [
"<string>"
],
"parameters": {},
"repairActions": [
"<string>"
],
"requestId": "<string>",
"retryable": false,
"retryAfterSeconds": 1
}
}Data delivery
Create a version of a delivery destination
Manage schedules, transfers, destinations and import workflows.
POST
/
api
/
v2
/
metrics
/
destinations
/
{destinationId}
/
versions
Create a version of a delivery destination
curl --request POST \
--url https://app.chatobserver.com/api/v2/metrics/destinations/{destinationId}/versions \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-chatobserver-key: <api-key>' \
--data '
{
"definition": {
"region": "<string>",
"schemaVersion": 2,
"destinationKind": "<string>",
"connectionVersionId": "<string>",
"target": {},
"residency": "<string>",
"capabilitySnapshot": {},
"testedAt": "2023-11-07T05:31:56Z",
"safeDisplay": {},
"ownership": "customer",
"durability": "external_destination"
}
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'x-chatobserver-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
definition: {
region: '<string>',
schemaVersion: 2,
destinationKind: '<string>',
connectionVersionId: '<string>',
target: {},
residency: '<string>',
capabilitySnapshot: {},
testedAt: '2023-11-07T05:31:56Z',
safeDisplay: {},
ownership: 'customer',
durability: 'external_destination'
}
})
};
fetch('https://app.chatobserver.com/api/v2/metrics/destinations/{destinationId}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.chatobserver.com/api/v2/metrics/destinations/{destinationId}/versions"
payload = { "definition": {
"region": "<string>",
"schemaVersion": 2,
"destinationKind": "<string>",
"connectionVersionId": "<string>",
"target": {},
"residency": "<string>",
"capabilitySnapshot": {},
"testedAt": "2023-11-07T05:31:56Z",
"safeDisplay": {},
"ownership": "customer",
"durability": "external_destination"
} }
headers = {
"Idempotency-Key": "<idempotency-key>",
"x-chatobserver-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"actorId": "<string>",
"canonicalHash": "<string>",
"destinationId": "<string>",
"versionId": "<string>",
"versionNumber": 123,
"versionStatus": "draft"
},
"replayed": false
}{
"data": {
"actorId": "<string>",
"canonicalHash": "<string>",
"destinationId": "<string>",
"versionId": "<string>",
"versionNumber": 123,
"versionStatus": "draft"
},
"replayed": false
}{
"error": {
"code": "internal",
"fieldPath": [
"<string>"
],
"parameters": {},
"repairActions": [
"<string>"
],
"requestId": "<string>",
"retryable": false,
"retryAfterSeconds": 1
}
}Required scopes:
metrics:write.Authorizations
WorkspaceKeyBearerKey
A workspace API key. Data endpoints require a service-account key with the specified scopes.
Headers
Unique key for one logical command. Reuse it only when retrying the same request and payload.
Required string length:
16 - 160Pattern:
^[A-Za-z0-9:_-]+$Path Parameters
Resource identifier returned by the API.
Body
application/json
Show child attributes
Show child attributes