> ## 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.

# Diagnose 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}/diagnose
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}/diagnose:
    get:
      tags:
        - Services
        - Services
      summary: Diagnose 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: diagnose_service
      parameters:
        - name: ident
          in: path
          required: true
          schema:
            type: string
            title: Ident
        - name: log_tail
          in: query
          required: false
          schema:
            type: integer
            default: 50
            title: Log Tail
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiagnoseResponse'
          description: HTTP 200 response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: HTTP 422 response
components:
  schemas:
    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
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    JobKind:
      type: string
      enum:
        - batch
        - service
        - model
        - database
      title: JobKind
    JobStatus:
      type: string
      enum:
        - pending
        - scheduled
        - running
        - paused
        - completed
        - failed
        - cancelled
        - retrying
        - building
        - degraded
        - restarting
        - stopped
      title: JobStatus
    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
    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

````