> ## Documentation Index
> Fetch the complete documentation index at: https://developers.askparable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview an Artifact's rows

> Returns the first few rows of an uploaded file so you can see what is in it before doing anything with it.

## Access

An MCP token or a Parable token can call this operation. See [Authentication](/getting-started/authentication.md) for the kinds of token.

Your roles must grant one of `tenant.artifacts.view`, `tenant.artifacts.upload`.

## Errors

* `WA-AF-015`: The Artifact was not found in this Workspace. Check the artifact identifier and Workspace context.
* `WA-AF-003`: Row preview supports CSV Artifacts only. Select a CSV Artifact.
* `WA-AF-017`: The Artifact upload is not ready for preview. Wait for the upload to finish, then retry.


## OpenAPI

````yaml /api-reference/openapi.json get /api/artifacts/{artifactId}/data-preview
openapi: 3.0.3
info:
  description: >-
    Use the Workspace API to work with artifacts, connectors, Parables, and
    account resources.
  title: Workspace API
  version: v2026.10.22.1
servers: []
security: []
paths:
  /api/artifacts/{artifactId}/data-preview:
    get:
      tags:
        - Artifacts
      summary: Preview an Artifact's rows
      description: >-
        Returns the first few rows of an uploaded file so you can see what is in
        it before doing anything with it.
      operationId: ArtifactsArtifactDataPreviewHandler
      parameters:
        - description: >-
            Workspace slug. Overrides subdomain-based workspace resolution when
            provided.
          in: header
          name: X-Tenant
          required: false
          schema:
            example: acme
            type: string
        - description: Optional request correlation ID echoed back in the response.
          in: header
          name: X-Request-ID
          required: false
          schema:
            example: 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: artifactId parameter
          in: path
          name: artifactId
          required: true
          schema:
            description: UUID v4 with automatic base62 encoding for client-facing APIs
            type: string
        - in: query
          name: limit
          required: false
          schema:
            format: double
            type: number
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/ArtifactDataPreview'
                  links:
                    $ref: '#/components/schemas/ResponseLinks'
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
                required:
                  - data
                  - meta
                type: object
          description: Successful response
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: >-
            The request is not valid. `detail` says why. A value that breaks a
            field rule gives the code `WA-VL-001` and an `errors` member that
            names each field.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: The token is missing, malformed, revoked, or expired.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: >-
            The token cannot make this request. For example, the roles of its
            owner do not allow the operation.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: The resource that the path names was not found.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: The request failed on the server.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/X-Request-ID'
      security:
        - bearerAuth: []
      x-codeSamples:
        - label: TypeScript SDK
          lang: typescript
          source: |-
            import { WebApiSDK } from "@parable-platform/web-api-sdk";

            const sdk = new WebApiSDK({
              baseUrl: process.env.PARABLE_API_URL!,
              auth: { token: process.env.PARABLE_API_TOKEN! },
              requestInterceptor: (config) => ({
                ...config,
                headers: { ...config.headers, "X-Tenant": process.env.PARABLE_WORKSPACE! },
              }),
            });

            const query = {};
            const result = await sdk.artifacts.artifactDataPreview(
              "example",
              query
            );
        - label: Python SDK
          lang: python
          source: |-
            import os

            from parable_web_api_sdk import ClientConfig, WebApiSDK

            sdk = WebApiSDK(
                ClientConfig(
                    base_url=os.environ["PARABLE_API_URL"],
                    auth_token=os.environ["PARABLE_API_TOKEN"],
                    default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
                )
            )

            result = sdk.artifacts.artifact_data_preview('example', limit=None)
        - label: Rust SDK
          lang: rust
          source: >-
            use parable_web_api_sdk::{namespaces, ClientConfig, RequestOptions,
            WebApiSdk};


            let sdk = WebApiSdk::new(ClientConfig::with_base_url(
                std::env::var("PARABLE_API_URL")?,
                Some(std::env::var("PARABLE_API_TOKEN")?),
                None,
            ))?;

            let options = RequestOptions::with_header("X-Tenant",
            std::env::var("PARABLE_WORKSPACE")?, None, None);


            let query = namespaces::artifacts::ArtifactDataPreviewQueryParams {
                limit: None,
            };

            let result = sdk.artifacts.artifact_data_preview(
                serde_json::from_value(serde_json::json!("example"))?,
                Some(&query),
                Some(&options)
            ).await?;
        - label: Go SDK
          lang: go
          source: "sdk, err := webapisdk.New(webapisdk.SDKConfig{\n\tBaseURL: os.Getenv(\"PARABLE_API_URL\"),\n\tAuth:    &webapisdk.AuthConfig{Token: os.Getenv(\"PARABLE_API_TOKEN\")},\n\tRequestInterceptor: func(ctx context.Context, req *http.Request) error {\n\t\treq.Header.Set(\"X-Tenant\", os.Getenv(\"PARABLE_WORKSPACE\"))\n\t\treturn nil\n\t},\n})\nif err != nil {\n\treturn err\n}\n\nquery := &namespaces.ArtifactsArtifactDataPreviewQueryParams{}\nresult, err := sdk.ArtifactsNamespace.ArtifactDataPreview(ctx, \"example\", query)"
components:
  schemas:
    ArtifactDataPreview:
      description: |-
        Server-side preview of the data backing an artifact, used by the schema
        editor. The schema describing the row shape is returned alongside the
        data so consumers can render without a separate fetch.
      properties:
        inference:
          description: >-
            Persisted inference results for the artifact, when available. The

            embedded `schema` is the same `Parable_Schema` returned at the top

            level (i.e. `inference.schema == schema` when both are present), so

            the schema editor can be driven from a single shape. `model` is
            empty

            and the token counts are zero because those are inference-call-time

            signals and are not persisted with the artifact. Null when the

            artifact has no persisted `dataSchema` or when no inference metadata

            was captured (e.g. artifacts predating Phase 1).
          oneOf:
            - $ref: '#/components/schemas/ArtifactInference'
            - enum:
                - null
              nullable: true
              type: object
        rows:
          description: |-
            Preview rows, each conforming to `schema`. Capped server-side to 500
            rows.
          items:
            description: A Parable Schema in JSON
            type: object
          type: array
        schema:
          description: |-
            Schema describing each row (matches `TenantArtifact.dataSchema`).
            When the artifact has a persisted `dataSchema` this is that schema;
            otherwise the server synthesizes an all-String fallback so the row
            table is always renderable.
          type: object
        truncated:
          description: True when the underlying artifact has more rows than were returned.
          type: boolean
      required:
        - schema
        - rows
        - truncated
      type: object
    ResponseLinks:
      properties:
        first:
          nullable: true
          type: string
        last:
          nullable: true
          type: string
        next:
          nullable: true
          type: string
        prev:
          nullable: true
          type: string
      type: object
    ResponseMeta:
      properties:
        requestId:
          description: Unique identifier for the request
          type: string
        totalCount:
          description: Total count of items for paginated responses
          nullable: true
          type: integer
      required:
        - requestId
      type: object
    ProblemDetails:
      description: An error response in the Problem Details format (RFC 9457).
      properties:
        code:
          description: The stable error code, when the problem has one.
          example: WA-VL-001
          type: string
        detail:
          description: What went wrong with this request.
          type: string
        details:
          description: >-
            Structured facts about the refusal, such as the entity or the path
            it concerns. Only some refusals have it.
        errors:
          description: >-
            The fields or filters that failed validation. Only a validation or
            filter error has it.
        requestId:
          description: >-
            The ID of the request, when the problem has one. The `X-Request-ID`
            response header always has it.
          type: string
        status:
          description: The HTTP status code.
          example: 400
          type: integer
        title:
          description: A short summary, usually the text of the HTTP status.
          example: Bad Request
          type: string
        type:
          description: >-
            The problem type. It is `about:blank`: the status and `code`
            identify the problem.
          example: about:blank
          type: string
      required:
        - type
        - title
        - status
        - detail
      type: object
    ArtifactInference:
      description: |-
        Schema inference output for an uploaded artifact. The inferred schema is
        returned as a first-class `Parable_Schema` (the same shape that lives on
        the persisted `TenantArtifact.dataSchema`). Per-column inference signal
        that does not belong inside the schema itself (confidence, demotion,
        sample failure stats) lives in `columnMetadata`, keyed by `fieldPath` to
        the matching `FieldDef` in the schema.
      properties:
        columnMetadata:
          description: >-
            Per-column inference signal. Each entry references a field in
            `schema`

            via its `fieldPath` (e.g. "Inferred.email").
          items:
            $ref: '#/components/schemas/ArtifactInferenceColumnMetadata'
          type: array
        model:
          description: >-
            Provider model identifier used for inference: the model the
            Workspace's

            model policy resolved for SCHEMA_INFERENCE.
          type: string
        processor:
          description: >-
            The AI processor that ran the model. Set by
            `runArtifactSchemaInference`;

            null where the call ran no inference, as in `artifactDataPreview`.
          oneOf:
            - $ref: '#/components/schemas/ModelProcessor'
            - enum:
                - null
              nullable: true
              type: string
        schema:
          description: |-
            The inferred schema. Field rationale from the model is folded into
            `FieldDef.description` so the schema is self-documenting.
          type: object
        tokenInputCount:
          description: Input tokens consumed by the inference call.
          format: int64
          maximum: 9007199254740991
          minimum: -9007199254740991
          type: integer
        tokenOutputCount:
          description: Output tokens produced by the inference call.
          format: int64
          maximum: 9007199254740991
          minimum: -9007199254740991
          type: integer
      required:
        - schema
        - columnMetadata
        - model
        - tokenInputCount
        - tokenOutputCount
      type: object
    ArtifactInferenceColumnMetadata:
      description: |-
        Per-column inference signal that is not encoded in the `Parable_Schema`
        itself. Linked back to the schema via `fieldPath`.
      properties:
        confidence:
          $ref: '#/components/schemas/ArtifactInferenceConfidenceEnum'
          description: Inferer's reported confidence for this column.
        demoted:
          description: |-
            True if the column was demoted by post-validation (model proposed a
            scalar that the sample data did not satisfy).
          type: boolean
        fieldPath:
          description: >-
            Path to the matching `FieldDef` in the inferred schema, formatted as

            "{typeName}.{fieldName}" (e.g. "Inferred.email"). Stable identifier
            the

            editor uses to merge this metadata with the schema.
          type: string
        firstSampleError:
          description: First sample-validation error message, when one occurred.
          nullable: true
          type: string
        sampleFailures:
          description: Number of sample values that failed validation.
          format: int64
          maximum: 9007199254740991
          minimum: -9007199254740991
          type: integer
        sampleSeen:
          description: Number of sample values evaluated against the chosen type.
          format: int64
          maximum: 9007199254740991
          minimum: -9007199254740991
          type: integer
      required:
        - fieldPath
        - confidence
        - demoted
        - sampleSeen
        - sampleFailures
      type: object
    ModelProcessor:
      description: >-
        An AI processor that may receive a Workspace's data when Parable runs a

        model over it. The Workspace model policy is a set of these: Parable
        sets

        the processors a Workspace may use, the Workspace may switch some of
        them

        off, and the environment policy caps both.
      enum:
        - VERTEX
        - OPENROUTER_ZDR
        - ANTHROPIC
        - TYPESAFE
      type: string
    ArtifactInferenceConfidenceEnum:
      description: Confidence level reported by schema inference for a single column.
      enum:
        - low
        - medium
        - high
      type: string
  headers:
    X-Request-ID:
      description: >-
        The ID of the request. It is the `X-Request-ID` value that you sent, or
        an ID that the server made. Give it when you report a problem.
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      description: >-
        A personal access token, which starts with `pat_`. A Parable token can
        call each operation that the roles of its owner allow. An MCP token can
        call only the read operations that are open to agents. A SQL token does
        not work on this API.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.