Saltar a la navegación

List users for an account.

Lists the users that have a role in an account, or in one of its environments.

Permissions: with environment, the caller needs the envDev role or higher on that environment.

  • API keys: environment is required. An API key always acts as envDev on the environment it belongs to, so it can only list that environment. Without environment it gets 403.
  • Dashboard users: without environment, the caller needs accountAdmin on the account; otherwise the API answers 403.

Pagination: results are paginated. If you don’t send limit, only the first 50 users are returned. Use count to know the total and page with skip and limit. There is no maximum limit.

Filters are plain query parameters (?environment=...&limit=100), not a JSON filter object.

Autenticación

x-api-keystring
Autenticación con clave API vía encabezado

Parámetros de consulta

accountstringOpcional
Account to list users for. Defaults to the caller's account.
environmentstringOpcional

Only list users with access to this environment: users with a role on the environment, plus account admins. Required when calling with an API key, and it must be the environment the key belongs to.

roleenumOpcional

Only list users with this role. Any other value answers 400.

Valores permitidos:
sortstringOpcional

Field to sort users by. Prefix with - for descending order (e.g., -creation for newest first). Without it, the order is not guaranteed.

skipintegerOpcional>=0Valor predeterminado: 0

(List pagination element) number of users to skip from the start of the list.

limitintegerOpcional>=1Valor predeterminado: 50

(List pagination element) number of users to return, starting at skip. Defaults to 50. There is no maximum. 0 or a non-numeric value returns an empty result.

Respuesta

A list of users. count is the total number of matching users, not the number returned in result.

countintegerOpcional
resultlist of objectsOpcional

Errores

403
Forbidden Error