---
title: "Import dataset rows from traces"
method: POST
path: "/v1/projects/{projectSlug}/datasets/{datasetSlug}/rows/import/traces"
tags: ["Datasets"]
---

# Import dataset rows from traces

`POST /v1/projects/{projectSlug}/datasets/{datasetSlug}/rows/import/traces`

Imports one row per trace matched by `traces`.

## Path parameters

- `projectSlug` string, required — Project slug (human-readable identifier)
- `datasetSlug` string, required — Dataset slug (human-readable identifier within the project).

## Request body

- ImportRowsFromTracesBody
  - `traces` union, required
    - object — Which traces to import as rows — either explicit ids or a filter set.
      - `by` 'ids', required — Match an explicit list of traces by their identifiers. Pair with `ids`.
      - `ids` string[], required — Non-empty list of trace identifiers.
    - object — Which traces to import as rows — either explicit ids or a filter set.
      - `by` 'filters', required — Match every trace produced by a filter set. Pair with `filters`; result count is not bounded.
      - `filters` FilterSet, required — Filter set keyed by field name. Each entry holds an array of conditions ANDed together for that field; field-level groups are also ANDed across the set.

## Response `201`

Rows imported

- ImportRowsFromTracesResponse
  - `versionId` string, required — New dataset version id.
  - `version` integer, required — New dataset version number.
  - `rowIds` string[], required — Ids of the inserted rows.

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `404` — Not found

## Changes

- **2026-05-19** `f42a1fb46380` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/latitude-dev/apis/latitude/changes/v1/projects/:projectSlug/datasets/:datasetSlug/rows/import/traces/post.md)

---

[API](https://skmtc.dev/latitude-dev/apis/latitude.md) · [All operations](https://skmtc.dev/latitude-dev/apis/latitude/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/latitude-dev/latitude/revisions/a0bf72a85607/schema)
