Create a dataset
Create a new dataset from existing logs, create an empty dataset, or duplicate an existing dataset.
Authentication
AuthorizationBearer
Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.
OR
AuthorizationBearer
Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.
Request
This endpoint expects an object.
name
Dataset name. Required unless source_dataset_id is provided.
description
Dataset description.
sampling
Percent of matching logs to add (1-100).
start_time
Start of the time range to sample logs from.
end_time
End of the time range to sample logs from.
is_empty
Create an empty dataset without importing logs.
initial_log_filters
Platform-standard filters keyed by field name.
source_dataset_id
Existing dataset ID to duplicate. Copies logs asynchronously.
granularity
Evaluation unit. Immutable after dataset creation.
Allowed values:
Response
Dataset created.
id
name
description
type
status
initial_log_filters
Platform-standard filters keyed by field name.
created_at
updated_at
granularity
Evaluation unit. Immutable after dataset creation.
Errors
400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
404
Not Found Error