Skip to main content
POST
/
api
/
v2
/
datasource
/
sync
curl --request POST \
  --url https://api.usedatabrain.com/api/v2/datasource/sync \
  --header 'Authorization: Bearer dbn_live_abc123...' \
  --header 'Content-Type: application/json' \
  --data '{
    "input": {
      "datasourceId": "your-datasource-id"
    }
  }'
{
  "data": {
    "message": "Sync completed"
  }
}

Overview

The Databrain APIs provides endpoints to sync you Datasource in both Cloud Databrain and Selfhosted Databrain environment. To use the API, you need to pass a parameter datasourceId.

Self-hosted Databrain Endpoint

POST <SELF_HOSTED_URL>/api/v2/datasource/sync

Headers

Authorization
string
required
Bearer API TOKEN

Request Body

input
object
required
Input object containing the datasource configuration.
input.datasourceId
string
required
The unique identifier of the datasource to sync. You can find this in the URL query params on the datasource page.

Request Example

curl --request POST \
  --url https://api.usedatabrain.com/api/v2/datasource/sync \
  --header 'Authorization: Bearer dbn_live_abc123...' \
  --header 'Content-Type: application/json' \
  --data '{
    "input": {
      "datasourceId": "your-datasource-id"
    }
  }'

Response Body

{
  "data": {
    "message": "Sync completed"
  }
}
Get your datasourceId from the URL query params on the datasource page.

Error Codes

  • INVALID_REQUEST_BODY: The request body is invalid.
  • DATASOURCE_ID_ERROR: The datasource ID provided does not exist or is invalid.
I