For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DiscordPlatform
DocumentationIntegrationsAPI referenceSDKsChangelog
DocumentationIntegrationsAPI referenceSDKsChangelog
  • API Reference
      • POSTCreate a dataset
      • POSTList datasets
      • GETRetrieve a dataset
      • PATCHUpdate a dataset
      • DELDelete a dataset
      • POSTCreate a dataset log
      • POSTList dataset logs
      • GETRetrieve a dataset log
      • PATCHUpdate a dataset log
      • DELDelete a dataset log
      • POSTBulk create dataset logs
      • POSTRun evaluators on a dataset
      • GETList dataset evaluation runs
      • PUTReplace a dataset log
      • POSTImport existing logs into a dataset
      • DELRemove logs from a dataset
      • GETGet dataset logs summary
      • POSTGet filtered dataset logs summary
  • Reference
    • Filters API Reference
LogoLogo
DiscordPlatform
API ReferenceDatasets

List dataset logs

POST
https://api.respan.ai/api/datasets/:dataset_id/logs/list/
POST
/api/datasets/:dataset_id/logs/list/
$curl -X POST https://api.respan.ai/api/datasets/dataset_id/logs/list/ \
> -H "Authorization: Bearer sk_live_xxxxx" \
> -H "Content-Type: application/json" \
> -d '{
> "filters": {
> "status_code": {
> "operator": "eq",
> "value": 200
> }
> },
> "is_exporting": false
>}'
1{
2 "count": 250,
3 "next": "https://api.respan.ai/api/datasets/6dee217e-18c6-468e-ab6d-7b97e2115752/logs/list/?page=2&page_size=10",
4 "previous": null,
5 "results": [
6 {
7 "id": "abc123",
8 "unique_id": "abc123",
9 "organization_id": "8264a3f4-40c7-476a-97d1-96908127ea21",
10 "environment": "prod",
11 "timestamp": "2025-10-06T02:40:29.250313Z",
12 "start_time": "2025-10-06T02:40:29.250313Z",
13 "prompt_tokens": 2020,
14 "completion_tokens": 25,
15 "total_request_tokens": 2045,
16 "cost": 0.0010475,
17 "model": "gpt-4o-mini",
18 "latency": 0.516,
19 "status_code": 200,
20 "status": "success",
21 "prompt": "Hi, this is Taylor calling from HONK...",
22 "completion": "Alright, so that is about 120 minutes...",
23 "input": {
24 "messages": [
25 {
26 "role": "user",
27 "content": "Hi"
28 }
29 ]
30 },
31 "output": {
32 "role": "assistant",
33 "content": "Hello there"
34 },
35 "dataset_id": "6dee217e-18c6-468e-ab6d-7b97e2115752",
36 "annotation_status": "completed",
37 "annotation_completed_by": {
38 "first_name": "",
39 "last_name": "",
40 "email": ""
41 },
42 "scores": {},
43 "metadata": {
44 "provider": "openai"
45 },
46 "custom_identifier": "support-log-1",
47 "log_type": "chat"
48 }
49 ],
50 "total_count": 250,
51 "current_filters": {},
52 "filters_data": {},
53 "filter_options": {}
54}

List logs in a dataset with filters and pagination. Set is_exporting=true to trigger an asynchronous CSV or JSONL export instead of returning results.

Was this page helpful?
Previous

Retrieve a dataset log

Next
Built with

Path parameters

dataset_idstringRequired

Dataset ID. Use _saved_logs for the virtual saved-logs collection.

Headers

AuthorizationstringRequired

Bearer token. Use Bearer YOUR_API_KEY.

Query parameters

pageintegerOptionalDefaults to 1
Page number.
page_sizeintegerOptional<=100Defaults to 25
Results per page. Maximum is 100.
sort_bystringOptionalDefaults to -timestamp

Sort field for dataset logs. Prefix with - for descending order.

retrieval_modeenumOptional

Set to async to preload full log objects in the background.

Allowed values:
include_fieldsstringOptional

Comma-separated list of response fields to include.

Request

This endpoint expects an object.
filtersmap from strings to objectsOptional

Platform-standard filters keyed by field name.

is_exportingbooleanOptional

Set to true to export logs instead of returning a paginated list.

export_formatenumOptional

Export format. Defaults to .csv.

Allowed values:
namestringOptional
Optional export file name.

Response

Paginated dataset logs, or an export acknowledgement when is_exporting=true.

object
OR
object

Errors

401
Unauthorized Error