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

# Run a dataset against a registered HTTP Target

> Start a Zespan-executed run: for every item in the dataset, Zespan hydrates the target's request template with the item's `input` and POSTs it directly to the registered HTTP Target's endpoint, capturing the raw response as a trace tagged `sdk_name: "zespan-http-endpoint"`. Unlike every other dataset-run endpoint on this page, Zespan itself makes the call — no SDK integration on the target's side is required.

The target itself is created, updated, and deleted from the dashboard (**Project Settings → HTTP Targets**), not through this public API — see [HTTP Targets](/dashboard/http-targets).

The run is created (or re-attached to, if `runName` matches an existing run) and its execution is enqueued asynchronously; poll `GET /v1/datasets/{datasetId}/runs/{runId}` for progress and to see each item link as it completes.




## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/datasets/{datasetId}/runs/http-target
openapi: 3.1.0
info:
  title: Zespan Public API
  version: 1.0.0
  description: >
    The Zespan Public API covers the endpoints that customers call directly or
    through the Zespan SDKs: trace ingestion (native and OpenTelemetry), prompt
    management, datasets and dataset runs, and the runtime guardrails check.

    All endpoints authenticate with a project API key sent in the `x-api-key`
    header. Create and manage API keys from the project settings in the Zespan
    dashboard.
servers:
  - url: https://api.zespan.com
    description: Zespan production API
security:
  - ApiKeyAuth: []
tags:
  - name: Ingestion
    description: Send traces and events to Zespan.
  - name: OpenTelemetry
    description: OTLP-compatible ingestion endpoints.
  - name: Prompts
    description: Manage versioned prompts and their labels, tags, and folders.
  - name: Datasets
    description: Read datasets and manage dataset runs used for experiments and scoring.
  - name: Guardrails
    description: Runtime guardrail evaluation.
paths:
  /v1/datasets/{datasetId}/runs/http-target:
    post:
      tags:
        - Datasets
      summary: Run a dataset against a registered HTTP Target
      description: >
        Start a Zespan-executed run: for every item in the dataset, Zespan
        hydrates the target's request template with the item's `input` and POSTs
        it directly to the registered HTTP Target's endpoint, capturing the raw
        response as a trace tagged `sdk_name: "zespan-http-endpoint"`. Unlike
        every other dataset-run endpoint on this page, Zespan itself makes the
        call — no SDK integration on the target's side is required.


        The target itself is created, updated, and deleted from the dashboard
        (**Project Settings → HTTP Targets**), not through this public API — see
        [HTTP Targets](/dashboard/http-targets).


        The run is created (or re-attached to, if `runName` matches an existing
        run) and its execution is enqueued asynchronously; poll `GET
        /v1/datasets/{datasetId}/runs/{runId}` for progress and to see each item
        link as it completes.
      operationId: runDatasetOverHttpTarget
      parameters:
        - $ref: '#/components/parameters/DatasetId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - httpTargetId
              properties:
                httpTargetId:
                  type: string
                  format: uuid
                  description: Id of a registered HTTP Target in this project.
                runName:
                  type: string
                  minLength: 1
                  maxLength: 120
                  description: >
                    Optional run name. Reusing an existing run's name
                    re-attaches to it instead of creating a duplicate. Defaults
                    to an auto-generated `http-target-<id>` name.
                projectId:
                  type: string
                  format: uuid
                  description: Optional when authenticating with an API key.
      responses:
        '202':
          description: >-
            Run created and execution enqueued (or created but not enqueued —
            see `note`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  runId:
                    type: string
                    format: uuid
                  name:
                    type: string
                  status:
                    type: string
                    example: queued
                  total:
                    type: integer
                    description: Number of dataset items this run will process.
                  note:
                    type: string
                    description: >
                      Present only when the execution queue was unavailable —
                      the run was created but not enqueued.
        '400':
          description: The dataset has no items to run against.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: >-
            Dataset not found, or `httpTargetId` does not resolve to a target in
            this project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    DatasetId:
      name: datasetId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Dataset id.
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
          example: Unauthorized
        code:
          type: string
          description: Machine-readable error code, when present.
          example: rate_limit_exceeded
      required:
        - error
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Project API key. Manage keys in the Zespan dashboard under project
        settings.

````