Create a version of a data transfer
curl --request POST \
--url https://app.chatobserver.com/api/v2/metrics/transfers/{transferId}/versions \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-chatobserver-key: <api-key>' \
--data '
{
"definition": {
"input": {
"kind": "query",
"queryVersionId": "<string>"
},
"schemaVersion": 2,
"retentionDays": 1825,
"keyFieldIds": [
"<string>"
],
"destinationVersionId": "<string>",
"partitionFieldIds": [
"<string>"
],
"lookbackWindow": {
"count": 123
},
"notificationPolicy": {
"onSuccess": false,
"onFailure": false,
"onSchemaDrift": false
},
"target": {},
"tableTargets": []
}
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'x-chatobserver-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
definition: {
input: {kind: 'query', queryVersionId: '<string>'},
schemaVersion: 2,
retentionDays: 1825,
keyFieldIds: ['<string>'],
destinationVersionId: '<string>',
partitionFieldIds: ['<string>'],
lookbackWindow: {count: 123},
notificationPolicy: {onSuccess: false, onFailure: false, onSchemaDrift: false},
target: {},
tableTargets: []
}
})
};
fetch('https://app.chatobserver.com/api/v2/metrics/transfers/{transferId}/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/transfers/{transferId}/versions"
payload = { "definition": {
"input": {
"kind": "query",
"queryVersionId": "<string>"
},
"schemaVersion": 2,
"retentionDays": 1825,
"keyFieldIds": ["<string>"],
"destinationVersionId": "<string>",
"partitionFieldIds": ["<string>"],
"lookbackWindow": { "count": 123 },
"notificationPolicy": {
"onSuccess": False,
"onFailure": False,
"onSchemaDrift": False
},
"target": {},
"tableTargets": []
} }
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>",
"transferId": "<string>",
"versionId": "<string>",
"versionNumber": 123,
"versionStatus": "draft"
},
"replayed": false
}{
"data": {
"actorId": "<string>",
"canonicalHash": "<string>",
"transferId": "<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 data transfer
Manage schedules, transfers, destinations and import workflows.
POST
/
api
/
v2
/
metrics
/
transfers
/
{transferId}
/
versions
Create a version of a data transfer
curl --request POST \
--url https://app.chatobserver.com/api/v2/metrics/transfers/{transferId}/versions \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'x-chatobserver-key: <api-key>' \
--data '
{
"definition": {
"input": {
"kind": "query",
"queryVersionId": "<string>"
},
"schemaVersion": 2,
"retentionDays": 1825,
"keyFieldIds": [
"<string>"
],
"destinationVersionId": "<string>",
"partitionFieldIds": [
"<string>"
],
"lookbackWindow": {
"count": 123
},
"notificationPolicy": {
"onSuccess": false,
"onFailure": false,
"onSchemaDrift": false
},
"target": {},
"tableTargets": []
}
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'x-chatobserver-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
definition: {
input: {kind: 'query', queryVersionId: '<string>'},
schemaVersion: 2,
retentionDays: 1825,
keyFieldIds: ['<string>'],
destinationVersionId: '<string>',
partitionFieldIds: ['<string>'],
lookbackWindow: {count: 123},
notificationPolicy: {onSuccess: false, onFailure: false, onSchemaDrift: false},
target: {},
tableTargets: []
}
})
};
fetch('https://app.chatobserver.com/api/v2/metrics/transfers/{transferId}/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/transfers/{transferId}/versions"
payload = { "definition": {
"input": {
"kind": "query",
"queryVersionId": "<string>"
},
"schemaVersion": 2,
"retentionDays": 1825,
"keyFieldIds": ["<string>"],
"destinationVersionId": "<string>",
"partitionFieldIds": ["<string>"],
"lookbackWindow": { "count": 123 },
"notificationPolicy": {
"onSuccess": False,
"onFailure": False,
"onSchemaDrift": False
},
"target": {},
"tableTargets": []
} }
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>",
"transferId": "<string>",
"versionId": "<string>",
"versionNumber": 123,
"versionStatus": "draft"
},
"replayed": false
}{
"data": {
"actorId": "<string>",
"canonicalHash": "<string>",
"transferId": "<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