GuidesDeprecated Guides
Retrieving Sessions
Use the Request API to retrieve session data, allowing you to analyze conversation threads.
Feature gating: Sessions are enabled by default but scheduled for
deprecation in M6. Set COVA_FEATURE_SESSIONS=true to re-enable if disabled
in your deployment. Requires: Growth tier or higher.
The Request API allows you to fetch all requests associated with a specific session ID, making it easy to analyze conversation threads.
Retrieving Session Data
Here's how to fetch all requests for a specific session:
const response = await fetch("https://api.cova.dev/v1/request/query", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${COVA_API_KEY}`,
},
body: JSON.stringify({
filter: {
properties: {
"Cova-Session-Id": {
equals: SESSION_ID_TO_REPLAY,
},
},
},
}),
});
const data = await response.json();The response includes these key fields for each request:
request_created_at: Timestamp of the requestrequest_properties["Cova-Session-Id"]: Session identifiersigned_body_url: URL to access the request and response body from S3request_path: API endpoint pathrequest_properties["Cova-Session-Path"]: Session pathrequest_properties["Cova-Prompt-Id"]: Unique prompt identifierbody: Deprecated, usesigned_body_urlinsteadother fields: See the Request API reference for more details