Api Datasets Logs Import List

Import existing logs into dataset based on filter criteria Endpoints: POST /evaluations/datasets/{dataset_id}/logs/ - Import existing logs to dataset asynchronously (legacy) POST /api/datasets/{dataset_id}/logs/import/ - Import existing logs to dataset asynchronously DELETE /api/datasets/{dataset_id}/logs/import/ - Remove logs from dataset asynchronously Args (POST body): - start_time (string, required, ISO 8601) - end_time (string, required, ISO 8601) - filters (object, optional; key name is "filters") - sampling_percentage (integer, optional, default 100) Returns (POST 200): { "message": "Logs are being imported to dataset in the background" } Args (DELETE body): - is_deleting_all_logs (boolean, required if filters not provided) - filters (object, required unless is_deleting_all_logs = true) Returns (DELETE 200): { "message": "Logs are being removed from dataset in the background" } Access Control: NestedResourceMixin handles superadmin-aware parent access: - Superadmin + JWT + READ: Can view any dataset's logs - Superadmin + JWT + WRITE: Blocked (can't import/delete logs in other orgs via JWT) - Superadmin + API key: Can import/delete logs in any dataset - Regular user: Can only access their org's datasets

Authentication

AuthorizationBearer
JWT access token or Respan API key

Path parameters

dataset_idstringRequired

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