Get user

Description

Get user specified user.This function is only available to administrators.

Request

GET /v1/users/:user

Response

Successful response contains the following JSON formated body:

{
  userId: string,
  name?: string,
  email: string,
  isAdmin: boolean,
  isEnterprise: boolean,
  actions: string[],
  tags: {
    [key: string]: string
  },
  organizationsQuota: {
    name: string,
    value: number
  },
  termsRevision: string,
  dateOfConsent: string,
  organizations: {
    organizationId: string,
    organizationName: string
  }[]
}

Response Status codes:

  • 200 on success

  • 403 if not administrator

Request headers

This request must have the following headers:

  • Authorization: bearer <ApiKey>

Example

Request

curl "https://api.cloud.nabto.com/v1/users/:user" \
  -H "Authorization: Bearer <ApiKey>"

Response

{
   userId: "us-abcdefgh",
  name: "friendly name",
  email: "foo@bar.baz",
  isAdmin: true,
  isEnterprise: true,
  actions:[ "nabto5:write",
  ...],
  tags: {
    "foo": "bar" 
  },
  organizationsQuota: {
     name: "friendly name",
    value: 42 
  },
  termsRevision: "<termsRevision>",
  dateOfConsent: "<dateOfConsent>",
  organizations: [{
     organizationId: "or-lmnopqrs",
    organizationName: "friendly name" 
  },
  ...]
}