Hi Cisco Experts, I’m running into the following issues while working with the Cisco API. I’ve done some investigation, but I’d like to confirm whether these are known API limitations or if there are additional steps I should take. Any guidance would be greatly appreciated
Issue 1 — Incomplete records: The agentSession API returns some activities with duration = -1 and endTime = -1. These appear while calls are active, but the values are never updated after the activity completes. Re-fetching the same data using wider time windows resolves approximately 70%, but 300+ records remain permanently incomplete.
Issue 2 — Missing records: The API completely omits activity records following hold, consult, or conference state transitions. Over a 20-day period, approximately 2.9% of tracked agent time (~2,898 hours) has no corresponding activity record. The timeline jumps between consecutive activities with nothing in between
Minimal reproducible example:
Step 1 — Query agentSession for a single day:
{
agentSession(
from: 1725148800000
to: 1725235200000
) {
agentSessions {
agentSessionId
agentName
channelInfo {
channelId
activities(first: 100) {
nodes {
id
state
startTime
endTime
duration
}
}
}
}
pageInfo { hasNextPage endCursor }
}
}
Step 2 — For any session involving a hold/consult, sort activities by startTime. You will see:
Activity 1: state=connected, startTime=T1, endTime=T2, duration=30000
Activity 2: state=wrapup, startTime=T5, endTime=T6, duration=15000
^^^ gap: T2 → T5 (hold/consult activities missing)
The hold and consult activities between T2 and T5 are not returned.
Step 3 — Query taskDetails for the same session's taskId:
{
taskDetails(
from: 1725148800000
to: 1725235200000
filter: { taskId: { equals: "<taskId_from_step2>" } }
) {
tasks {
taskId
connectedDuration
holdDuration
consultDuration
}
}
}
taskDetails correctly reports holdDuration > 0 and consultDuration > 0 for the same call — confirming the data exists server-side but agentSession fails to return the corresponding activity records.
Step 4 — Re-query agentSession with a wider window (e.g., 3-day instead of 1-day). The same endpoint now returns a different session set for the overlapping date
1-day window (from/to = Day X only): → 226 sessions, missing activities
3-day window (from/to = Day X-1 to X+1): → 445 sessions, some previously missing activities now appear his suggests an internal indexing or caching inconsistency in the agentSession endpoint.
What we've already tried:
1.Re-fetching with progressively wider time windows (2-day, 3-day, 4-day, 5-day) — recovers some -1 records but does not recover missing records
2.Activity-level pagination (first: 100, after: cursor) for sessions with >500 activities — works correctly but doesn't help since the missing records aren't returned at any page depth
3.Varying chunk sizes and overlapping windows — different windows return different session sets but the dropped activities remain absent regardless of window size
Evidence summary:
1.taskDetails returns complete data for the same sessions — records exist server-side
2.Affected preceding states: hold-done (75%), conference-transferred (14%), consult-done (3%)
Questions:
1.Is this a known limitation of the agentSession endpoint?
2.Are there any query parameters, filters, or pagination strategies that would return the complete activity set for sessions involving hold/consult/conference transitions?
3.Is there anything we can change in our query structure or approach to work around this?
4.Is a fix planned, or is the recommended approach to cross-reference with taskDetails for complete data?