Skip to content
  • Auto
  • Light
  • Dark
Get Started

List

List
client.users.list(UserListParamsquery?, RequestOptionsoptions?): expandedunionlistunionnextPageTokenstringUserListResponse
get/api/v1/users

List users.

Parameters
querypage_sizenumberpage_tokenstringUserListParams
Hide ParametersShow Parameters
page_sizenumber
optional

The pageSize field.

formatint32
page_tokenstring
optional

The pageToken field.

Returns
UserListResponse

The UserServiceListResponse message contains a list of results and a nextPageToken if applicable.

Hide ParametersShow Parameters
expandedunion
optional
Array<Expanded> | null

List of serialized related objects.

Hide ParametersShow Parameters
@typestring
optional

The type of the serialized message.

listunion
optional
Array<delegatedUserPathstringdirectoriesPathstringmanagersPathstringrolesPathstringuserC1APIUserV1UserUserView> | null

The list of results containing up to X results, where X is the page size defined in the request

Hide ParametersShow Parameters
delegatedUserPathstring
optional

JSONPATH expression indicating the location of the user objects of delegates of the current user in the expanded array.

directoriesPathstring
optional

JSONPATH expression indicating the location of directory objects in the expanded array.

managersPathstring
optional

JSONPATH expression indicating the location of the user objects that managed the current user in the expanded array.

rolesPathstring
optional

JSONPATH expression indicating the location of the roles of the current user in the expanded array.

useridstringcreatedAtstringdelegatedUserIdstringdeletedAtstringdepartmentstringdepartmentSourcesuniondirectoryIdsuniondirectoryStatusuniondirectoryStatusSourcesuniondisplayNamestringemailstringemailsunionemailSourcesunionemployeeIdsunionemployeeIdSourcesunionemploymentStatusstringemploymentStatusSourcesunionemploymentTypestringemploymentTypeSourcesunionjobTitlestringjobTitleSourcesunionmanagerIdsunionmanagerSourcesunionprofileRecord<string, unknown>roleIdsunionstatusuniontypeunionupdatedAtstringusernamestringusernamesunionusernameSourcesunionC1APIUserV1User
optional

The User object provides all of the details for an user, as well as some configuration.

nextPageTokenstring
optional

The nextPageToken is shown for the next page if the number of results is larger than the max page size. The server returns one page of results and the nextPageToken until all results are retreived. To retrieve the next page, use the same request and append a pageToken field with the value of nextPageToken shown on the previous page.

Request example TypeScript
import ConductoroneSDK from 'conductorone-sdk';

const client = new ConductoroneSDK({
  apiKey: 'My API Key',
});

const users = await client.users.list();

console.log(users.expanded);
200 Example
{
  "expanded": [
    {
      "@type": "@type"
    }
  ],
  "list": [
    {
      "user": {
        "delegatedUserId": "delegatedUserId",
        "roleIds": [
          "string"
        ],
        "status": "UNKNOWN"
      }
    }
  ],
  "nextPageToken": "nextPageToken"
}