Skip to content
You're viewing documentation for v2026.11.7-beta. It may be out of date.Go to latest
TimescaleDB Enterprise
Esc
↑↓navigate↵open⌘Jpreview

Change a user

A role change and a disable end the sessions of the user. An admin cannot disable the own account or lower the own role. The identity provider sets the role and the display name of an OIDC user: a change of them gets 409.

PATCH/api/v1/users/{id}
Authorization
tse_sessionAPI key · cookierequired
Path parameters
idstringrequired
Request body
requiredapplication/json
disabledboolean
display_namestring
rolestring

none, viewer, operator or admin

Responses
200

OK

created_atstring<date-time>required
disabledbooleanrequired
display_namestringrequired
idstringrequired
last_login_atstring<date-time>
must_change_passwordbooleanrequired
rolestringrequired

The default role. none: the user sees only the database services of the grants

Allowed:nonevieweroperatoradmin
service_grantsAuthMeServiceGrant[]required

The roles of the user on single database services

Show properties
Array of AuthMeServiceGrant
rolestringrequired
Allowed:vieweroperator
service_idstringrequired
sourcestringrequired

local: a username and a password. oidc: a user of the identity provider. The first SSO login adds the user, and each login sets the role from the claims

Allowed:localoidc
two_factorbooleanrequired

The user has confirmed TOTP two-factor authentication

updated_atstring<date-time>required
usernamestringrequired
default

Error

codestring

Stable code of the refusal, when the route has codes

detailsstring[]

Additional detail, e.g. per-field validation failures

errorstringrequired

Human-readable error message

Request
curl -X PATCH 'https://console.example.com/api/v1/users/string' \
  -H 'Cookie: tse_session=YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "disabled": true,
  "display_name": "string",
  "role": "string"
}'
Response
{
  "created_at": "2019-08-24T14:15:22Z",
  "disabled": true,
  "display_name": "string",
  "id": "string",
  "last_login_at": "2019-08-24T14:15:22Z",
  "must_change_password": true,
  "role": "none",
  "service_grants": [
    {
      "role": "viewer",
      "service_id": "string"
    }
  ],
  "source": "local",
  "two_factor": true,
  "updated_at": "2019-08-24T14:15:22Z",
  "username": "string"
}