List persisted Doctor sessions for an assistant, newest first.
Sessions are scoped to the assistant identified by assistant_id (ownership/auth is enforced by _DoctorAPIView via self.get_object()). Results are ordered by last_message_at DESC NULLS LAST, -created so that the most recently active session appears first and sessions that have never received a message sink to the bottom (PostgreSQL defaults DESC to NULLS FIRST, which would otherwise float empty sessions above active ones). An annotated message_count is included on each row so list views do not need a per-row query to display the message tally.
Request
- The document declares no server URL.
- Auth: one of:
- HTTP bearer
- API key in cookie sessionid
- API key in header X-Session-Token
Path parameters
Query parameters
Number of results to return per page.
The initial index from which to return the results.
Headers
Required if using Cookie-based or X-Session-Token authentication methods.
Response
Example response
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100"
}Changes
No recorded changes to this operation across all 50 revisions of this API.