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

# Inspect readiness and environment connection URLs



## OpenAPI

````yaml /api-reference/openapi.json get /api/sessions/{sessionId}
openapi: 3.1.0
info:
  title: Archal API
  version: 1.0.0
  summary: >-
    Stateful testing environments with separate lifecycle and provider-scoped
    credentials
  description: >-
    Use a workspace credential for lifecycle operations. Each created
    environment returns a short-lived provider-shaped credential for its
    isolated data plane; the workspace credential is never forwarded to or
    accepted by provider-compatible endpoints.
servers:
  - url: https://api.archal.ai
security: []
paths:
  /api/sessions/{sessionId}:
    get:
      summary: Inspect readiness and environment connection URLs
      operationId: getEnvironmentSession
      parameters:
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  sessionId:
                    type: string
                    minLength: 1
                  status:
                    type: string
                    enum:
                      - starting
                      - ready
                      - running
                      - tearing_down
                      - ended
                      - expired
                      - failed
                  alive:
                    type: boolean
                  environmentIds:
                    type: array
                    items:
                      type: string
                      minLength: 1
                      maxLength: 80
                  environments:
                    type: object
                    propertyNames:
                      type: string
                      minLength: 1
                      maxLength: 80
                    additionalProperties:
                      oneOf:
                        - type: object
                          properties:
                            status:
                              type: string
                              const: ready
                            apiBaseUrl:
                              type: string
                              format: uri
                            mcpUrl:
                              anyOf:
                                - type: string
                                  format: uri
                                - type: 'null'
                            credentials:
                              type: object
                              properties:
                                kind:
                                  type: string
                                  const: provider
                                expiresAt:
                                  type: string
                                  minLength: 1
                                headers:
                                  type: object
                                  propertyNames:
                                    type: string
                                    minLength: 1
                                  additionalProperties:
                                    type: string
                                    minLength: 1
                              required:
                                - kind
                                - expiresAt
                                - headers
                              additionalProperties: false
                          required:
                            - status
                            - apiBaseUrl
                            - mcpUrl
                            - credentials
                          additionalProperties: false
                        - type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - starting
                                - dead
                            apiBaseUrl:
                              type: 'null'
                            mcpUrl:
                              type: 'null'
                            credentials:
                              type: 'null'
                          required:
                            - status
                            - apiBaseUrl
                            - mcpUrl
                            - credentials
                          additionalProperties: false
                  createdAt:
                    type: string
                    minLength: 1
                  expiresAt:
                    type: string
                    minLength: 1
                  endedAt:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: 'null'
                  teardownRequestedAt:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: 'null'
                  lease:
                    type: object
                    properties:
                      expiresAt:
                        type: string
                        minLength: 1
                      idleExpiresAt:
                        anyOf:
                          - type: string
                            minLength: 1
                          - type: 'null'
                      hardExpiresAt:
                        type: string
                        minLength: 1
                      renewable:
                        type: boolean
                    required:
                      - expiresAt
                      - idleExpiresAt
                      - hardExpiresAt
                      - renewable
                    additionalProperties: false
                required:
                  - sessionId
                  - status
                  - alive
                  - environmentIds
                  - environments
                  - createdAt
                  - expiresAt
                  - endedAt
                additionalProperties: false
        '400':
          description: The request was rejected
          headers:
            X-Request-Id:
              description: Request correlation identifier
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying when present
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  issues:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                      required:
                        - path
                        - message
                      additionalProperties: true
                additionalProperties: true
        '401':
          description: The request was rejected
          headers:
            X-Request-Id:
              description: Request correlation identifier
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying when present
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  issues:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                      required:
                        - path
                        - message
                      additionalProperties: true
                additionalProperties: true
        '403':
          description: The request was rejected
          headers:
            X-Request-Id:
              description: Request correlation identifier
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying when present
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  issues:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                      required:
                        - path
                        - message
                      additionalProperties: true
                additionalProperties: true
        '404':
          description: The request was rejected
          headers:
            X-Request-Id:
              description: Request correlation identifier
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying when present
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  issues:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                      required:
                        - path
                        - message
                      additionalProperties: true
                additionalProperties: true
        '409':
          description: The request was rejected
          headers:
            X-Request-Id:
              description: Request correlation identifier
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying when present
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  issues:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                      required:
                        - path
                        - message
                      additionalProperties: true
                additionalProperties: true
        '413':
          description: The request was rejected
          headers:
            X-Request-Id:
              description: Request correlation identifier
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying when present
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  issues:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                      required:
                        - path
                        - message
                      additionalProperties: true
                additionalProperties: true
        '429':
          description: The request was rejected
          headers:
            X-Request-Id:
              description: Request correlation identifier
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying when present
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  issues:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                      required:
                        - path
                        - message
                      additionalProperties: true
                additionalProperties: true
        '500':
          description: The request was rejected
          headers:
            X-Request-Id:
              description: Request correlation identifier
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying when present
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  issues:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                      required:
                        - path
                        - message
                      additionalProperties: true
                additionalProperties: true
        '502':
          description: The request was rejected
          headers:
            X-Request-Id:
              description: Request correlation identifier
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying when present
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  issues:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                      required:
                        - path
                        - message
                      additionalProperties: true
                additionalProperties: true
        '503':
          description: The request was rejected
          headers:
            X-Request-Id:
              description: Request correlation identifier
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying when present
              schema:
                type: integer
                minimum: 0
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                  code:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  issues:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        message:
                          type: string
                      required:
                        - path
                        - message
                      additionalProperties: true
                additionalProperties: true
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Archal workspace API key
      description: Used by lifecycle, catalog, and state endpoints

````