Skip to Content

Data App CRUD

Update a data app

Rename a data app, or choose which organizations its customers may import dashboards from.

PUT
/api/v2/data-app
curl --request PUT https://api.usedatabrain.com/api/v2/data-app \  --header "Authorization: Bearer $DATABRAIN_SERVICE_TOKEN" \  --header "Content-Type: application/json" \  --data '{ "name": "Customer portal", "updateName": "Customer portal EU" }'

Auth

A service token. See Authentication.

Authorization

ServiceToken
headerAuthorizationBearer <token>

A service token. A data app API token is refused.

Body

Send name and at least one of updateName or allowedImportSources.

namestringrequired

The data app's current name.

The new name. Databrain does not check that it is unique, so pick one no other data app has.

Organization ids whose dashboard exports this data app's customers may import. Up to 50, each 1 to 200 characters. Replaces the list. [] empties it.

Max items: 50

Embeds and API tokens stay with the data app when you rename it. Use the new name in later calls.

Response

{ "name": "Customer portal EU" }

When you send allowedImportSources, the response has it too.

Errors

Statuserror.codeWhy
400INVALID_REQUEST_BODYA field is missing or wrong
400DATA_APP_NOT_FOUNDNo data app has this name
403AUTHENTICATION_ERRORYou used a data app API token
500INTERNAL_SERVER_ERRORThe update failed

For errors that every endpoint returns, see Authentication.

Example Request
curl -X PUT 'https://api.usedatabrain.com/api/v2/data-app' \  -H 'Content-Type: application/json' \  -d '{  "name": "Customer portal",  "updateName": "Customer portal EU"}'
Example Response
{  "name": "Customer portal EU",  "allowedImportSources": [    "org-id-1"  ]}