Api Datasets List

Create or duplicate datasets Endpoint: POST /api/datasets/ - Create a dataset (from logs, empty, or by duplicating an existing one) Args (POST): - name (string, required) - description (string, optional) - start_time (string, required, ISO 8601) — ignored if is_empty=true or source_dataset_id set - end_time (string, required, ISO 8601) — ignored if is_empty=true or source_dataset_id set - sampling (integer, optional, default 100) — percent of logs to add - initial_log_filters (object, optional, default {}) - is_empty (boolean, optional, default false) — create empty dataset without adding logs - source_dataset_id (string, optional) — duplicate an existing dataset. Copies all logs asynchronously. When set, start_time/end_time/sampling/initial_log_filters are ignored. Name defaults to "{source_name} (copy)" if not provided. Returns (POST 201): { "id": "dataset_id", "name": "...", "type": "sampling", "status": "initializing", ... } Notes: - Server sets organization and updated_by; type defaults to "sampling". - If selected logs exceed plan limits, returns 400 with error message. - Duplication fires `dataset_processing_complete` WS event when done (same as import).

Authentication

AuthorizationBearer
JWT access token or Respan API key

Query parameters

pageintegerOptional
A page number within the paginated result set.
page_sizeintegerOptional
Number of results to return per page.

Response

countinteger
resultslist of objects
nextstring or nullformat: "uri"
previousstring or nullformat: "uri"
total_countinteger
current_filtersobject

Pydantic model for FilterParamDict. A dictionary that maps metric names to their filter parameters.

Each key is a metric name (str), and each value can be:

  • A single MetricFilterParamPydantic (one condition)
  • A List[MetricFilterParamPydantic] (multiple conditions for same metric)
  • A FilterBundlePydantic (nested filter bundle with connector)

Note: Uses extra=“allow” for dynamic metric name fields. The pydantic_extra annotation tells Pydantic what types to expect for extra fields, and generates typed additionalProperties in JSON Schema.

filters_dataobject