Sessions
Get a session
Returns one session.
Required permission: sessions:read
GET
/
api
/
v1
/
sessions
/
{id}
Get a session
curl --request GET \
--url https://api.igrisecurity.com/api/v1/sessions/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.igrisecurity.com/api/v1/sessions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.igrisecurity.com/api/v1/sessions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"id": "9c3e5f10-0000-4000-8000-000000000003",
"serverId": "github-prod",
"connectionSlug": "github-prod",
"agentId": null,
"userId": "alice@company.com",
"status": "suspended",
"toolCallsCount": 12,
"startedAt": "2026-01-01T00:00:00Z",
"suspendedAt": "2026-01-01T00:30:00Z",
"suspendedReason": "Manual suspension",
"endedAt": null
}
}{
"error": "Unauthorized"
}{
"error": "Forbidden",
"required": "policies:write"
}{
"error": "Not found"
}⌘I
Get a session
curl --request GET \
--url https://api.igrisecurity.com/api/v1/sessions/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.igrisecurity.com/api/v1/sessions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.igrisecurity.com/api/v1/sessions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"id": "9c3e5f10-0000-4000-8000-000000000003",
"serverId": "github-prod",
"connectionSlug": "github-prod",
"agentId": null,
"userId": "alice@company.com",
"status": "suspended",
"toolCallsCount": 12,
"startedAt": "2026-01-01T00:00:00Z",
"suspendedAt": "2026-01-01T00:30:00Z",
"suspendedReason": "Manual suspension",
"endedAt": null
}
}{
"error": "Unauthorized"
}{
"error": "Forbidden",
"required": "policies:write"
}{
"error": "Not found"
}