Skip to Content

Self-Hosted APIs

Change your password

Change the password of the signed-in user on self-hosted Databrain.

POST
/api/v2/service-token/reset-password

The password changes for the user of the access token. Any signed-in user can change their own password.

curl --request POST https://databrain-api.example.com/api/v2/service-token/reset-password \  --header "Authorization: Bearer $ADMIN_ACCESS_TOKEN" \  --header "Content-Type: application/json" \  --data '{ "currentPassword": "<current password>", "password": "<new password>" }'

Before you start

Authorization

AdminJwt
headerAuthorizationBearer <JWT>

Self-hosted only: the admin JWT from Create admin JWT.

Body

currentPasswordstringrequired

The current password.

passwordstringrequired

The new password: at least 8 characters, with an upper-case letter, a lower-case letter, a number and a special character, and no spaces.

Response

{ "data": { "success": true } }

Sessions are not signed out. Access tokens you already have keep working until they expire.

Errors

Statuserror.codeWhy
400RESET_PASSWORD_ERRORThe new password is too weak, a field is missing, or The current password is not correct!
400LICENSE_EXPIREDThe licence key expired
401UNAUTHORIZEDNo access token was sent
500SELFHOSTED_APP_ERRORYou called it on Databrain cloud
500INTERNAL_SERVER_ERRORThe password was not changed
Example Request
curl -X POST 'https://databrain-api.example.com/api/v2/service-token/reset-password' \  -H 'Content-Type: application/json' \  -d '{  "currentPassword": "<current password>",  "password": "<new password>"}'
Example Response
{  "data": {    "success": true  }}