curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/whitelist-domains' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": ["app.example.com", "*.customer.com", "localhost:3000"]
}
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/whitelist-domains' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": ["app.example.com", "*.customer.com", "localhost:3000"]
}
Retrieve or update the list of domains allowed to embed your data app (GET to list, PUT to update).
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/whitelist-domains' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": ["app.example.com", "*.customer.com", "localhost:3000"]
}
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/whitelist-domains' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": ["app.example.com", "*.customer.com", "localhost:3000"]
}
GET https://api.usedatabrain.com/api/v2/data-app/whitelist-domains
PUT https://api.usedatabrain.com/api/v2/data-app/whitelist-domains
Content-Type: application/json
{ "domains": ["app.example.com", "*.customer.com"] }
*.example.com), IPs with optional port, and localhost with optional port.Authorization header. See the data app creation guide and the API Token guide.
Authorization: Bearer dbn_live_abc123...
application/json.app.example.com)*.example.com)192.168.1.1 or 192.168.1.1:3000)localhost with optional port (e.g. localhost or localhost:8080)http:// or https://. Pass an empty array [] to clear all whitelisted domains.| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_DATA_APP_API_KEY | 400 | Missing or invalid data app API key |
INVALID_SERVICE_TOKEN | 400 | Invalid or expired token; cannot resolve company context |
INVALID_REQUEST_BODY | 400 | Invalid or malformed domains (e.g. protocol included, invalid format) |
INTERNAL_SERVER_ERROR | 500 | Unexpected server error |