GetAgentActivitySessions
GET
/api/reports/agent-activity/sessions
const url = 'https://example.com/api/reports/agent-activity/sessions';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/reports/agent-activity/sessions \ --header 'Authorization: Bearer <token>'Authorizations
Section intitulée « Authorizations »Parameters
Section intitulée « Parameters »Query Parameters
Section intitulée « Query Parameters »from
string format: date-time
to
string format: date-time
projects
string
users
string
clients
string
tags
string
tasks
string
description_contains
string
origins
string
cursor
string
limit
integer format: int32
agentSessionId
string
Responses
Section intitulée « Responses »OK
Media typeapplication/json
object
data
Array<object>
object
userId
string format: uuid
userDisplayName
string
agentSessionId
string
agentName
string
projects
Array<object>
object
projectId
string format: uuid
name
string
color
string
firstStartedAt
string format: date-time
lastStoppedAt
string format: date-time
segmentCount
integer format: int32
delegatedCount
integer format: int32
sessionSeconds
integer format: int64
notCountedSessionSeconds
integer format: int64
delegatedSeconds
integer format: int64
tokens
object
inputTokens
integer format: int64
outputTokens
integer format: int64
cacheCreationTokens
integer format: int64
cacheReadTokens
integer format: int64
totalTokens
integer format: int64
worstUsageQuality
integer format: int32
page
object
next_cursor
string
has_more
boolean
Example
{ "data": [ { "worstUsageQuality": 0 } ]}Bad Request
Media typeapplication/problem+json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
errors
object
key
additional properties
Array<string>
key
additional properties
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "errors": { "additionalProperty": [ "example" ] }}