Request Models
Data structures for requests and sessions — retrieving and deleting requests.
RequestmodelRepresents a container for one or more interactions in a session.
| Prop | Type |
|---|---|
request_id | string |
user_id | string |
created_at | integer |
source | string |
agent_version | string |
session_id | string |
evaluation_only | boolean |
retrieval_experiment_id | string |
retrieval_experiment_arm | "treatment" | "holdout" |
RequestDatamodelContains a request with its associated interactions.
| Prop | Type |
|---|---|
request | Request |
interactions | array[Interaction] |
SessionmodelGroups multiple requests by session identifier.
| Prop | Type |
|---|---|
session_id | string |
requests | array[RequestData] |
GetRequestsRequestrequest modelRequest model for getting requests grouped by session.
| Prop | Type |
|---|---|
user_id | string |
request_id | string |
session_id | string |
source | string |
start_time | datetime |
end_time | datetime |
top_k | integer |
offset | integer |
GetRequestsResponseresponse modelResponse model for getting requests.
| Prop | Type |
|---|---|
success | boolean |
sessions | array[Session] |
has_more | boolean |
msg | string |
DeleteRequestRequestrequest modelRequest model for deleting a request and all its associated interactions.
| Prop | Type |
|---|---|
request_id | string |
DeleteRequestResponseresponse modelResponse model for request deletion requests.
| Prop | Type |
|---|---|
success | boolean |
message | string |
DeleteSessionRequestrequest modelRequest model for deleting all requests in a session.
| Prop | Type |
|---|---|
session_id | string |
DeleteSessionResponseresponse modelResponse model for session deletion requests.
| Prop | Type |
|---|---|
success | boolean |
message | string |
deleted_requests_count | integer |
SetSessionOutcomeRequestrequest modelRecords an optional external success, failure, or unknown outcome for an existing session. The server derives user_id and source from the earliest request ordered by (created_at, request_id); callers cannot override either field.
| Prop | Type |
|---|---|
session_id | string |
outcome | "success" | "failure" | "unknown" |
occurred_at | integer |
label | string |
value | number |
metadata | object |
SetSessionOutcomeResponseresponse model| Prop | Type |
|---|---|
success | boolean |
recorded | boolean |
reason | SessionOutcomeFailureReason |
message | string |
user_id | string |
source | string |
outcome_id | string | null |
outcome_revision | integer | null |
outcome_contract_digest | string | null |
finalized_trajectory_digest | string | null |
For a canonical row, an exact retry must match the caller payload, outcome contract, and canonical trajectory. It returns the same identity fields with success=true and recorded=false. A mismatch returns success=false, recorded=false, and reason="conflicting_finalization"; it does not replace the first outcome.
A rolling-upgrade row whose four identity fields are all null still compares the caller payload and any available server-derived session context, but it cannot compare the absent contract or trajectory digests. An accepted retry preserves all four identity fields as null. A changed payload or available session context returns conflicting_finalization.
SessionOutcomeRecordmodel| Prop | Type |
|---|---|
outcome_id | string | null |
outcome_revision | integer | null |
user_id | string |
session_id | string |
outcome | "success" | "failure" | "unknown" |
occurred_at | integer |
source | string |
label | string |
value | number |
metadata | object |
outcome_contract_digest | string | null |
finalized_trajectory_digest | string | null |
created_at | integer |
GetSessionOutcomesRequestrequest modelAll supplied filters combine with AND. Results use exact, case-sensitive matches and are ordered by occurred_at DESC, then user_id and session_id ascending.
| Prop | Type |
|---|---|
session_ids | array[string] |
user_id | string |
source | string |
outcome | "success" | "failure" | "unknown" |
label | string |
start_time | integer |
end_time | integer |
top_k | integer |
offset | integer |
GetSessionOutcomesResponseresponse model| Prop | Type |
|---|---|
success | boolean |
session_outcomes | array[SessionOutcomeRecord] |
message | string |