Skip to content
gist.link ↗

workforces

Query Agent Workforce API — POST https://agentworkforce.api.gist.link/graphql

Workforces in the caller’s organization.

agentworkforce:query:workforces

The calling IAM key must hold this permission (or a wildcard that covers it: agentworkforce:query:* or agentworkforce:*) and the access token must have been minted with audience=agentworkforce. See Permissions.

type Query {
workforces(filter: WorkforceFilter, first: Int, after: String): WorkforceConnection!
}
Argument Type Required Description
filter WorkforceFilter No —
first Int No —
after String No —

WorkforceConnection! — see the Agent Workforce types reference.

Terminal window
curl https://agentworkforce.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "query Workforces($filter: WorkforceFilter, $first: Int, $after: String) { workforces(filter: $filter, first: $first, after: $after) { totalCount edges { cursor node { uuid name status } } } }",
"variables": {
"filter": {
"search": "example",
"includeArchived": true
},
"first": 10,
"after": "cursor"
}
}
JSON