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

# Read a Domain's queue depth and estimated completion

> Read how much work is waiting for this Domain and when it is expected to finish — every rate bucket in one request. Depth comes in three units: `queued_items` (the chunk references actually queued), `queued_records` (rows), and `estimated_calls` (projected provider calls), each with the share currently held by a pause reported separately.

`estimated_calls` is an ESTIMATE, and is labelled one deliberately: work aimed at the same target merges into fuller provider calls when it is claimed, so the real number of calls is usually lower and can only be known at dispatch time.

The `completion` object NAMES what constrains the finish time. `binding_window` is the window whose limit binds — `"60"`, `"3600"` or `"86400"` — so you can see whether the per-minute, hourly or daily limit is holding the work, and `binding_source` says whether a rate window, a deliberately slowed release policy, or a pause is the constraint. A completion that cannot be computed reads `null` and ALWAYS carries a machine-readable `unknown_reason` — an indefinite hold, a bucket backing off near exhaustion, or a bucket with no usable budget — rather than a guessed number. Estimates are computed fresh on every read, so nothing here can go stale between requests.

Readable by any organization member. Cross-tenant access returns 404, never 403.



## OpenAPI

````yaml /openapi.json get /platforms/five9/domains/{tenancy_id}/queue
openapi: 3.1.0
info:
  title: GetDialed API
  version: 0.1.0
servers:
  - url: https://api.getdialed.ai/v1
    description: Production
security: []
paths:
  /platforms/five9/domains/{tenancy_id}/queue:
    get:
      tags:
        - five9-domains
      summary: Read a Domain's queue depth and estimated completion
      description: >-
        Read how much work is waiting for this Domain and when it is expected to
        finish — every rate bucket in one request. Depth comes in three units:
        `queued_items` (the chunk references actually queued), `queued_records`
        (rows), and `estimated_calls` (projected provider calls), each with the
        share currently held by a pause reported separately.


        `estimated_calls` is an ESTIMATE, and is labelled one deliberately: work
        aimed at the same target merges into fuller provider calls when it is
        claimed, so the real number of calls is usually lower and can only be
        known at dispatch time.


        The `completion` object NAMES what constrains the finish time.
        `binding_window` is the window whose limit binds — `"60"`, `"3600"` or
        `"86400"` — so you can see whether the per-minute, hourly or daily limit
        is holding the work, and `binding_source` says whether a rate window, a
        deliberately slowed release policy, or a pause is the constraint. A
        completion that cannot be computed reads `null` and ALWAYS carries a
        machine-readable `unknown_reason` — an indefinite hold, a bucket backing
        off near exhaustion, or a bucket with no usable budget — rather than a
        guessed number. Estimates are computed fresh on every read, so nothing
        here can go stale between requests.


        Readable by any organization member. Cross-tenant access returns 404,
        never 403.
      operationId: get_five9_domain_queue_platforms_five9_domains__tenancy_id__queue_get
      parameters:
        - name: tenancy_id
          in: path
          required: true
          schema:
            type: string
            title: Tenancy Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Five9DomainQueueResponse'
        '401':
          description: Missing or invalid authentication
          content:
            application/json:
              example:
                detail: Authentication required
        '404':
          description: >-
            No such Domain for this organization (cross-tenant access also
            returns 404)
          content:
            application/json:
              example:
                detail: Domain not found
        '422':
          description: >-
            The body failed validation — an out-of-range safety margin, an
            unknown lane, an unknown rate bucket, an unknown action id, or an
            explicit null.
          content:
            application/json:
              example:
                detail: margins['Upload'] must be between 1 and 100
        '429':
          description: Rate limit exceeded — retry after the Retry-After header
          headers:
            Retry-After:
              description: Seconds to wait before retrying
              schema:
                type: integer
          content:
            application/json:
              example:
                detail: 'Rate limit exceeded: 100 per 1 minute'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    Five9DomainQueueResponse:
      properties:
        tenancy_id:
          type: string
          title: Tenancy Id
        as_of:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: As Of
        buckets:
          additionalProperties:
            $ref: '#/components/schemas/Five9BucketQueueDepth'
          type: object
          title: Buckets
      type: object
      required:
        - tenancy_id
        - buckets
      title: Five9DomainQueueResponse
      description: >-
        Queued work and estimated completion for one Five9 Domain, by bucket.


        `buckets` is keyed by the provider's operation-type name (for example

        `Upload`) and reports every bucket the Domain has, so one request covers
        the

        whole Domain. `as_of` is when the underlying counts were read.
      example:
        as_of: '2026-08-14T18:00:00Z'
        buckets:
          Upload:
            completion:
              binding_source: window
              binding_window: '3600'
              caveats: []
              eta_at: '2026-08-14T19:00:00Z'
              eta_seconds: 3600
              hold_causes: []
              paced_batches_active: 0
            estimated_calls: 20
            estimated_calls_unpaused: 20
            paused_items: 0
            paused_records: 0
            queued_items: 20
            queued_records: 1000000
        tenancy_id: ten_9f2c1a7b3d4e5f60
    Five9BucketQueueDepth:
      properties:
        queued_items:
          type: integer
          title: Queued Items
        paused_items:
          type: integer
          title: Paused Items
        queued_records:
          type: integer
          title: Queued Records
        paused_records:
          type: integer
          title: Paused Records
        estimated_calls:
          type: integer
          title: Estimated Calls
        estimated_calls_unpaused:
          type: integer
          title: Estimated Calls Unpaused
        completion:
          $ref: '#/components/schemas/Five9QueueCompletion'
      type: object
      required:
        - queued_items
        - paused_items
        - queued_records
        - paused_records
        - estimated_calls
        - estimated_calls_unpaused
        - completion
      title: Five9BucketQueueDepth
      description: >-
        How much work is waiting in one rate bucket, in all three units.


        `estimated_calls` is an ESTIMATE, not a count: work aimed at the same
        target

        merges into fuller provider calls when it is claimed, so the real number
        of

        calls is usually lower than a naive per-item count and can only be known
        at

        dispatch time. `queued_records` and `queued_items` are exact.


        The `paused_*` figures are the subset of the queued work currently held
        by a

        pause, and `estimated_calls_unpaused` is the projected call cost of the
        work

        that is actually free to run — which is what the completion estimate
        paces.
      example:
        completion:
          binding_source: window
          binding_window: '3600'
          caveats: []
          eta_at: '2026-08-14T19:00:00Z'
          eta_seconds: 3600
          hold_causes: []
          paced_batches_active: 0
        estimated_calls: 20
        estimated_calls_unpaused: 20
        paused_items: 0
        paused_records: 0
        queued_items: 20
        queued_records: 1000000
    Five9QueueCompletion:
      properties:
        eta_seconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Eta Seconds
        eta_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Eta At
        binding_window:
          anyOf:
            - type: string
            - type: 'null'
          title: Binding Window
        binding_source:
          $ref: '#/components/schemas/Five9EtaBindingSource'
        unknown_reason:
          anyOf:
            - $ref: '#/components/schemas/Five9EtaUnknownReason'
            - type: 'null'
        hold_causes:
          items:
            type: string
          type: array
          title: Hold Causes
          default: []
        caveats:
          items:
            type: string
          type: array
          title: Caveats
          default: []
        paced_batches_active:
          type: integer
          title: Paced Batches Active
          default: 0
      type: object
      required:
        - binding_source
      title: Five9QueueCompletion
      description: >-
        When the queued work for one bucket is expected to finish.


        `eta_seconds` is `null` ONLY when completion is genuinely indeterminate
        — an

        indefinite pause, or a bucket backing off near exhaustion — and a null
        ETA

        always carries an `unknown_reason` naming the cause. Anything computable
        is

        reported as a number rather than withheld.


        `binding_window` names which window is the constraint (`"60"`, `"3600"`
        or

        `"86400"`), so a customer can see whether the per-minute, hourly or
        daily

        limit is the one holding their work; `binding_source` says whether a
        window,

        the spacing between calls, a slowed release policy or a pause is what
        binds.

        `hold_causes` lists the holds folded into the figure, `caveats` carries
        any

        qualifier a reader needs to interpret it — as short machine-readable
        tokens

        rather than prose, so a client can branch on them — and

        `paced_batches_active` counts the batches currently releasing on a

        deliberately slowed schedule.


        Estimates are computed fresh on every read, so none of these values can
        go

        stale between requests.
      example:
        binding_source: window
        binding_window: '3600'
        caveats:
          - estimated_calls_pre_coalescing_projection
        eta_at: '2026-08-14T19:00:00Z'
        eta_seconds: 3600
        hold_causes: []
        paced_batches_active: 0
    Five9EtaBindingSource:
      type: string
      enum:
        - window
        - spacing
        - pacing
        - hold
        - empty
      title: Five9EtaBindingSource
      description: >-
        What constrains the estimated completion time.


        - `window`: a rate window is the constraint — the queue drains at the
          bucket's permitted rate.
        - `spacing`: the minimum interval enforced between consecutive calls
        binds
          before any window does.
        - `pacing`: a deliberately slowed release policy on one or more batches
        is
          slower than the provider rate.
        - `hold`: a pause with a known expiry is the constraint.

        - `empty`: nothing is queued, so there is nothing to wait for.
    Five9EtaUnknownReason:
      type: string
      enum:
        - paused_indefinitely
        - escalated_near_exhaustion
        - no_effective_cap
      title: Five9EtaUnknownReason
      description: >-
        Why an estimated completion time could not be computed.


        - `paused_indefinitely`: a pause with no expiry is in force, so nothing
        can
          say when the queue resumes.
        - `escalated_near_exhaustion`: the bucket is backing off near exhaustion
        and
          the drain rate is no longer predictable.
        - `no_effective_cap`: the bucket has no usable budget to divide by, so
        there
          is no rate to project from.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````