---
title: "Source Datasets Query"
method: POST
path: "/dataset_sources/source_datasets_query"
tags: ["Dataset Sources"]
---

# Source Datasets Query

`POST /dataset_sources/source_datasets_query`

## Request

- Base URL: `https://trace.wandb.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://trace.wandb.ai/dataset_sources/source_datasets_query`
- Auth: none declared

Reverse provenance lookup: sources -> datasets they appear in.

## Request body

- SourceDatasetsQueryReq: Reverse query: sources -> datasets.
  - `project_id` string, required
  - `sources` SourceRef[], required
    - `source_kind` 'call' | 'span' | 'conversation', required
    - `source_id` string, required
    - `source_trace_id` string, required
  - `include_deleted` boolean
  - `wb_user_id` string, nullable: Do not set directly. Server will automatically populate this field.

## Response `200`

Successful Response

- SourceDatasetsQueryRes: Response from the reverse sources -> datasets query.
  - `memberships` SourceDatasetMembership[], required
    - `source_kind` 'call' | 'span' | 'conversation', required
    - `source_id` string, required
    - `source_trace_id` string, required
    - `dataset_object_id` string, required
    - `row_digests` string[], required
    - `row_digests_truncated` boolean, required
    - `row_digests_total_count` integer, required
    - `first_seen_at` string, date-time, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-16** `dd89fadfe4e4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/wandb/apis/fastapi/changes/dataset_sources/source_datasets_query/post.md)

---

[API](https://skmtc.dev/wandb/apis/fastapi.md) - [All operations](https://skmtc.dev/wandb/apis/fastapi/llms.txt) - [OpenAPI document](https://skmtc.dev/wandb/apis/fastapi/revisions/f7643c49bf2e?raw)
