POST
/
api
/
v2
/
datasource
/
sync
Sync Datasource
curl --request POST \
  --url https://api.usedatabrain.com/api/v2/datasource/sync \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "input.datasourceId": "<string>"
}'
{
  "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.datasourceId
string
required

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.
  • WORKSPACE_ID_ERROR: The workspace name provided does not exist.

Validation Schema

The request body must conform to the following schema:
  • workspaceName (required): Name of the workspace.
  • isPagination (optional): Boolean flag to enable pagination.
  • pageNumber (optional): Page number when pagination is enabled.