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

# List device conditions

> Upsert (POST) and read (list/retrieve) device conditions.

POST upserts on ``(device, type)`` — there is no separate PATCH because the
natural key makes create and update the same operation.



## OpenAPI

````yaml /openapi/fleet-manager-openapi.yaml get /api/v1/device-conditions/
openapi: 3.0.3
info:
  title: Fleet Manager API
  version: 1.0.0
  description: API for the Nscale Fleet Manager
servers: []
security: []
paths:
  /api/v1/device-conditions/:
    get:
      tags:
        - Device Conditions
      summary: List device conditions
      description: >-
        Upsert (POST) and read (list/retrieve) device conditions.


        POST upserts on ``(device, type)`` — there is no separate PATCH because
        the

        natural key makes create and update the same operation.
      operationId: api_v1_device_conditions_list
      parameters:
        - in: query
          name: condition_of
          schema:
            $ref: '#/components/schemas/DeviceConditionOfEnum'
          description: Filter by derivation domain.
        - in: query
          name: decisive
          schema:
            type: boolean
        - in: query
          name: device_id
          schema:
            type: array
            items:
              type: string
              format: uuid
          description: Multiple values may be separated by commas.
          explode: false
          style: form
        - name: limit
          required: false
          in: query
          description: Number of results to return per page.
          schema:
            type: integer
            maximum: 500
            minimum: 1
        - name: page
          required: false
          in: query
          description: A page number within the paginated result set.
          schema:
            type: integer
        - in: query
          name: source
          schema:
            $ref: '#/components/schemas/DeviceConditionSourceEnum'
          description: Filter by owning source.
        - in: query
          name: status
          schema:
            $ref: '#/components/schemas/DeviceConditionStatusEnum'
          description: Filter by condition status.
        - in: query
          name: type
          schema:
            $ref: '#/components/schemas/DeviceConditionTypeEnum'
          description: Filter by condition type.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedDeviceConditionList'
          description: ''
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication credentials were not provided or are invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: You do not have permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - oauth2:
            - device-condition:read
        - cookieAuth: []
components:
  schemas:
    DeviceConditionOfEnum:
      enum:
        - operational_status
        - health_status
        - none
      type: string
      description: |-
        * `operational_status` - Operational status
        * `health_status` - Health status
        * `none` - None
    DeviceConditionSourceEnum:
      enum:
        - ironic
        - slurm
        - health-status
        - google-custody
        - nvlink-fabric
        - backend-fabric
      type: string
      description: |-
        * `ironic` - Ironic
        * `slurm` - Slurm
        * `health-status` - Health status
        * `google-custody` - Google custody
        * `nvlink-fabric` - NVLink fabric
        * `backend-fabric` - Back-end fabric
    DeviceConditionStatusEnum:
      enum:
        - 'True'
        - 'False'
        - Unknown
      type: string
      description: |-
        * `True` - True
        * `False` - False
        * `Unknown` - Unknown
    DeviceConditionTypeEnum:
      enum:
        - ProvisioningHealthy
        - MaintenanceClear
        - Enrolled
        - InValidationPool
        - InstanceAllocated
        - CustomerAllocated
        - CustomerReady
        - SlurmMember
        - SlurmSchedulable
        - TelemetryHealthy
        - SystemHealthy
        - ChassisHealthy
        - ProcessorHealthy
        - MemoryHealthy
        - StorageHealthy
        - DiskHealthy
        - PowerSupplyHealthy
        - GpuHealthy
        - FpgaHealthy
        - CustodyIntent
        - FrontendPortsInCustomerVrf
        - NvLinkGpusInRepairPartition
        - BackendPortsInMaintenanceVrf
      type: string
      description: |-
        * `ProvisioningHealthy` - Provisioning healthy
        * `MaintenanceClear` - Maintenance clear
        * `Enrolled` - Enrolled
        * `InValidationPool` - In validation pool
        * `InstanceAllocated` - Instance allocated
        * `CustomerAllocated` - Customer allocated
        * `CustomerReady` - Customer ready
        * `SlurmMember` - Slurm member
        * `SlurmSchedulable` - Slurm schedulable
        * `TelemetryHealthy` - Telemetry healthy
        * `SystemHealthy` - System healthy
        * `ChassisHealthy` - Chassis healthy
        * `ProcessorHealthy` - Processor healthy
        * `MemoryHealthy` - Memory healthy
        * `StorageHealthy` - Storage healthy
        * `DiskHealthy` - Disk healthy
        * `PowerSupplyHealthy` - Power supply healthy
        * `GpuHealthy` - GPU healthy
        * `FpgaHealthy` - FPGA healthy
        * `CustodyIntent` - Custody intent
        * `FrontendPortsInCustomerVrf` - Front-end ports in customer VRF
        * `NvLinkGpusInRepairPartition` - GPUs in NVLink repair partition
        * `BackendPortsInMaintenanceVrf` - Back-end ports in maintenance VRF
    PaginatedDeviceConditionList:
      type: object
      required:
        - count
        - results
      properties:
        count:
          type: integer
          example: 123
        next:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=4
        previous:
          type: string
          nullable: true
          format: uri
          example: http://api.example.org/accounts/?page=2
        results:
          type: array
          items:
            $ref: '#/components/schemas/DeviceCondition'
    ErrorResponse:
      type: object
      description: >-
        Uniform error body for every 4xx/5xx response. `detail` is a
        human-readable message, always present, safe to display to end users.
        `code` is the machine-readable identifier. `field_errors` lists
        per-input-field validation messages and is empty for non-field errors
        (auth, permission, not-found, conflict, server).
      required:
        - detail
        - code
        - field_errors
      properties:
        detail:
          type: string
        code:
          $ref: '#/components/schemas/ErrorCodeEnum'
        field_errors:
          type: array
          items:
            $ref: '#/components/schemas/FieldError'
    DeviceCondition:
      type: object
      description: 'A device condition: the latest observation about one aspect of a device.'
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        device:
          type: string
          format: uuid
          description: The device this observation belongs to.
        type:
          $ref: '#/components/schemas/DeviceConditionTypeEnum'
        status:
          $ref: '#/components/schemas/DeviceConditionStatusEnum'
        reason:
          type: string
          default: ''
          description: >-
            Opaque, source-owned CamelCase cause code scoped to the condition
            type. Fleet Manager does not interpret it; blank when no cause is
            reported.
          maxLength: 128
        message:
          type: string
          default: ''
          description: Human-readable detail for operators. Optional.
          maxLength: 4096
        source:
          $ref: '#/components/schemas/DeviceConditionSourceEnum'
        condition_of:
          allOf:
            - $ref: '#/components/schemas/DeviceConditionOfEnum'
          readOnly: true
          description: >-
            The derived top-level device status this condition contributes to,
            or none when it is eligibility-only. Stamped by the hub from the
            code-owned type registry, not the reporting source.


            * `operational_status` - Operational status

            * `health_status` - Health status

            * `none` - None
        decisive:
          type: boolean
          readOnly: true
          description: >-
            Whether this condition is decisive in the current derivation of its
            condition_of domain's status from conditions. Maintained by the
            hub-owned derivation on every materialise; independent of
            out-of-band status overrides; always false for condition_of=none;
            never client-set.
        observed_at:
          type: string
          format: date-time
          readOnly: true
          description: When the source made an observation.
        last_transitioned_at:
          type: string
          format: date-time
          readOnly: true
          description: >-
            When 'status' last changed value. The upsert path bumps this only on
            a real status transition, so it survives no-op re-reports of the
            same status and stays the 'when did this actually flip' signal.
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - condition_of
        - created_at
        - decisive
        - device
        - id
        - last_transitioned_at
        - observed_at
        - source
        - status
        - type
        - updated_at
    ErrorCodeEnum:
      type: string
      description: >-
        Stable machine-readable error identifier. New members may be added
        within this API version; clients must tolerate unknown values.
      enum:
        - error
        - invalid
        - parse_error
        - authentication_failed
        - not_authenticated
        - permission_denied
        - not_found
        - method_not_allowed
        - not_acceptable
        - unsupported_media_type
        - conflict
        - enrollment_infrastructure_reference_pending
        - enrollment_infrastructure_reference_changed
        - unprocessable_entity
        - throttled
        - service_unavailable
    FieldError:
      type: object
      description: One input field's validation messages.
      required:
        - field
        - messages
      properties:
        field:
          type: string
          description: >-
            Dotted path to the offending input field, or to the collection row
            when the whole row is invalid (e.g. `filters.end_date`,
            `memberships.0.role`, `memberships.0`).
        messages:
          type: array
          minItems: 1
          items:
            type: string
  securitySchemes:
    oauth2:
      type: oauth2
      flows: {}
    cookieAuth:
      type: apiKey
      in: cookie
      name: sessionid

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.