Get a User

Get a specific user by id. When using a developer token, you'll be able to access all users in the database. When using a user token, you'll only be able to access your own user.

Get User Request
cURL
GET- /workspaces/:workspaceSlug/databases/:databaseName/users/:userId
curl 'https://api.thenile.dev/workspaces/<string>/databases/<string>/users/<string>' \
--header 'Authorization: Bearer <string>'

The response includes all user information. The tenants array contains the ids of all tenants the user is a member of.

Get User Response
200
{
  "id": "018b6216-27a1-7e2b-aa83-67d7ba500982",
  "tenants": [
    "018b61ec-af9e-77e5-b27f-77239cd4a0bc"
  ],
  "email": "an.important.user@mail.tld",
  "name": "Important User",
  "givenName": null,
  "familyName": null,
  "picture": null
}