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

# 発行者レイテンシ

> 公開 App の実行時間百分位（p50/p90/p95/p99/max）。次元内訳可。

**`GET`** `https://api-datahub.octoparse.com/v1/publisher/usage/latency`

Authentication: API key required (`Authorization: Bearer <API Key>`).

Run duration for your apps: p50 / p90 / p95 / p99 / max of `finished_at - started_at` (milliseconds) over a bounded range, optionally broken down by app or by version (slowest p95 first). Ownership, range, and filter semantics match <a href="/docs/jp/datahub/api/reference/publishing/get-publisher-usage">Publisher usage</a>. Samples are every finished run that has a start time (including failures and cancellations—the distribution describes the runs themselves, not only successes). Percentiles are `null` when there are no samples. Percentiles need run details, so both bounds are required and the span must be at most 92 days.

## Request

### Query parameters

<ParamField query="group_by" type="string">
  Optional single dimension: `data_app` by app, `version` by version. Default returns range totals only.
</ParamField>

<ParamField query="data_app" type="string[]">
  Limit to these apps. Repeatable.
</ParamField>

<ParamField query="created_from" type="string">
  Inclusive start. Required.
</ParamField>

<ParamField query="created_to" type="string">
  Exclusive end. Required.
</ParamField>

<ParamField query="triggered_by" type="string">
  Limit to one call channel.
</ParamField>

<ParamField query="include_test" type="boolean" default="False">
  Whether to include author debug runs.
</ParamField>

### Example request

```bash theme={null}
curl \
  -H "Authorization: Bearer $OCTOPARSE_API_KEY" \
  "https://api-datahub.octoparse.com/v1/publisher/usage/latency?created_from=2026-09-01T00:00:00Z&created_to=2026-09-15T00:00:00Z&group_by=data_app"
```

## Response

### 200 success

```json theme={null}
{
  "data": {
    "range": {
      "created_from": "2026-09-01T00:00:00Z",
      "created_to": "2026-09-15T00:00:00Z"
    },
    "totals": {
      "samples": 128,
      "p50_ms": 410,
      "p90_ms": 980,
      "p95_ms": 1420,
      "p99_ms": 3100,
      "max_ms": 5200
    },
    "group_by": "data_app",
    "groups": [
      {
        "namespace": "carol",
        "app_name": "reviews-query",
        "version": null,
        "samples": 128,
        "p50_ms": 410,
        "p90_ms": 980,
        "p95_ms": 1420,
        "p99_ms": 3100,
        "max_ms": 5200
      }
    ]
  }
}
```

The payload is wrapped in `data`. Fields:

<ResponseField name="range" type="object" required>
  The range actually used.

  <Expandable title="fields">
    <ResponseField name="created_from" type="string">
      Inclusive start actually applied.
    </ResponseField>

    <ResponseField name="created_to" type="string">
      Exclusive end actually applied.
    </ResponseField>

    <ResponseField name="tz_offset" type="integer">
      Present only when a day/hour offset applies; unused on this endpoint in practice.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="totals" type="object" required>
  Range totals: `samples` and each percentile in milliseconds.

  <Expandable title="fields">
    <ResponseField name="samples" type="integer">
      Sample count.
    </ResponseField>

    <ResponseField name="p50_ms" type="integer">
      50th percentile duration in milliseconds. `null` when there are no samples.
    </ResponseField>

    <ResponseField name="p90_ms" type="integer">
      90th percentile duration in milliseconds.
    </ResponseField>

    <ResponseField name="p95_ms" type="integer">
      95th percentile duration in milliseconds.
    </ResponseField>

    <ResponseField name="p99_ms" type="integer">
      99th percentile duration in milliseconds.
    </ResponseField>

    <ResponseField name="max_ms" type="integer">
      Maximum duration in milliseconds.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="group_by" type="string">
  Dimension actually used, or omitted/empty when totals only.
</ResponseField>

<ResponseField name="groups" type="object[]">
  Group rows with the same metrics plus dimension keys.

  <Expandable title="fields">
    <ResponseField name="samples" type="integer">
      Sample count in the group.
    </ResponseField>

    <ResponseField name="p50_ms" type="integer">
      50th percentile duration in milliseconds.
    </ResponseField>

    <ResponseField name="p90_ms" type="integer">
      90th percentile duration in milliseconds.
    </ResponseField>

    <ResponseField name="p95_ms" type="integer">
      95th percentile duration in milliseconds.
    </ResponseField>

    <ResponseField name="p99_ms" type="integer">
      99th percentile duration in milliseconds.
    </ResponseField>

    <ResponseField name="max_ms" type="integer">
      Maximum duration in milliseconds.
    </ResponseField>

    <ResponseField name="namespace" type="string">
      Publisher username when grouping by app.
    </ResponseField>

    <ResponseField name="app_name" type="string">
      App name when grouping by app.
    </ResponseField>

    <ResponseField name="version" type="string">
      Release version when grouping by version.
    </ResponseField>
  </Expandable>
</ResponseField>

### Errors

| HTTP | `code`           | `category`      | Description                                                                                                  |
| ---- | ---------------- | --------------- | ------------------------------------------------------------------------------------------------------------ |
| 401  | `unauthorized`   | `forbidden`     | Missing or invalid API key.                                                                                  |
| 400  | `range-too-wide` | `invalid_input` | This dimension requires both `created_from` and `created_to`, at most 92 days apart.                         |
| 404  | `app-not-found`  | `not_found`     | App does not exist, was renamed, or is invisible to the current credential (outside private / shared scope). |

Error responses use `{"error": {code, category, message, retryable}}`. See <a href="/docs/jp/datahub/api/reference/introduction#errors">Errors</a>.

## Client libraries

The Python and JavaScript SDKs do not wrap this endpoint yet. Call REST directly.
