hierarchyRoleTabs
Requires at least one of the permissions customers:customer:read, settings:user:read or users:user:read.
Top-level role tabs (display roles with counts), scoped to what the caller may see. Optional search (name/email/phone) and status narrow the counts while the tab set stays stable. 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 HierarchyRoleTabs {
hierarchyRoleTabs {
role
userCount
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query HierarchyRoleTabs {\n hierarchyRoleTabs {\n role\n userCount\n }\n}"
}
EOF
Response:
{
"data": {
"hierarchyRoleTabs": [
{
"role": "string",
"userCount": 0
}
]
}
}
hierarchyRoleTabs(
search: String
status: String
): [HierarchyRoleTab!]!
Arguments
hierarchyRoleTabs.search ● String scalar
Text to search for.
hierarchyRoleTabs.status ● String scalar
Only users with this status.
Type
HierarchyRoleTab object
One top-level role tab, for example Manager, Sub Admin or Sales Rep.