Skip to content

Fix SessionResource to use flat /AgentSession endpoints#3

Open
samuellawerentz wants to merge 1 commit intoplivo:mainfrom
samuellawerentz:ser-4434
Open

Fix SessionResource to use flat /AgentSession endpoints#3
samuellawerentz wants to merge 1 commit intoplivo:mainfrom
samuellawerentz:ser-4434

Conversation

@samuellawerentz
Copy link

Summary

  • Align SDK SessionResource with backend's flat /v1/AgentSession routes (was incorrectly using nested /Agent/{uuid}/Session paths that don't exist)
  • list() no longer requires agent_uuid — use agent_id as an optional filter param instead, matching AgentResource.list() pattern
  • get() takes only session_id, no agent_uuid needed
  • Document all backend query filters: agent_id, agent_mode, call_uuid, phone_number, date/duration ranges

Test plan

  • Existing session list/get tests updated to flat endpoints
  • New test_session_list_with_filters verifies filter params are passed through
  • All 21 tests pass

Fixes SER-4434

…end API

The backend uses account-scoped /v1/AgentSession routes, not nested
/Agent/{uuid}/Session. Align the SDK: list() no longer requires agent_uuid
(use agent_id filter param instead), get() takes only session_id, and all
backend filters (phone_number, call_uuid, date/duration ranges) are documented.

Fixes SER-4434
@samuellawerentz samuellawerentz marked this pull request as ready for review March 17, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant