> ## 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.

# Publisher run duration distribution (percentiles)

> How long my apps' runs take: p50 / p90 / p95 / p99 / max of
`finished_at - started_at` in milliseconds over a bounded range,
optionally per app or per app version (slowest p95 first). Same
ownership, range and filter semantics as GET /publisher/usage; the
sample is every finished run that has a start time (failed and
cancelled runs included — the distribution describes the runs, not
only the successful ones), and every percentile is null when there
is none. Percentiles need run details, so both bounds are required
and may be at most 92 days apart (400 range-too-wide).



## OpenAPI

````yaml /jp/datahub/api/openapi.json get /v1/publisher/usage/latency
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/publisher/usage/latency:
    get:
      tags:
        - Publishing
      summary: Publisher run duration distribution (percentiles)
      description: |-
        How long my apps' runs take: p50 / p90 / p95 / p99 / max of
        `finished_at - started_at` in milliseconds over a bounded range,
        optionally per app or per app version (slowest p95 first). Same
        ownership, range and filter semantics as GET /publisher/usage; the
        sample is every finished run that has a start time (failed and
        cancelled runs included — the distribution describes the runs, not
        only the successful ones), and every percentile is null when there
        is none. Percentiles need run details, so both bounds are required
        and may be at most 92 days apart (400 range-too-wide).
      operationId: publisher_latency_v1_publisher_usage_latency_get
      parameters:
        - name: group_by
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              optional single dimension: data_app (per app) or version (per app
              version); default = range totals only
            title: Group By
          description: >-
            optional single dimension: data_app (per app) or version (per app
            version); default = range totals only
        - name: data_app
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: >-
              restrict to these apps (`<username>/<app_name>`, repeatable);
              default = all my apps
            title: Data App
          description: >-
            restrict to these apps (`<username>/<app_name>`, repeatable);
            default = all my apps
        - 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: triggered_by
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              restrict to one calling channel (same value as the runs list
              filter)
            title: Triggered By
          description: restrict to one calling channel (same value as the runs list filter)
        - name: include_test
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Include Test
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataEnvelope_PublisherLatency_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DataEnvelope_PublisherLatency_:
      properties:
        data:
          $ref: '#/components/schemas/PublisherLatency'
      type: object
      required:
        - data
      title: DataEnvelope[PublisherLatency]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PublisherLatency:
      properties:
        range:
          $ref: '#/components/schemas/UsageRange'
        totals:
          $ref: '#/components/schemas/LatencyMetrics'
        group_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Group By
        groups:
          items:
            $ref: '#/components/schemas/LatencyGroup'
          type: array
          title: Groups
      type: object
      required:
        - range
        - totals
      title: PublisherLatency
      description: |-
        Publisher-side duration distribution over a bounded range, optionally
        broken down by app or by app version (slowest p95 first).
    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
    UsageRange:
      properties:
        created_from:
          anyOf:
            - type: string
            - type: 'null'
          title: Created From
        created_to:
          anyOf:
            - type: string
            - type: 'null'
          title: Created To
        tz_offset:
          type: integer
          title: Tz Offset
          default: 0
      type: object
      title: UsageRange
      description: Echo of the effective range (normalised UTC instants) and offset.
    LatencyMetrics:
      properties:
        samples:
          type: integer
          title: Samples
          default: 0
        p50:
          anyOf:
            - type: integer
            - type: 'null'
          title: P50
        p90:
          anyOf:
            - type: integer
            - type: 'null'
          title: P90
        p95:
          anyOf:
            - type: integer
            - type: 'null'
          title: P95
        p99:
          anyOf:
            - type: integer
            - type: 'null'
          title: P99
        max:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max
      type: object
      title: LatencyMetrics
      description: >-
        Run duration distribution in milliseconds (finished_at - started_at,

        continuous-interpolated percentiles). `samples` counts finished runs
        that

        have a start time; every percentile is null when there are none.
    LatencyGroup:
      properties:
        samples:
          type: integer
          title: Samples
          default: 0
        p50:
          anyOf:
            - type: integer
            - type: 'null'
          title: P50
        p90:
          anyOf:
            - type: integer
            - type: 'null'
          title: P90
        p95:
          anyOf:
            - type: integer
            - type: 'null'
          title: P95
        p99:
          anyOf:
            - type: integer
            - type: 'null'
          title: P99
        max:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max
        namespace:
          anyOf:
            - type: string
            - type: 'null'
          title: Namespace
        app_name:
          anyOf:
            - type: string
            - type: 'null'
          title: App Name
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
      type: object
      title: LatencyGroup
      description: |-
        One group of the latency report: `namespace` + `app_name` for
        data_app, plus `version` for version (null for debug runs).
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: DataHub API Key

````