Skip to content
  • Auto
  • Light
  • Dark
Get Started

List

List
client.Users.List(ctx, query) (*ExpandedarrayListarrayNextPageTokenstringUserListResponse, error)
get/api/v1/users

List users.

Parameters
queryPageSizefieldPageTokenfieldUserListParams
Hide ParametersShow Parameters
PageSizefield
optional
param.Field[int64]

The pageSize field.

formatint32
PageTokenfield
optional
param.Field[string]

The pageToken field.

Returns
UserListResponsestruct

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

Hide ParametersShow Parameters
Expandedarray
optional

List of serialized related objects.

Hide ParametersShow Parameters
Typestring
optional

The type of the serialized message.

Listarray
optional
[]DelegatedUserPathstringDirectoriesPathstringManagersPathstringRolesPathstringUserC1APIUserV1UserUserView

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.

UserIDstringCreatedAtTimeDelegatedUserIDstringDeletedAtTimeDepartmentstringDepartmentSourcesarrayDirectoryIDsarrayDirectoryStatusC1APIUserV1UserDirectoryStatusDirectoryStatusSourcesarrayDisplayNamestringEmailstringEmailsarrayEmailSourcesarrayEmployeeIDsarrayEmployeeIDSourcesarrayEmploymentStatusstringEmploymentStatusSourcesarrayEmploymentTypestringEmploymentTypeSourcesarrayJobTitlestringJobTitleSourcesarrayManagerIDsarrayManagerSourcesarrayProfilemapRoleIDsarrayStatusC1APIUserV1UserStatusTypeC1APIUserV1UserTypeUpdatedAtTimeUsernamestringUsernamesarrayUsernameSourcesarrayC1APIUserV1User
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 Go
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := conductoronesdk.NewClient(
    option.WithAPIKey("My API Key"),
  )
  users, err := client.Users.List(context.TODO(), conductoronesdk.UserListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", users.Expanded)
}
200 Example
{
  "expanded": [
    {
      "@type": "@type"
    }
  ],
  "list": [
    {
      "user": {
        "delegatedUserId": "delegatedUserId",
        "roleIds": [
          "string"
        ],
        "status": "UNKNOWN"
      }
    }
  ],
  "nextPageToken": "nextPageToken"
}