openapi: 3.2.0 info: title: Latitude Datasets API version: v1 description: Open-source AI agent monitoring platform. Full observability into what's failing in production. Discover underlying issues, get alerts when something breaks and verify your fix worked. servers: - url: https://api.latitude.so description: Production servers: - url: https://api.latitude.so tags: - name: Datasets paths: /v1/projects/{projectSlug}/datasets: get: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: list summary: List project datasets description: Returns a cursor-paginated page of datasets in the project. security: - ApiKeyAuth: [] operationId: listDatasets parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string description: Opaque cursor returned in a previous response's `nextCursor`. Omit on the first page. required: false description: Opaque cursor returned in a previous response's `nextCursor`. Omit on the first page. name: cursor in: query - schema: type: integer minimum: 1 maximum: 200 default: 50 description: Page size. Defaults to 50; max 200. required: false description: Page size. Defaults to 50; max 200. name: limit in: query - schema: type: string enum: - name - updatedAt default: updatedAt description: Field to sort by. Defaults to `updatedAt`. required: false description: Field to sort by. Defaults to `updatedAt`. name: sortBy in: query - schema: type: string enum: - asc - desc default: desc description: Sort direction. Defaults to `desc`. required: false description: Sort direction. Defaults to `desc`. name: sortDirection in: query responses: '200': description: Page of datasets content: application/json: schema: $ref: '#/components/schemas/PaginatedDatasets' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' post: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: create summary: Create dataset description: Creates an empty dataset in the project. The slug is derived from `name`. security: - ApiKeyAuth: [] operationId: createDataset parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateDatasetBody' responses: '201': description: Created dataset content: application/json: schema: $ref: '#/components/schemas/Dataset' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/datasets/{datasetSlug}: get: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: get summary: Get project dataset description: Returns one dataset by slug. security: - ApiKeyAuth: [] operationId: getDataset parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string description: Dataset slug (human-readable identifier within the project). required: true description: Dataset slug (human-readable identifier within the project). name: datasetSlug in: path responses: '200': description: Dataset content: application/json: schema: $ref: '#/components/schemas/Dataset' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' patch: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: update summary: Update dataset description: Updates a dataset's `name` and/or `description`. Renaming regenerates the slug — clients should re-read the response or rely on the `id` for stable references. security: - ApiKeyAuth: [] operationId: updateDataset parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string description: Dataset slug (human-readable identifier within the project). required: true description: Dataset slug (human-readable identifier within the project). name: datasetSlug in: path requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateDatasetBody' responses: '200': description: Updated dataset content: application/json: schema: $ref: '#/components/schemas/Dataset' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' delete: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: delete summary: Delete dataset description: Deletes a dataset by slug. security: - ApiKeyAuth: [] operationId: deleteDataset parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string description: Dataset slug (human-readable identifier within the project). required: true description: Dataset slug (human-readable identifier within the project). name: datasetSlug in: path responses: '204': description: Dataset deleted '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/datasets/{datasetSlug}/rows: get: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: listRows summary: List dataset rows description: Returns a cursor-paginated page of rows. security: - ApiKeyAuth: [] operationId: listDatasetRows parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string description: Dataset slug (human-readable identifier within the project). required: true description: Dataset slug (human-readable identifier within the project). name: datasetSlug in: path - schema: type: string description: Opaque cursor returned in a previous response's `nextCursor`. Omit on the first page. required: false description: Opaque cursor returned in a previous response's `nextCursor`. Omit on the first page. name: cursor in: query - schema: type: integer minimum: 1 maximum: 200 default: 50 description: Page size. Defaults to 50; max 200. required: false description: Page size. Defaults to 50; max 200. name: limit in: query - schema: type: string minLength: 1 maxLength: 500 description: Free-text search against row cells. required: false description: Free-text search against row cells. name: search in: query - schema: type: string enum: - asc - desc default: desc description: Sort direction on `createdAt`. Defaults to `desc` (newest first). required: false description: Sort direction on `createdAt`. Defaults to `desc` (newest first). name: sortDirection in: query responses: '200': description: Page of rows content: application/json: schema: $ref: '#/components/schemas/PaginatedDatasetRows' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' post: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: insertRows summary: Insert dataset rows description: Appends one or more rows to the dataset. security: - ApiKeyAuth: [] operationId: insertDatasetRows parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string description: Dataset slug (human-readable identifier within the project). required: true description: Dataset slug (human-readable identifier within the project). name: datasetSlug in: path requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/InsertDatasetRowsBody' responses: '201': description: Rows inserted content: application/json: schema: $ref: '#/components/schemas/InsertDatasetRowsResponse' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' delete: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: deleteRows summary: Delete dataset rows description: Deletes rows matching the supplied selection. security: - ApiKeyAuth: [] operationId: deleteDatasetRows parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string description: Dataset slug (human-readable identifier within the project). required: true description: Dataset slug (human-readable identifier within the project). name: datasetSlug in: path requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DeleteDatasetRowsBody' responses: '200': description: Rows deleted content: application/json: schema: $ref: '#/components/schemas/DeleteDatasetRowsResponse' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/datasets/{datasetSlug}/rows/{rowId}: patch: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: updateRow summary: Update a dataset row description: Partially updates a single row. Only the cells you send are changed; omitted cells keep their current value. Use this to fill in an `expectedOutput` (or any other cell) after rows were imported. Bumps the dataset version. security: - ApiKeyAuth: [] operationId: updateDatasetRow parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string description: Dataset slug (human-readable identifier within the project). required: true description: Dataset slug (human-readable identifier within the project). name: datasetSlug in: path - schema: type: string minLength: 1 description: Stable row identifier (from `listDatasetRows`). required: true description: Stable row identifier (from `listDatasetRows`). name: rowId in: path requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateDatasetRowBody' responses: '200': description: Row updated content: application/json: schema: $ref: '#/components/schemas/UpdateDatasetRowResponse' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/datasets/{datasetSlug}/rows/import/traces: post: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: importRowsFromTraces summary: Import dataset rows from traces description: Imports one row per trace matched by `traces`. security: - ApiKeyAuth: [] operationId: importDatasetRowsFromTraces parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string description: Dataset slug (human-readable identifier within the project). required: true description: Dataset slug (human-readable identifier within the project). name: datasetSlug in: path requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ImportRowsFromTracesBody' responses: '201': description: Rows imported content: application/json: schema: $ref: '#/components/schemas/ImportRowsFromTracesResponse' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/datasets/{datasetSlug}/rows/export: post: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: exportRows summary: Export dataset rows description: 'Exports the selected rows as CSV. Returns one of three outcomes, discriminated by `status`: - `"ready"` — the export fit in the synchronous path. Body carries a short-lived signed `downloadUrl` the caller follows with a plain HTTP GET. - `"queued"` — the export was too large for the synchronous path AND a `recipient` was supplied. The CSV will be emailed to that address. The recipient must be a member of the requesting organization. - `"too_large"` — the export was too large for the synchronous path AND no `recipient` was supplied. Body includes a `recommendedAction` describing how to recover (typically: ask the user for an email and retry with `recipient` set).' security: - ApiKeyAuth: [] operationId: exportDatasetRows parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string description: Dataset slug (human-readable identifier within the project). required: true description: Dataset slug (human-readable identifier within the project). name: datasetSlug in: path requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ExportDatasetRowsBody' responses: '200': description: CSV ready at the signed URL content: application/json: schema: $ref: '#/components/schemas/ExportDatasetRowsReadyResponse' '202': description: Export queued; download link will be emailed content: application/json: schema: $ref: '#/components/schemas/ExportDatasetRowsQueuedResponse' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' '413': description: Export exceeds the synchronous threshold and no `recipient` was provided content: application/json: schema: $ref: '#/components/schemas/ExportDatasetRowsTooLargeResponse' '429': description: Export rate limit exceeded content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/datasets/{datasetSlug}/columns: get: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: listColumns summary: List dataset columns description: Returns the ordered active column schema — the built-in columns plus any custom columns. Pass `includeRemoved=true` to also return soft-removed columns (so they can be restored). security: - ApiKeyAuth: [] operationId: listDatasetColumns parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string description: Dataset slug (human-readable identifier within the project). required: true description: Dataset slug (human-readable identifier within the project). name: datasetSlug in: path - schema: type: string enum: - 'true' - 'false' description: 'When `true`, also returns soft-removed columns (each carrying `removed: true`). Defaults to `false`.' required: false description: 'When `true`, also returns soft-removed columns (each carrying `removed: true`). Defaults to `false`.' name: includeRemoved in: query responses: '200': description: Column schema content: application/json: schema: $ref: '#/components/schemas/DatasetColumnsList' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' post: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: addColumn summary: Add dataset column description: Adds a custom column. The column starts empty on every row; rows are written only when a cell is filled, so the dataset version does not change. security: - ApiKeyAuth: [] operationId: addDatasetColumn parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string description: Dataset slug (human-readable identifier within the project). required: true description: Dataset slug (human-readable identifier within the project). name: datasetSlug in: path requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AddDatasetColumnBody' responses: '201': description: Created column content: application/json: schema: $ref: '#/components/schemas/DatasetColumn' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/datasets/{datasetSlug}/columns/{identifier}: patch: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: updateColumn summary: Update dataset column description: Renames a column. Works for both built-in and custom columns. security: - ApiKeyAuth: [] operationId: updateDatasetColumn parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string description: Dataset slug (human-readable identifier within the project). required: true description: Dataset slug (human-readable identifier within the project). name: datasetSlug in: path - schema: type: string minLength: 1 description: Stable column identifier. required: true description: Stable column identifier. name: identifier in: path requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateDatasetColumnBody' responses: '200': description: Updated column content: application/json: schema: $ref: '#/components/schemas/DatasetColumn' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' delete: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: deleteColumn summary: Delete dataset column description: Removes a column (built-in or custom) from the active schema. Its data is preserved and the column can be re-added; this does not change the dataset version. security: - ApiKeyAuth: [] operationId: deleteDatasetColumn parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string description: Dataset slug (human-readable identifier within the project). required: true description: Dataset slug (human-readable identifier within the project). name: datasetSlug in: path - schema: type: string minLength: 1 description: Stable column identifier. required: true description: Stable column identifier. name: identifier in: path responses: '204': description: Column removed '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/datasets/{datasetSlug}/columns/reorder: post: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: reorderColumns summary: Reorder dataset columns description: Sets the left-to-right order of columns. This is a metadata edit and does not change the dataset version. security: - ApiKeyAuth: [] operationId: reorderDatasetColumns parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string description: Dataset slug (human-readable identifier within the project). required: true description: Dataset slug (human-readable identifier within the project). name: datasetSlug in: path requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ReorderDatasetColumnsBody' responses: '200': description: Reordered column schema content: application/json: schema: $ref: '#/components/schemas/DatasetColumnsList' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' /v1/projects/{projectSlug}/datasets/{datasetSlug}/columns/{identifier}/restore: post: tags: - Datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: restoreColumn summary: Restore dataset column description: Restores a soft-removed column (built-in or custom) to the active schema, reconnecting its preserved data. Find removed identifiers via `listDatasetColumns` with `includeRemoved=true`. security: - ApiKeyAuth: [] operationId: restoreDatasetColumn parameters: - schema: type: string description: Project slug (human-readable identifier) required: true description: Project slug (human-readable identifier) name: projectSlug in: path - schema: type: string description: Dataset slug (human-readable identifier within the project). required: true description: Dataset slug (human-readable identifier within the project). name: datasetSlug in: path - schema: type: string minLength: 1 description: Stable column identifier. required: true description: Stable column identifier. name: identifier in: path responses: '200': description: Restored column content: application/json: schema: $ref: '#/components/schemas/DatasetColumn' '400': description: Validation error content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/Error' components: schemas: Error: type: object properties: error: type: string required: - error DeleteDatasetRowsResponse: type: object properties: versionId: type: string nullable: true description: New dataset version id, or `null` when nothing was deleted. version: type: integer minimum: 0 description: New dataset version number. deletedCount: type: integer minimum: 0 description: Number of rows removed. required: - versionId - version UpdateDatasetRowResponse: type: object properties: versionId: type: string description: New dataset version id. version: type: integer minimum: 0 description: New dataset version number. required: - versionId - version CreateDatasetBody: type: object properties: name: type: string minLength: 1 description: Human-readable name. Used to derive the slug. description: type: string description: Free-form description. Defaults to `null` when omitted or empty. required: - name InsertDatasetRowsResponse: type: object properties: versionId: type: string description: New dataset version id. version: type: integer minimum: 0 description: New dataset version number. rowIds: type: array items: type: string description: Ids of the inserted rows. required: - versionId - version - rowIds PaginatedDatasets: type: object properties: items: type: array items: $ref: '#/components/schemas/Dataset' description: Page of items, in the requested sort order. nextCursor: type: string nullable: true description: Opaque cursor for fetching the next page. `null` when there are no more pages. Pass it back in `cursor` to continue. hasMore: type: boolean description: '`true` when there is at least one more page after this one.' required: - items - nextCursor - hasMore FilterSet: type: object additionalProperties: type: array items: $ref: '#/components/schemas/FilterCondition' description: 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. DatasetColumn: type: object properties: identifier: type: string description: Stable, immutable column id. The key under which custom values are stored on each row. name: type: string description: Display name. Editable; the identifier never changes. source: oneOf: - type: object properties: kind: type: string enum: - builtin description: A built-in field (`input`, `output`, `expectedOutput`, or `metadata`). field: type: string enum: - input - output - expectedOutput - metadata description: Which built-in field this column projects. required: - kind - field - type: object properties: kind: type: string enum: - custom description: A user-added column; its values live under the row's `custom` store. required: - kind description: Where the column's values come from. removed: type: boolean description: '`true` for soft-removed columns (only returned when listing with `includeRemoved`). Removed columns are excluded from rows and the default schema, but keep their data and can be restored.' required: - identifier - name - source TracesRef: oneOf: - type: object properties: by: type: string enum: - ids description: Match an explicit list of traces by their identifiers. Pair with `ids`. ids: type: array items: type: string minLength: 32 maxLength: 32 description: 32-character trace identifier. minItems: 1 description: Non-empty list of trace identifiers. required: - by - ids - type: object properties: by: type: string enum: - filters description: Match every trace produced by a filter set. Pair with `filters`; result count is not bounded. filters: $ref: '#/components/schemas/FilterSet' required: - by - filters description: Which traces to include in the export — either explicit ids or a filter set. AddDatasetColumnBody: type: object properties: name: type: string minLength: 1 description: Display name for the new custom column. required: - name UpdateDatasetBody: type: object properties: name: type: string minLength: 1 description: New human-readable name. Renaming regenerates the slug. description: type: string nullable: true description: New description. Pass `null` to clear; omit to keep the current value. ImportRowsFromTracesResponse: type: object properties: versionId: type: string description: New dataset version id. version: type: integer minimum: 0 description: New dataset version number. rowIds: type: array items: type: string description: Ids of the inserted rows. required: - versionId - version - rowIds ExportDatasetRowsBody: type: object properties: selection: oneOf: - type: object properties: mode: type: string enum: - selected rowIds: type: array items: type: string minItems: 1 required: - mode - rowIds - type: object properties: mode: type: string enum: - all required: - mode - type: object properties: mode: type: string enum: - allExcept rowIds: type: array items: type: string required: - mode - rowIds description: 'Rows to export. Defaults to `{ mode: "all" }` when omitted.' recipient: type: string format: email description: Email address to send the download link to when the export is too large for the synchronous path. Must belong to a member of the requesting organization. Ignored when the export fits the synchronous path; required for the async email flow. DatasetRow: type: object properties: rowId: type: string description: Stable row identifier. datasetId: type: string minLength: 24 maxLength: 24 description: Dataset this row belongs to. input: anyOf: - type: string - type: number - type: boolean - type: array items: nullable: true - type: object additionalProperties: nullable: true description: Input cell. Omitted when the `input` column is removed. output: anyOf: - type: string - type: number - type: boolean - type: array items: nullable: true - type: object additionalProperties: nullable: true description: Output cell. Omitted when the `output` column is removed. expectedOutput: anyOf: - type: string - type: number - type: boolean - type: array items: nullable: true - type: object additionalProperties: nullable: true description: The correct answer for this row. Curators fill this in by hand; it is not derived from `output`. Omitted when the `expectedOutput` column is removed. metadata: anyOf: - type: string - type: number - type: boolean - type: array items: nullable: true - type: object additionalProperties: nullable: true description: Metadata cell. Omitted when the `metadata` column is removed. custom: type: object additionalProperties: anyOf: - type: string - type: number - type: boolean - type: array items: nullable: true - type: object additionalProperties: nullable: true description: 'Free-form cell value: any JSON scalar, array, or object.' description: Custom column values keyed by column identifier. Removed columns are excluded; `{}` when none. createdAt: type: string description: ISO-8601 timestamp at which the row was inserted. version: type: integer minimum: 0 description: Dataset version this row belongs to. required: - rowId - datasetId - custom - createdAt - version InsertDatasetRowsBody: type: object properties: rows: type: array items: type: object properties: id: type: string minLength: 1 maxLength: 128 description: Optional client-supplied row id. Generated when omitted. input: anyOf: - type: string - type: number - type: boolean - type: array items: nullable: true - type: object additionalProperties: nullable: true - nullable: true description: Row input cell. output: anyOf: - type: string - type: number - type: boolean - type: array items: nullable: true - type: object additionalProperties: nullable: true - nullable: true description: Row output cell. expectedOutput: anyOf: - type: string - type: number - type: boolean - type: array items: nullable: true - type: object additionalProperties: nullable: true - nullable: true description: Correct answer for this row. Filled in by curators; usually distinct from `output`. metadata: anyOf: - type: string - type: number - type: boolean - type: array items: nullable: true - type: object additionalProperties: nullable: true - nullable: true description: Row metadata cell. custom: type: object additionalProperties: anyOf: - type: string - type: number - type: boolean - type: array items: nullable: true - type: object additionalProperties: nullable: true - nullable: true description: Custom column values keyed by column identifier. Removed or unknown columns are rejected. required: - input minItems: 1 description: Rows to insert. required: - rows ExportDatasetRowsReadyResponse: type: object properties: status: type: string enum: - ready description: Always `"ready"`. The CSV is available at `downloadUrl`. downloadUrl: type: string description: Short-lived signed URL pointing to the CSV in object storage. Follow it with a plain HTTP GET. filename: type: string description: Suggested filename for the downloaded CSV. expiresAt: type: string description: ISO-8601 timestamp at which `downloadUrl` stops working. rowCount: type: integer minimum: 0 description: Number of rows included in the export. required: - status - downloadUrl - filename - expiresAt - rowCount DatasetColumnsList: type: object properties: columns: type: array items: $ref: '#/components/schemas/DatasetColumn' description: Ordered column schema (built-in + custom). required: - columns ImportRowsFromTracesBody: type: object properties: traces: allOf: - $ref: '#/components/schemas/TracesRef' - description: Which traces to import as rows — either explicit ids or a filter set. required: - traces ExportDatasetRowsTooLargeResponse: type: object properties: status: type: string enum: - too_large description: Always `"too_large"`. The export exceeds the synchronous threshold. rowCount: type: integer minimum: 0 description: Number of rows the export would have produced. threshold: type: integer minimum: 0 exclusiveMinimum: true description: Maximum row count this endpoint will generate synchronously. recommendedAction: type: string description: 'Instructions for the caller — typically an LLM — on how to recover: ask the end user for an email address and retry the same call with `recipient` set to it.' required: - status - rowCount - threshold - recommendedAction ReorderDatasetColumnsBody: type: object properties: order: type: array items: type: string minLength: 1 minItems: 1 description: Column identifiers in the desired left-to-right order. Identifiers omitted from the list keep their relative order at the end; unknown identifiers are ignored. required: - order ExportDatasetRowsQueuedResponse: type: object properties: status: type: string enum: - queued description: Always `"queued"`. The CSV is emailed to `recipient` when ready. recipient: type: string format: email description: Email address the export download link will be sent to. rowCount: type: integer minimum: 0 description: Number of rows the export will produce. required: - status - recipient - rowCount PaginatedDatasetRows: type: object properties: items: type: array items: $ref: '#/components/schemas/DatasetRow' description: Page of items, in the requested sort order. nextCursor: type: string nullable: true description: Opaque cursor for fetching the next page. `null` when there are no more pages. Pass it back in `cursor` to continue. hasMore: type: boolean description: '`true` when there is at least one more page after this one.' required: - items - nextCursor - hasMore Dataset: type: object properties: id: type: string minLength: 24 maxLength: 24 description: Stable dataset identifier. organizationId: type: string minLength: 24 maxLength: 24 description: Organization that owns this dataset. projectId: type: string minLength: 24 maxLength: 24 description: Project this dataset belongs to. slug: type: string description: URL-safe slug derived from `name`. Unique within the project. name: type: string description: Human-readable name. description: type: string nullable: true description: Free-form description, or `null` when not set. columns: type: array nullable: true items: $ref: '#/components/schemas/DatasetColumn' description: 'Ordered column schema (built-in + custom). `null` means the default schema: the four built-in fields, all visible.' version: type: integer minimum: 0 description: Current dataset version. createdAt: type: string description: ISO-8601 timestamp of creation. updatedAt: type: string description: ISO-8601 timestamp of the last update. required: - id - organizationId - projectId - slug - name - description - columns - version - createdAt - updatedAt FilterCondition: type: object properties: op: type: string enum: - eq - neq - gt - gte - lt - lte - in - notIn - contains - notContains - gtePercentile description: Comparison operator applied to the field's value (e.g. `eq`, `neq`, `in`). The full operator list lives in the API reference. value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number description: Right-hand value compared against the field. Arrays are required for `in` / `notIn`-style operators. required: - op - value UpdateDatasetColumnBody: type: object properties: name: type: string minLength: 1 description: New display name. Works for both built-in and custom columns. required: - name UpdateDatasetRowBody: type: object properties: input: anyOf: - type: string - type: number - type: boolean - type: array items: nullable: true - type: object additionalProperties: nullable: true - nullable: true description: New input cell. Omit to leave it unchanged. output: anyOf: - type: string - type: number - type: boolean - type: array items: nullable: true - type: object additionalProperties: nullable: true - nullable: true description: New output cell. Omit to leave it unchanged. expectedOutput: anyOf: - type: string - type: number - type: boolean - type: array items: nullable: true - type: object additionalProperties: nullable: true - nullable: true description: New correct answer for this row. Filled in by curators; usually distinct from `output`. Omit to leave it unchanged. metadata: anyOf: - type: string - type: number - type: boolean - type: array items: nullable: true - type: object additionalProperties: nullable: true - nullable: true description: New metadata cell. Omit to leave it unchanged. custom: type: object additionalProperties: anyOf: - type: string - type: number - type: boolean - type: array items: nullable: true - type: object additionalProperties: nullable: true - nullable: true description: Custom column values to set, keyed by column identifier. Merged onto the row's existing custom values — columns you omit are left unchanged. Unknown or removed columns are rejected. DeleteDatasetRowsBody: type: object properties: selection: oneOf: - type: object properties: mode: type: string enum: - selected rowIds: type: array items: type: string minItems: 1 required: - mode - rowIds - type: object properties: mode: type: string enum: - all required: - mode - type: object properties: mode: type: string enum: - allExcept rowIds: type: array items: type: string required: - mode - rowIds description: Rows to delete. required: - selection securitySchemes: ApiKeyAuth: type: http scheme: bearer bearerFormat: API key description: 'Organization-scoped API key, sent as `Authorization: Bearer `.' x-fern-bearer: name: apiKey env: LATITUDE_API_KEY