usage

List phone sessions with cost

Paginated, filterable list of the caller's phone sessions over a required time window (start_date/end_date), each row carrying billing detail: phone-time cost, inference cost, and combined total in microdollars, billing processing status, and allocation source. Filters: session status, billing processing status, workflow, allocation source, free-text search. Order with order_by ('<field> <asc|desc>').

get/usage/sessions

Query parameters

start_datestring date-time required

Beginning of the sessions query window (RFC 3339).

Beginning of the sessions query window (RFC 3339).

end_datestring date-time required

End of the sessions query window (RFC 3339).

End of the sessions query window (RFC 3339).

limitinteger

Number of sessions per page (1-100).

Number of sessions per page (1-100).

offsetinteger

Pagination offset.

Pagination offset.

session_status_filterstring[] nullable

Restrict results to the given session lifecycle statuses.

Restrict results to the given session lifecycle statuses.

processed_status_filterstring[] nullable

Restrict results to the given billing processing statuses.

Restrict results to the given billing processing statuses.

workflow_idstring

Restrict results to sessions of a single workflow.

Restrict results to sessions of a single workflow.

allocated_bystring[] nullable

Restrict results to the given allocation sources.

Restrict results to the given allocation sources.

searchstring

Filter by session, workflow, or phone id substring.

Filter by session, workflow, or phone id substring.

order_bystring

Sort expression '<field> <asc|desc>'; field one of allocated_at, deallocated_at, duration, cost_microdollars, session_status, processed_status, allocated_by, session_id, workflow_id. Defaults to allocated_at desc.

Sort expression '<field> <asc|desc>'; field one of allocated_at, deallocated_at, duration, cost_microdollars, session_status, processed_status, allocated_by, session_id, workflow_id. Defaults to allocated_at desc.

Response

OK

$schemastring uri

A URL to the JSON Schema for this object.

limitinteger required

Page size used for this response.

offsetinteger required

Pagination offset used for this response.

totalinteger required

Total number of sessions matching the query.

Example response

{
  "$schema": "/api/v1/UsageSessionsResponse.json"
}

Changes