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

# Data app run statistics (publisher self-check)

> Aggregated metrics (run volume / success rate / most recent run,
etc.), open only to the app owner.

Zero-Release apps can be queried too (test traffic already exists
while debugging). Derived from pre-aggregated daily buckets
(accumulated at terminal states, no detail scans), fresh within
seconds. Debug traffic (run_kind=test) is excluded by default;
`include_test=true` merges debug runs into the self-check view.
Metrics with no terminal runs in the window are null rather than 0.



## OpenAPI

````yaml /jp/datahub/api/openapi.json get /v1/data-apps/{app_id}/stats
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/data-apps/{app_id}/stats:
    get:
      tags:
        - Publishing
      summary: Data app run statistics (publisher self-check)
      description: |-
        Aggregated metrics (run volume / success rate / most recent run,
        etc.), open only to the app owner.

        Zero-Release apps can be queried too (test traffic already exists
        while debugging). Derived from pre-aggregated daily buckets
        (accumulated at terminal states, no detail scans), fresh within
        seconds. Debug traffic (run_kind=test) is excluded by default;
        `include_test=true` merges debug runs into the self-check view.
        Metrics with no terminal runs in the window are null rather than 0.
      operationId: get_data_app_stats_v1_data_apps__app_id__stats_get
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            title: App Id
        - 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_AppStats_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    DataEnvelope_AppStats_:
      properties:
        data:
          $ref: '#/components/schemas/AppStats'
      type: object
      required:
        - data
      title: DataEnvelope[AppStats]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AppStats:
      properties:
        namespace:
          anyOf:
            - type: string
            - type: 'null'
          title: Namespace
        app_name:
          type: string
          title: App Name
        total_runs:
          type: integer
          title: Total Runs
        last_run_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Run At
        runs_30d:
          type: integer
          title: Runs 30D
        success_rate_30d:
          anyOf:
            - type: number
            - type: 'null'
          title: Success Rate 30D
        runs_7d:
          type: integer
          title: Runs 7D
          default: 0
        success_rate_7d:
          anyOf:
            - type: number
            - type: 'null'
          title: Success Rate 7D
        calls_7d:
          items:
            type: integer
          type: array
          title: Calls 7D
        avg_duration_ms_30d:
          anyOf:
            - type: integer
            - type: 'null'
          title: Avg Duration Ms 30D
        credits_30d:
          type: number
          title: Credits 30D
          default: 0
      type: object
      required:
        - app_name
        - total_runs
        - runs_30d
        - calls_7d
      title: AppStats
      description: |-
        Run statistics of an app (publisher self-service), derived from daily
        bucket aggregates; rolling windows use UTC days and include today.

        "No finished runs in the window" is always expressed as null (not 0):
        success rates and averages have no neutral default value.
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: DataHub API Key

````