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

# Read live Queue state

> Returns waiting and now-serving state for services allowed by the credential.



## OpenAPI

````yaml /api/openapi.yaml get /api/public/v1/queue/state
openapi: 3.1.0
info:
  title: Layarva Public API
  version: 1.0.0
  description: >-
    Implemented Queue and prayer-schedule public endpoints. Dashboard server
    actions are not public APIs.
servers:
  - url: https://app.layarva.com
security: []
paths:
  /api/public/v1/queue/state:
    get:
      tags:
        - Queue
      summary: Read live Queue state
      description: >-
        Returns waiting and now-serving state for services allowed by the
        credential.
      operationId: getQueueState
      parameters:
        - $ref: '#/components/parameters/CorrelationId'
      responses:
        '200':
          description: Current Queue state
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      generatedAt:
                        type: string
                        format: date-time
                      services:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            waiting:
                              type: integer
                            nowServing:
                              anyOf:
                                - type: 'null'
                                - type: object
                                  properties:
                                    number:
                                      type: string
                                    counterName:
                                      type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - queueBearer: []
components:
  parameters:
    CorrelationId:
      name: X-Correlation-ID
      in: header
      required: false
      schema:
        type: string
        maxLength: 120
        pattern: ^[A-Za-z0-9_.:-]+$
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: Credential scope or Queue Unit prevents the operation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  schemas:
    ErrorEnvelope:
      type: object
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    queueBearer:
      type: http
      scheme: bearer
      bearerFormat: Queue API key

````