Download OpenAPI specification:Download
Use the long format with timezone for passing ISO-8601 dates. The following formats are accepted:
Errors are always returned as an array of objects in the top-level "errors" property.
For bulk operations you may have "errors" and "data" properties at the same time since some objects may have errors while others may not. Bulk errors are aggregated which means there won't be an error for each instance of an error but one error for each type of error with the number of occurrences and some examples of line numbers or ids.
{
"errors": [
{
"code": "YOU_CAN_CHECK_THIS_IN_CODE",
"detail": "This explains the error",
"meta": {
"context_property_example": "value_example",
"error_count": 3,
"line_numbers": [34, 45],
"ids": [
"c9017b85-8016-4f13-88b4-18d57c67b866",
"12e0c3cb-7e8d-462f-9232-f7c61a900738"
]
}
}
]
"data": {
"accepted_object_count": 4,
"rejected_object_count": 3
}
}
Error objects have the following properties
Property | Type | Required | Description |
---|---|---|---|
code | string | true | Always present and contains error code that can be checked programmatically |
detail | string | true | Human readable message that explains the problem. You should not check the value of this property programmatically because it may change |
meta | object | false | Error specific object that contains details about what generated the error |
This authenticate user to use the API You MUST send the token for each request in the Authorization header. The token MUST be preceeded by Bearer.
GET https://api.commander1.com/v2/{siteId}/users HTTP/1.1
Host: api.commander1.com
Authorization: Bearer {mySecretToken}
You should replace "{mySecretToken}" in example with your Token.
You should replace "{siteId}" in example with your Site ID.
Security Scheme Type | HTTP |
---|---|
HTTP Authorization Scheme | bearer |
Bearer format | "JWT" |
This authenticate Data Account to use the API The API uses Token to authenticate its user. You MUST send the token for each request in the Authorization header. The token MUST be preceeded by Bearer.
GET https://api.commander1.com/v2/{siteId}/users HTTP/1.1
Host: api.commander1.com
Authorization: Bearer {mySecretToken}
You should replace "{mySecretToken}" in example with your Token.
You should replace "{siteId}" in example with your Site ID.
Security Scheme Type | HTTP |
---|---|
HTTP Authorization Scheme | bearer |
Bearer format | "JWT" |
http GET https://api.commander1.com/v2/REPLACE_SITEID/source-categories \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "id": "1",
- "type": "source-category",
- "attributes": {
- "label": "Advertising",
- "position": 3,
- "types": [
- "destination",
- "source"
]
}, - "relationships": {
- "templates": {
- "data": {
- "type": "integration-templates",
- "id": "1"
}
}
}
}
}
List Catalog Sources
include | Array of strings Items Value: "categories" Example: include=categories
|
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/source-catalog?include=SOME_ARRAY_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": {
- "id": "1",
- "type": "source-template",
- "attributes": {
- "label": "Javascript SDK",
- "icon": "//staticplatform.commandersact.com//bundles/data/connectors/icons/js.png",
- "template": "javascript",
- "trigger_type": "web"
}, - "relationships": {
- "categories": {
- "data": {
- "type": "integration-categories",
- "id": "1"
}
}
}, - "included": [
- {
- "type": "integration-category",
- "id": "6",
- "attributes": {
- "label": "Advertising",
- "position": 3,
- "types": [
- "destination",
- "source"
]
}
}
]
}
}
List Sources
include | Array of strings Items Enum: "connector" "environment" "health" Example: include=connector,environment,health
|
http GET 'https://api.commander1.com/v2/REPLACE_SITEID/sources?include=SOME_ARRAY_VALUE' \ Authorization:'Bearer REPLACE_BEARER_TOKEN'
{- "data": [
- {
- "id": 1,
- "type": "integrations",
- "attributes": {
- "label": "Javascript SDK",
- "occurence_type": "continuous",
- "start_date": null,
- "end_date": null,
- "timezone": "Europe/Paris",
- "data_range_type": null,
- "data_last": null,
- "data_start_date": null,
- "data_end_date": null,
- "last_request_at": null,
- "next_request_at": null,
- "last_run_at": null,
- "created": null,
- "updated": null,
- "cron": null,
- "deleted_at": null,
- "parameters": null,
- "health": {
- "total": 25583,
- "success": {
- "immediate": {
- "total": 23222,
- "increase_rate": -0.07
}, - "retry": {
- "total": 0,
- "increase_rate": null
}
}, - "fail": {
- "rejected": {
- "total": 2361,
- "increase_rate": -0.17
}, - "error": {
- "total": 0,
- "increase_rate": null
}
}, - "trends": {
- "success": {
- "dataset": [
- [
- "dateTime",
- "success"
], - [
- 1647298800000,
- 733
]
]
}, - "fail": {
- "dataset": [
- [
- "dateTime",
- "fail"
], - [
- 1647298800000,
- 0
]
]
}
}
}, - "integration_key": "93a58286-69ae-4c20-8200-7398b96739ed",
- "status": "active"
}, - "relationships": {
- "connector": {
- "data": {
- "type": "dms/connector",
- "id": "98"
}
}, - "environment": {
- "data": {
- "type": "integration-environments",
- "id": "1"
}
}
}
}
]
}
Create Source
object |
{- "data": {
- "type": "platform/integrations",
- "attributes": {
- "label": "Javascript SDK",
- "occurence_type": "continuous",
- "start_date": null,
- "end_date": null,
- "timezone": "Europe/Paris",
- "data_range_type": null,
- "data_last": null,
- "data_start_date": null,
- "data_end_date": null,
- "last_request_at": null,
- "next_request_at": null,
- "last_run_at": null,
- "created": null,
- "updated": null,
- "cron": null,
- "deleted_at": null,
- "parameters": null,
- "health": {
- "total": 25583,
- "success": {
- "immediate": {
- "total": 23222,
- "increase_rate": -0.07
}, - "retry": {
- "total": 0,
- "increase_rate": null
}
}, - "fail": {
- "rejected": {
- "total": 2361,
- "increase_rate": -0.17
}, - "error": {
- "total": 0,
- "increase_rate": null
}
}, - "trends": {
- "success":