Users

List users

Returns a list of users in the organization. Filtering is available via query parameters.

  • Rate limit: 100 requests per minute
get/users

Request

  • Base URL
    https://api.toriihq.com/v1.0
  • Auth
    API key in header Authorization

Query parameters

emailstring

Email address

lifecycleStatus'active' | 'offboarding' | 'offboarded'

Lifecycle status

isDeletedInIdentitySourcesboolean

true if the user has left the organization, false otherwise

isExternalboolean

true if the user is external, false otherwise

firstNamestring
lastNamestring
idUsersstring

A comma separated list of idUser with a maximum of 50 IDs.

sortstring

A comma-seperated list of fields to sort by, with a postfix with either ':asc' or ':desc'. Fields can either be general, or custom to your organization

sizeinteger

The max amount of results to return

cursorstring

A base64 string indicating the offset from which to start. <br>Pass the value of nextCursor returned from the previous call to get the next set of results

aggsstring

JSON string representing aggregation configuration. Structure: '{"field":"string","aggregationType":"metric|groupBy|date_range|date_histogram","options":{"size":"integer","sort":{"field":"string","order":"desc|asc","aggFunc":"total|sum|avg|max|min"},"metricFunction":"total|sum|avg|max|min","dateHistogramOptions":{"datePeriod":"hourly|daily|weekly|monthly|quarterly|yearly","hardBounds":{"min":"string","max":"string"},"extendedBounds":{"min":"string","max":"string"},"filterEmptyBuckets":"boolean"}},"aggs":{"field":"string","aggregationType":"metric|groupBy|date_range|date_histogram","options":{"metricFunction":"total|sum|avg|max|min"}}}'. metricFunction is REQUIRED when aggregationType is "metric". For aggregationType "date_histogram", options.dateHistogramOptions is REQUIRED and datePeriod, hardBounds, extendedBounds and filterEmptyBuckets all live INSIDE it — putting them directly on options is rejected with 400 "options.dateHistogramOptions" is required. The nested "aggs" is OPTIONAL and, when present, must be a JSON OBJECT with this same structure — never a JSON-encoded string.

fieldsstring

List of fields to return for each user.<br>Allowed fields: idOrg, firstName, lastName, email, creationTime, idRole, lifecycleStatus, isDeletedInIdentitySources, isExternal, activeAppsCount, role, additionalEmails and all fields from /users/fields. id and additionalEmails are always returned.

qstring

The query to search

qFieldsstring

A comma-seperated list of fields the query to search applies to. Fields can either be general, or custom to your organization

view'currentEmployees' | 'pastEmployees' | 'allEmployees' | 'currentUsers' | 'pastUsers' | 'allUsers' | 'currentNonHumanUsers' | 'pastNonHumanUsers' | 'allNonHumanUsers' | 'externalUsers'

The view to use

filtersstring

Filters expression — accepts either shape: (1) Flat array of filter objects, AND-combined. Each item is {key, op, value}. (2) Array of filter groups, OR-combined. Each item is {id, filters} where filters is a flat array. See *_fields_metadata for valid keys and per-filterType operators. Omit value for isSet/isNotSet/relativeDateToday/exists/notExists. Use an array value for anyOf/allOf/noneOf/isExactly. Sent on the wire as a JSON-encoded string.

Response

Users

aggregationsnumber
countinteger

The number of results returned in this response

totalinteger

The total number of results

nextCursorstring

A base64 string indicating the offset from which to start. <br>Pass the value of nextCursor returned from the previous call to get the next set of results

Example response

{
  "users": [
    {
      "id": 1000,
      "idOrg": 1000,
      "firstName": "Tony",
      "lastName": "Tony",
      "email": "tony@stark.com",
      "creationTime": "2020-01-01T00:00:00.000Z",
      "idRole": 1,
      "role": "Admin",
      "lifecycleStatus": "active",
      "isDeletedInIdentitySources": true,
      "isExternal": true,
      "activeAppsCount": 1,
      "additionalEmails": [
        "tony@stark.com"
      ]
    }
  ],
  "count": 100,
  "total": 1000,
  "nextCursor": "WzE0NjM1Mzg4NTcsIjY1NDMyMyJd"
}

Changes

No recorded changes to this operation across all 1 revision of this API.