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

# Get adminobservabilitytask queue

> Get the AI field generation queue health snapshot with the per-space ranking

Required token scopes: `instance|read`



## OpenAPI

````yaml /swagger.json get /admin/observability/task-queue
openapi: 3.0.0
info:
  version: 1.0.0
  title: Teable App
  description: Manage Data as easy as drink a cup of tea
  x-logo:
    backgroundColor: '#F0F0F0'
    altText: Teable logo
servers:
  - url: https://app.teable.ai/api
security: []
tags:
  - name: base
    x-group: project
  - name: base node
    x-group: project node
  - name: base-share
    x-group: project-share
paths:
  /admin/observability/task-queue:
    get:
      tags:
        - admin
        - observability
      description: >-
        Get the AI field generation queue health snapshot with the per-space
        ranking


        Required token scopes: `instance|read`
      parameters:
        - schema:
            type: string
            enum:
              - '0'
              - '1'
              - 'true'
              - 'false'
            description: >-
              Force a fresh sample when 1/true. Cached samples are returned by
              default.
          required: false
          description: >-
            Force a fresh sample when 1/true. Cached samples are returned by
            default.
          name: refresh
          in: query
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - healthy
                      - degraded
                  reasons:
                    type: array
                    items:
                      type: string
                      enum:
                        - stalled_runs
                        - backlog_aging
                        - high_failure_rate
                        - slot_drift
                        - orphan_backlog
                        - watchdog_disabled
                  sampledAt:
                    type: string
                  config:
                    type: object
                    properties:
                      topupWindowFactor:
                        type: number
                      stalledStalenessMs:
                        type: number
                    required:
                      - topupWindowFactor
                      - stalledStalenessMs
                  backlog:
                    type: object
                    properties:
                      pending:
                        type: number
                      queued:
                        type: number
                      processing:
                        type: number
                      oldestPendingAgeMs:
                        type: number
                      orphanActive:
                        type: number
                    required:
                      - pending
                      - queued
                      - processing
                      - oldestPendingAgeMs
                      - orphanActive
                  recent:
                    type: object
                    properties:
                      windowMs:
                        type: number
                      succeeded:
                        type: number
                      failed:
                        type: number
                      skipped:
                        type: number
                      cancelled:
                        type: number
                      failureRate:
                        type: number
                    required:
                      - windowMs
                      - succeeded
                      - failed
                      - skipped
                      - cancelled
                      - failureRate
                  watchdog:
                    type: object
                    properties:
                      disabled:
                        type: boolean
                      intervalMs:
                        type: number
                      lastRunAt:
                        type: string
                      lastResult:
                        type: object
                        properties:
                          recovered:
                            type: number
                          finalized:
                            type: number
                        required:
                          - recovered
                          - finalized
                    required:
                      - disabled
                      - intervalMs
                  lastActivityAt:
                    type: string
                  spaces:
                    type: array
                    items:
                      type: object
                      properties:
                        spaceId:
                          type: string
                        spaceName:
                          type: string
                          nullable: true
                        pending:
                          type: number
                        queued:
                          type: number
                        processing:
                          type: number
                        oldestPendingAgeMs:
                          type: number
                        slotLimit:
                          type: number
                        slotHeld:
                          type: number
                          nullable: true
                        drifted:
                          type: boolean
                      required:
                        - spaceId
                        - spaceName
                        - pending
                        - queued
                        - processing
                        - oldestPendingAgeMs
                        - slotLimit
                        - slotHeld
                        - drifted
                  spacesTruncated:
                    type: boolean
                  stalledCount:
                    type: number
                required:
                  - status
                  - reasons
                  - sampledAt
                  - config
                  - backlog
                  - recent
                  - watchdog
                  - spaces
                  - spacesTruncated
                  - stalledCount
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request GET \
              --url 'https://app.teable.ai/api/admin/observability/task-queue?refresh=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: JavaScript
          source: >-
            const url =
            'https://app.teable.ai/api/admin/observability/task-queue?refresh=SOME_STRING_VALUE';

            const options = {method: 'GET', headers: {Authorization: 'Bearer
            REPLACE_BEARER_TOKEN'}};


            try {
              const response = await fetch(url, options);
              const data = await response.json();
              console.log(data);
            } catch (error) {
              console.error(error);
            }
        - lang: Node.js
          source: |-
            const http = require('https');

            const options = {
              method: 'GET',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/admin/observability/task-queue?refresh=SOME_STRING_VALUE',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("app.teable.ai")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("GET",
            "/api/admin/observability/task-queue?refresh=SOME_STRING_VALUE",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````