hierarchyUsers
Requires at least one of the permissions customers:customer:read, settings:user:read or users:user:read.
Users of a role tab, or the direct reports of a manager — with subtree stats. Needs the users read, user settings read or customers read permission.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query HierarchyUsers($input: HierarchyUsersInput!) {
hierarchyUsers(input: $input) {
hasNextPage
page
pageSize
totalCount
items {
name
firstName
lastName
managerName
status
avatar
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query HierarchyUsers($input: HierarchyUsersInput!) {\n hierarchyUsers(input: $input) {\n hasNextPage\n page\n pageSize\n totalCount\n items {\n name\n firstName\n lastName\n managerName\n status\n avatar\n }\n }\n}",
"variables": {
"input": {}
}
}
EOF
Variables:
{
"input": {}
}
Response:
{
"data": {
"hierarchyUsers": {
"hasNextPage": true,
"page": 0,
"pageSize": 0,
"totalCount": 0,
"items": [
{
"name": "string",
"firstName": "string",
"lastName": "string",
"managerName": "string",
"status": "string",
"avatar": "string"
}
]
}
}
}
hierarchyUsers(
input: HierarchyUsersInput!
): HierarchyUserPage!
Arguments
hierarchyUsers.input ● HierarchyUsersInput! non-null input
The details of the hierarchy users request.
Type
HierarchyUserPage object
A page of users.