Authentication
Check embed access
Find out if your plan lets you create embeds and guest tokens, before you try.
GET
Call this before you create a data app, an embed or a guest token. It changes nothing.
curl https://api.usedatabrain.com/api/v2/data-app/embed-access \ --header "Authorization: Bearer $DATABRAIN_SERVICE_TOKEN"Auth
A service token or a data app API token. See Authentication.
ApiTokenheader
AuthorizationBearer <token>A service token or a data app API token.
Response
Your plan includes embedding:
{ "embed": true }Your plan does not include embedding. The status is 403:
{ "error": { "code": "entitlement_required", "message": "Embedding needs the Enterprise plan. This workspace is on Team.", "capability": "embed", "currentPlan": "team", "requiredPlan": "enterprise" }}| Field | Type | Description |
|---|---|---|
capability | string | Always embed |
currentPlan | string or null | Your plan: solo, team, business or enterprise |
requiredPlan | string or null | The plan that includes embedding. null means no plan includes it and Databrain must turn it on for you |
Embedding is on the Enterprise plan, on a trial, and on self-hosted. Databrain can also turn it on for your organization.
Errors
| Status | error.code | Why |
|---|---|---|
| 403 | entitlement_required | Your plan does not include embedding |
| 503 | entitlement_check_unavailable | Databrain could not check your plan. Try again |
For errors that every endpoint returns, see Authentication.
curl -X GET 'https://api.usedatabrain.com/api/v2/data-app/embed-access'Example Response
{ "embed": true}