Skip to content
gist.link ↗

agentSessions

Query Deploy API — POST https://deploy.api.gist.link/graphql

All agent sessions on a project, newest first. Any org member.

deploy:query:agentSessions

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

type Query {
agentSessions(projectId: Int!): [AgentSession!]!
}
Argument Type Required Description
projectId Int! Yes —

[AgentSession!]! — see the Deploy types reference.

Terminal window
curl https://deploy.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "query AgentSessions($projectId: Int!) { agentSessions(projectId: $projectId) { id uuid status created_at updated_at } }",
"variables": {
"projectId": 10
}
}
JSON