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, OpenAI or Azure OpenAI provider credentials go in Settings -> Providers or the request body credential_override field, not in this auth field.

Request

This endpoint expects an object.
namestringOptional

Dataset name. Required unless source_dataset_id is provided.

descriptionstringOptional
Dataset description.
samplingintegerOptionalDefaults to 100

Percent of matching logs to add (1-100).

start_timedatetimeOptional
Start of the time range to sample logs from.
end_timedatetimeOptional
End of the time range to sample logs from.
is_emptybooleanOptionalDefaults to false
Create an empty dataset without importing logs.
initial_log_filtersmap from strings to objectsOptional

Platform-standard filters keyed by field name.

source_dataset_idstringOptional
Existing dataset ID to duplicate. Copies logs asynchronously.

Response

Dataset created.
idstring
namestring
descriptionstring
typestring
statusenum
initial_log_filtersmap from strings to objects

Platform-standard filters keyed by field name.

created_atdatetime
updated_atdatetime

Errors

401
Unauthorized Error
404
Not Found Error