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

# Wait For Service

> Reference for merged 0.6.0 source. The latest verified binary release is 0.5.5; use your Engine’s /api/openapi.json for its installed contract.



## OpenAPI

````yaml /engine/openapi.json get /api/services/{ident}/wait
openapi: 3.1.0
info:
  title: nerditd
  version: 0.6.0
  description: >-
    Current source interface (0.6.0); verify your installed Engine version. This
    is not a claim that 0.6.0 is released.
servers:
  - url: http://127.0.0.1:9321
    description: Default local Engine; use your configured endpoint.
security: []
paths:
  /api/services/{ident}/wait:
    get:
      tags:
        - Services
        - Services
      summary: Wait For Service
      description: >-
        Reference for merged 0.6.0 source. The latest verified binary release is
        0.5.5; use your Engine’s /api/openapi.json for its installed contract.
      operationId: wait_for_service
      parameters:
        - name: ident
          in: path
          required: true
          schema:
            type: string
            title: Ident
        - name: timeout
          in: query
          required: false
          schema:
            type: integer
            default: 60
            title: Timeout
        - name: version
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Version
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceWaitResponse'
          description: HTTP 200 response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: HTTP 422 response
components:
  schemas:
    ServiceWaitResponse:
      properties:
        outcome:
          type: string
          title: Outcome
        service_name:
          type: string
          title: Service Name
        version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version
        phase:
          anyOf:
            - type: string
            - type: 'null'
          title: Phase
        status:
          $ref: '#/components/schemas/JobStatus'
        public_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Public Url
        public_urls:
          items:
            $ref: '#/components/schemas/PublicUrlEntry'
          type: array
          title: Public Urls
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        error_class:
          anyOf:
            - $ref: '#/components/schemas/ErrorClass'
            - type: 'null'
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        waited_s:
          type: number
          title: Waited S
        diagnosis:
          anyOf:
            - $ref: '#/components/schemas/DiagnoseResponse'
            - type: 'null'
      type: object
      required:
        - outcome
        - service_name
        - status
        - waited_s
      title: ServiceWaitResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    JobStatus:
      type: string
      enum:
        - pending
        - scheduled
        - running
        - paused
        - completed
        - failed
        - cancelled
        - retrying
        - building
        - degraded
        - restarting
        - stopped
      title: JobStatus
    PublicUrlEntry:
      properties:
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        kind:
          type: string
          enum:
            - default
            - hosted
            - domain
          title: Kind
        state:
          type: string
          enum:
            - ready
            - link_down
            - not_entitled
            - withheld
          title: State
        access:
          anyOf:
            - type: string
              enum:
                - private
                - public
            - type: 'null'
          title: Access
        domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Domain
        cert_state:
          anyOf:
            - type: string
              enum:
                - internal
                - disabled
                - pending
                - issued
                - expired
            - type: 'null'
          title: Cert State
      type: object
      required:
        - url
        - kind
        - state
      title: PublicUrlEntry
    ErrorClass:
      type: string
      enum:
        - OOM
        - GPU_FAIL
        - IMAGE_PULL_FAIL
        - USER_ERROR
        - TIMEOUT
        - CONTAINER_FAIL
        - MOUNT_MISSING
        - GPU_OOM
        - PLATFORM_ERROR
        - UNKNOWN
      title: ErrorClass
    DiagnoseResponse:
      properties:
        service_name:
          type: string
          title: Service Name
        kind:
          $ref: '#/components/schemas/JobKind'
        status:
          $ref: '#/components/schemas/JobStatus'
        desired_state:
          anyOf:
            - type: string
            - type: 'null'
          title: Desired State
        last_deploy:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Last Deploy
        last_run:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Last Run
        last_dump:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Last Dump
        error:
          $ref: '#/components/schemas/DiagnoseError'
        forensics:
          $ref: '#/components/schemas/DiagnoseForensics'
        restarts:
          $ref: '#/components/schemas/DiagnoseRestarts'
        health:
          $ref: '#/components/schemas/DiagnoseHealth'
        bindings:
          $ref: '#/components/schemas/DiagnoseBindings'
        build:
          $ref: '#/components/schemas/DiagnoseBuild'
        injected_env_keys:
          items:
            type: string
          type: array
          title: Injected Env Keys
        injected_env_keys_source:
          type: string
          title: Injected Env Keys Source
        pending_env_keys:
          items:
            type: string
          type: array
          title: Pending Env Keys
        logs:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Logs
        remediation:
          $ref: '#/components/schemas/DiagnoseRemediation'
      type: object
      required:
        - service_name
        - kind
        - status
        - error
        - forensics
        - restarts
        - health
        - bindings
        - build
        - injected_env_keys_source
        - remediation
      title: DiagnoseResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    JobKind:
      type: string
      enum:
        - batch
        - service
        - model
        - database
      title: JobKind
    DiagnoseError:
      properties:
        class:
          anyOf:
            - type: string
            - type: 'null'
          title: Class
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
      type: object
      title: DiagnoseError
    DiagnoseForensics:
      properties:
        last_exit_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Last Exit Code
        oom_killed:
          type: boolean
          title: Oom Killed
          default: false
        gpu_oom:
          type: boolean
          title: Gpu Oom
          default: false
        priv_denied:
          type: boolean
          title: Priv Denied
          default: false
        last_crash_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Crash At
      type: object
      title: DiagnoseForensics
    DiagnoseRestarts:
      properties:
        policy:
          anyOf:
            - type: string
            - type: 'null'
          title: Policy
        count:
          type: integer
          title: Count
          default: 0
        max_restarts:
          type: integer
          title: Max Restarts
        window_seconds:
          type: integer
          title: Window Seconds
        window_start:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Window Start
        last_exit_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Exit At
        backoff_s:
          anyOf:
            - type: number
            - type: 'null'
          title: Backoff S
        next_retry_in_s:
          anyOf:
            - type: number
            - type: 'null'
          title: Next Retry In S
      type: object
      required:
        - max_restarts
        - window_seconds
      title: DiagnoseRestarts
    DiagnoseHealth:
      properties:
        spec:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Spec
        probe:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Probe
        observations:
          items:
            type: string
          type: array
          title: Observations
      type: object
      title: DiagnoseHealth
    DiagnoseBindings:
      properties:
        waiting:
          type: boolean
          title: Waiting
          default: false
        messages:
          items:
            type: string
          type: array
          title: Messages
      type: object
      title: DiagnoseBindings
    DiagnoseBuild:
      properties:
        version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version
        last_result:
          type: string
          title: Last Result
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
      type: object
      required:
        - last_result
      title: DiagnoseBuild
    DiagnoseRemediation:
      properties:
        code:
          type: string
          title: Code
        detail:
          type: string
          title: Detail
      type: object
      required:
        - code
        - detail
      title: DiagnoseRemediation

````