List Sessions
GET /sessions?subject_kind= + ?subject_id= are what lets a multi-person workspace list its
own threads instead of the whole campo’s (annex 01 §5.1: a session belongs to whoever it
is about, and a listing that ignores that hands the peón the patrón’s conversations).
Filtered server-side, before paginate runs, following the precedent
list_run_events set for ?type= (D-571, D-628): a filter applied to a page already
fetched hides every match that fell outside that page, and an unpaginated caller would
never notice because the first page usually looks right. ix_session_subject covers
the pair. An unrecognized subject_kind is a 422 from the enum, the same rule
list_run_events documents for ?type= — a silently empty page and “that kind does
not exist” are different answers.
The two are independent, matching GET /knowledge-bases’ subject_kind/subject_id
pair: subject_kind alone narrows to “every user, across ids” for an operator triaging a
kind of subject, and either alone is still a real, if broad, filter.
Parameters
Section titled “Parameters”| Name | In | Type | Notes | |
|---|---|---|---|---|
agent_id | query | string (uuid) | null | optional | — |
subject_kind | query | user | guest | null | optional | — |
subject_id | query | string | null | optional | max length 200 |
limit | query | integer | optional | Default 50. min 1 max 200 |
cursor | query | string | null | optional | — |
offset | query | integer | null | optional | min 0 |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
200 | Successful Response | Page_SessionView_ |
422 | Validation Error | HTTPValidationError |
Example
Section titled “Example”curl -X GET https://your-deployment.example.com/sessions \ -H "Authorization: Bearer $COBRE_TOKEN"Response — Page_SessionView_
Section titled “Response — Page_SessionView_”| Field | Type | Notes | |
|---|---|---|---|
items | SessionView[] | required | — |
next_cursor | string | null | optional | — |
total | integer | null | optional | — |