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

# Get inventory device

> Read-only customer inventory projection endpoint.



## OpenAPI

````yaml /openapi/fleet-manager-openapi.yaml get /api/v1/inventory/devices/{id}/
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/inventory/devices/{id}/:
    get:
      tags:
        - Inventory
      summary: Get inventory device
      description: Read-only customer inventory projection endpoint.
      operationId: api_v1_inventory_devices_retrieve
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventoryDevice'
          description: ''
        '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'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - oauth2:
            - inventory:read
        - cookieAuth: []
components:
  schemas:
    InventoryDevice:
      type: object
      description: >-
        Customer-facing inventory projection row keyed by Fleet Manager Device
        UUID.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          readOnly: true
        netbox_id:
          type: integer
          readOnly: true
        position:
          type: number
          format: double
          readOnly: true
          nullable: true
        serial_number:
          type: string
          nullable: true
          readOnly: true
        bmc_ip:
          type: string
          nullable: true
          readOnly: true
        asset_tag:
          type: string
          readOnly: true
        description:
          type: string
          readOnly: true
        primary_ip:
          type: string
          nullable: true
          readOnly: true
        custom_fields:
          type: object
          additionalProperties:
            type: string
          readOnly: true
        device_type:
          allOf:
            - $ref: '#/components/schemas/InventoryDeviceType'
          readOnly: true
        role:
          allOf:
            - $ref: '#/components/schemas/InventoryRole'
          readOnly: true
        rack:
          allOf:
            - $ref: '#/components/schemas/InventoryRack'
          readOnly: true
        location:
          allOf:
            - $ref: '#/components/schemas/InventoryLocation'
          readOnly: true
        site:
          allOf:
            - $ref: '#/components/schemas/InventorySite'
          readOnly: true
        status:
          allOf:
            - $ref: '#/components/schemas/InventoryDeviceStatusEnum'
          readOnly: true
        interfaces:
          type: array
          items:
            $ref: '#/components/schemas/InventoryInterface'
          readOnly: true
        fru:
          type: array
          items:
            $ref: '#/components/schemas/FruComponent'
          readOnly: true
        switch_port:
          type: string
          nullable: true
          readOnly: true
        source_updated_at:
          type: string
          format: date-time
          readOnly: true
        last_synced_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - asset_tag
        - bmc_ip
        - custom_fields
        - description
        - device_type
        - fru
        - id
        - interfaces
        - last_synced_at
        - location
        - name
        - netbox_id
        - position
        - primary_ip
        - rack
        - role
        - serial_number
        - site
        - source_updated_at
        - status
        - switch_port
    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'
    InventoryDeviceType:
      type: object
      description: Device type details exposed through the customer inventory API.
      properties:
        manufacturer:
          type: string
          readOnly: true
        model:
          type: string
          readOnly: true
        kind:
          allOf:
            - $ref: '#/components/schemas/ProjectionDeviceKindEnum'
          readOnly: true
        part_number:
          type: string
          nullable: true
          readOnly: true
        u_height:
          type: number
          format: double
          readOnly: true
          nullable: true
      required:
        - kind
        - manufacturer
        - model
        - part_number
        - u_height
    InventoryRole:
      type: object
      description: Device role details exposed through the customer inventory API.
      properties:
        name:
          type: string
          readOnly: true
        slug:
          type: string
          readOnly: true
      required:
        - name
        - slug
    InventoryRack:
      type: object
      description: Rack details exposed through the customer inventory API.
      properties:
        name:
          type: string
          readOnly: true
        location:
          type: string
          readOnly: true
        serial_number:
          type: string
          nullable: true
          readOnly: true
      required:
        - location
        - name
        - serial_number
    InventoryLocation:
      type: object
      description: >-
        The device's location: its name and the ordered list of ancestor
        locations,

        from the site root down to the location's immediate parent.
        ``ancestors`` is empty

        for a top-level location.
      properties:
        name:
          type: string
          readOnly: true
        description:
          type: string
          readOnly: true
        ancestors:
          type: array
          items:
            $ref: '#/components/schemas/InventoryLocationAncestor'
          readOnly: true
      required:
        - ancestors
        - description
        - name
    InventorySite:
      type: object
      description: Site details exposed through the customer inventory API.
      properties:
        name:
          type: string
          readOnly: true
        slug:
          type: string
          readOnly: true
        netbox_id:
          type: integer
          nullable: true
          readOnly: true
        datacenter:
          type: string
          nullable: true
          readOnly: true
        description:
          type: string
          nullable: true
          readOnly: true
        region:
          type: string
          nullable: true
          readOnly: true
        syslog_server:
          type: string
          nullable: true
          readOnly: true
      required:
        - datacenter
        - description
        - name
        - netbox_id
        - region
        - slug
        - syslog_server
    InventoryDeviceStatusEnum:
      allOf:
        - $ref: '#/components/schemas/DeviceInventoryStatusEnum'
    InventoryInterface:
      type: object
      description: Interface details exposed through the customer inventory API.
      properties:
        name:
          type: string
          readOnly: true
        type:
          type: string
          readOnly: true
        mac_address:
          type: string
          nullable: true
          readOnly: true
        ip_addresses:
          type: array
          items:
            type: string
          readOnly: true
        ib_device_guid:
          type: string
          nullable: true
          readOnly: true
        speed:
          type: integer
          nullable: true
          readOnly: true
        enabled:
          type: boolean
          readOnly: true
      required:
        - enabled
        - ib_device_guid
        - ip_addresses
        - mac_address
        - name
        - speed
        - type
    FruComponent:
      type: object
      description: >-
        One field-replaceable-unit component sourced from a NetBox module.


        ``serial_number`` is the FRU identity (always present — the ingest
        categorizer

        drops modules with no serial). ``part_number`` feeds Borneo memory FRU
        and

        ``model_number`` feeds Borneo disk FRU; both are null for categories
        that do

        not carry them.
      properties:
        category:
          $ref: '#/components/schemas/FruComponentCategoryEnum'
        serial_number:
          type: string
        part_number:
          type: string
          nullable: true
        model_number:
          type: string
          nullable: true
      required:
        - category
        - serial_number
    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
    ProjectionDeviceKindEnum:
      enum:
        - COMPUTE
        - SWITCH
      type: string
      description: |-
        * `COMPUTE` - Compute
        * `SWITCH` - Switch
    InventoryLocationAncestor:
      type: object
      description: >-
        One ancestor node of a device's location, within the ordered
        ``ancestors`` list.
      properties:
        name:
          type: string
          readOnly: true
        slug:
          type: string
          readOnly: true
        description:
          type: string
          readOnly: true
      required:
        - description
        - name
        - slug
    DeviceInventoryStatusEnum:
      enum:
        - planned
        - staged
        - active
        - failed
        - offline
        - rma
        - returned
        - decommissioning
        - decommissioned
        - inventory
        - unknown
      type: string
      description: |-
        * `planned` - Planned
        * `staged` - Staged
        * `active` - Active
        * `failed` - Failed
        * `offline` - Offline
        * `rma` - RMA
        * `returned` - Returned
        * `decommissioning` - Decommissioning
        * `decommissioned` - Decommissioned
        * `inventory` - Inventory
        * `unknown` - Unknown
    FruComponentCategoryEnum:
      enum:
        - cpu
        - gpu
        - disk
        - nic
        - memory
      type: string
      description: |-
        * `cpu` - cpu
        * `gpu` - gpu
        * `disk` - disk
        * `nic` - nic
        * `memory` - memory
  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.