Skip to main content
curl --request GET \
  --url https://api.usedatabrain.com/api/v2/datasource \
  --header 'Authorization: Bearer dbn_live_abc123...'
{
  "data": [
    {
      "name": "production-postgres"
    },
    {
      "name": "analytics-snowflake"
    },
    {
      "name": "warehouse-bigquery"
    }
  ]
}
GET
https://api.usedatabrain.com
/
api
/
v2
/
datasource
curl --request GET \
  --url https://api.usedatabrain.com/api/v2/datasource \
  --header 'Authorization: Bearer dbn_live_abc123...'
{
  "data": [
    {
      "name": "production-postgres"
    },
    {
      "name": "analytics-snowflake"
    },
    {
      "name": "warehouse-bigquery"
    }
  ]
}
Get a list of all datasources configured in your organization. Useful for managing datasources, verifying configurations, and identifying datasource names for use in other APIs.
This endpoint returns all datasources you have access to within your organization. The response includes only the datasource names for security reasons - full credentials are never returned.

Endpoint

GET https://api.usedatabrain.com/api/v2/datasource

Self-hosted Databrain Endpoint

GET <SELF_HOSTED_URL>/api/v2/datasource

Authentication

This endpoint requires a service token in the Authorization header. Service tokens differ from data app API keys and provide organization-level permissions. To access your service token:
  1. Go to your Databrain dashboard and open Settings.
  2. Navigate to Settings.
  3. Find the Service Tokens section.
  4. Click the “Generate Token” button to generate a new service token if you don’t have one already. Use this token as the Bearer value in your Authorization header.

Headers

Authorization
string
required
Bearer token for API authentication. Use your API key from the data app.
Authorization: Bearer dbn_live_abc123...

Query Parameters

isPagination
string
default:"false"
Enable pagination for the results. Pass "true" to enable pagination with a limit of 10 datasources per page.Note: Query parameters are passed as strings. Use "true" or "false" (not boolean values).
pageNumber
string
default:"1"
Page number to retrieve (1-based). Only used when isPagination is "true". Must be a numeric string (e.g., "1", "2", "3").

Response

data
array
Array of datasource objects. Each object contains only the datasource name for security reasons.
data.name
string
The name of the datasource. This name can be used in other APIs to reference the datasource.
error
null
Error field, null when successful. Not included in successful responses.

Examples

Error Codes

Error CodeHTTP StatusDescription
INVALID_REQUEST_BODY400Invalid pagination parameters
AUTHENTICATION_ERROR401Invalid or missing service token
INTERNAL_SERVER_ERROR500Server error occurred

Next Steps