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

# Run list

> All runs I started — ownership is by **user**, so runs started
via SDK (key) and portal (JWT) share this one list. Always ordered
by start time descending; `pagination.total` reflects the filtered
result set.

Filters (combinable): `status` run state — supports comma-separated
multi-value OR matching (e.g. `status=PENDING,QUEUED`; pagination
and total hold on the merged result set; values outside the
vocabulary are rejected with 400); `credential` the originating
credential (a non-secret stable identifier, not the credential
itself — for tracing which credential is consuming quota);
`data_app` an app reference (`<username>/<app_name>`);
`triggered_by` the originating channel (mcp / api / cli / sdk);
`run_kind` (test debug / production — query-side filtering so one
kind's traffic does not dilute the other kind's pagination);
`created_from` / `created_to` start-time range (ISO-8601 absolute
timestamps, inclusive start, exclusive end).
Fields marked `sensitive` are masked in the input echo, same rules
as run detail.



## OpenAPI

````yaml /jp/datahub/api/openapi.json get /v1/runs
openapi: 3.1.0
info:
  title: DataHub API
  version: 0.2.0
  description: Public /v1 contract of Octoparse DataHub. Internal channels are excluded.
servers:
  - url: https://api-datahub.octoparse.com
security:
  - bearerAuth: []
tags:
  - name: Discovery
    description: >-
      Anonymous access: platform metadata (currency), data app search, detail
      and input contract, machine-readable manifest spec.
  - name: Publishing
    description: >-
      Self-service publishing channel (API Key auth), two-phase: validate first
      (validate / package, nothing persisted), then publish (POST /data-apps,
      the submission goes live as a new Release). api kind (declarative
      integration) becomes visible on publish; code kind (code package) returns
      202 and enters an async image build; once ready it is promoted to a
      Release, visible and runnable. Poll progress via GET
      /data-apps/{ref}/builds.
  - name: Runs & Results
    description: >-
      Start / query / cancel runs and read result records with pagination.
      Business inputs go in the request body; platform run options (wait,
      max_records) go in query parameters.
  - name: Datasets
    description: >-
      Metadata and record access for platform datasets (including seeded stock
      data).
  - name: Account
    description: Account info and cumulative usage for the current API Key.
  - name: Secrets
    description: >-
      CRUD for upstream credentials (environment entries referenced by manifest
      `runtime.env`). Plaintext is write-only: every read returns a mask.
paths:
  /v1/runs:
    get:
      tags:
        - Runs & Results
      summary: Run list
      description: |-
        All runs I started — ownership is by **user**, so runs started
        via SDK (key) and portal (JWT) share this one list. Always ordered
        by start time descending; `pagination.total` reflects the filtered
        result set.

        Filters (combinable): `status` run state — supports comma-separated
        multi-value OR matching (e.g. `status=PENDING,QUEUED`; pagination
        and total hold on the merged result set; values outside the
        vocabulary are rejected with 400); `credential` the originating
        credential (a non-secret stable identifier, not the credential
        itself — for tracing which credential is consuming quota);
        `data_app` an app reference (`<username>/<app_name>`);
        `triggered_by` the originating channel (mcp / api / cli / sdk);
        `run_kind` (test debug / production — query-side filtering so one
        kind's traffic does not dilute the other kind's pagination);
        `created_from` / `created_to` start-time range (ISO-8601 absolute
        timestamps, inclusive start, exclusive end).
        Fields marked `sensitive` are masked in the input echo, same rules
        as run detail.
      operationId: list_runs_v1_runs_get
      parameters:
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status
        - name: credential
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Credential
        - name: data_app
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Data App
        - name: triggered_by
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Triggered By
        - name: created_from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Created From
        - name: created_to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Created To
        - name: run_kind
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                pattern: ^(test|production)$
              - type: 'null'
            title: Run Kind
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataEnvelope_RunList_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DataEnvelope_RunList_:
      properties:
        data:
          $ref: '#/components/schemas/RunList'
      type: object
      required:
        - data
      title: DataEnvelope[RunList]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RunList:
      properties:
        items:
          items:
            $ref: '#/components/schemas/PublicRun'
          type: array
          title: Items
        pagination:
          $ref: '#/components/schemas/Pagination'
      type: object
      required:
        - items
      title: RunList
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    PublicRun:
      properties:
        run_id:
          type: string
          title: Run Id
        namespace:
          anyOf:
            - type: string
            - type: 'null'
          title: Namespace
        app_name:
          type: string
          title: App Name
          default: ''
        app_version:
          anyOf:
            - type: string
            - type: 'null'
          title: App Version
        build_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Build Id
        run_kind:
          type: string
          title: Run Kind
          default: production
        state:
          $ref: '#/components/schemas/RunState'
        input:
          additionalProperties: true
          type: object
          title: Input
        progress:
          $ref: '#/components/schemas/Progress'
        dataset_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Dataset Id
        partial:
          type: boolean
          title: Partial
          default: false
        cancel_requested:
          type: boolean
          title: Cancel Requested
          description: >-
            true while cancellation has been requested and the run is still
            winding down (cooperative stop / partial-result recovery); always
            false in terminal states (normalized server-side), so consumers need
            not derive it from state
          default: false
        triggered_by:
          type: string
          title: Triggered By
          default: api
        upstream_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Upstream Ref
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        started_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Started At
        first_started_at:
          anyOf:
            - type: string
            - type: 'null'
          title: First Started At
          description: >-
            when the run was first claimed by a worker. Unlike started_at, which
            is re-stamped on every retry, this one is never rewritten, so it is
            the anchor for queue time: queued = first_started_at - created_at,
            and total wall time = finished_at - first_started_at. Deriving queue
            time from started_at counts the earlier attempts' execution as
            queueing. Null only for runs never claimed.
        finished_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Finished At
        usage:
          $ref: '#/components/schemas/Usage'
        billing:
          $ref: '#/components/schemas/Billing'
        error:
          anyOf:
            - $ref: '#/components/schemas/ApiError'
            - type: 'null'
      type: object
      required:
        - run_id
        - state
      title: PublicRun
      description: |-
        Public shape of a run: the app is referenced as `<namespace>/<app_name>`
        plus the pinned version.
    Pagination:
      properties:
        offset:
          type: integer
          title: Offset
          default: 0
        limit:
          type: integer
          title: Limit
          default: 0
        count:
          type: integer
          title: Count
          default: 0
        total:
          type: integer
          title: Total
          default: 0
        has_more:
          type: boolean
          title: Has More
          default: false
      type: object
      title: Pagination
    RunState:
      type: string
      enum:
        - PENDING
        - QUEUED
        - RUNNING
        - SUCCEEDED
        - PARTIALLY_SUCCEEDED
        - FAILED
        - CANCELLED
        - EXPIRED
      title: RunState
    Progress:
      properties:
        done:
          type: integer
          title: Done
          default: 0
        total:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total
        status_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Status Text
      type: object
      title: Progress
    Usage:
      properties:
        metrics:
          additionalProperties:
            type: integer
          type: object
          title: Metrics
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
      type: object
      title: Usage
      description: |-
        Objective usage metering: how much the run did (kept separate from
        Billing; this is what evaluations compare against).
    Billing:
      properties:
        events:
          items:
            $ref: '#/components/schemas/BillingEvent'
          type: array
          title: Events
        total:
          type: number
          title: Total
          default: 0
        currency:
          type: string
          title: Currency
        charged:
          type: boolean
          title: Charged
          default: true
      type: object
      title: Billing
      description: 'Billing ledger = Usage x pricing x billing_rules: how much is charged.'
    ApiError:
      properties:
        code:
          type: string
          title: Code
        category:
          type: string
          title: Category
          default: internal
        message:
          type: string
          title: Message
        retryable:
          type: boolean
          title: Retryable
          default: false
        retry_after:
          anyOf:
            - type: number
            - type: 'null'
          title: Retry After
        item_index:
          anyOf:
            - type: integer
            - type: 'null'
          title: Item Index
        details:
          anyOf:
            - items:
                additionalProperties:
                  type: string
                type: object
              type: array
            - type: 'null'
          title: Details
      type: object
      required:
        - code
        - message
      title: ApiError
    BillingEvent:
      properties:
        event:
          type: string
          title: Event
        label:
          type: string
          title: Label
          default: ''
        qty:
          type: number
          title: Qty
        unit_price:
          type: number
          title: Unit Price
        amount:
          type: number
          title: Amount
        unit_size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Unit Size
        raw_qty:
          anyOf:
            - type: number
            - type: 'null'
          title: Raw Qty
      type: object
      required:
        - event
        - qty
        - unit_price
        - amount
      title: BillingEvent
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: DataHub API Key

````