> ## 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 allocatable devices per rack

> One site's allocatable devices, grouped into the same rack grid as `current`.

Each device reports the allocation holding it *now* and any advisory warnings.
Devices that cannot be allocated at all are absent rather than warned about.



## OpenAPI

````yaml /openapi/fleet-manager-openapi.yaml get /api/v1/allocations/device-candidates/
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/allocations/device-candidates/:
    get:
      tags:
        - Allocations
      summary: List allocatable devices per rack
      description: >-
        One site's allocatable devices, grouped into the same rack grid as
        `current`.


        Each device reports the allocation holding it *now* and any advisory
        warnings.

        Devices that cannot be allocated at all are absent rather than warned
        about.
      operationId: api_v1_allocations_device_candidates_retrieve
      parameters:
        - in: query
          name: site_id
          schema:
            type: string
            format: uuid
          description: Site ID used to constrain the unpaginated compact response.
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllocationCandidates'
          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:
            - allocation:read
        - cookieAuth: []
components:
  schemas:
    AllocationCandidates:
      type: object
      description: Response shape of the device-candidates read.
      properties:
        site_id:
          type: string
          format: uuid
        rack_position_strategy:
          allOf:
            - $ref: '#/components/schemas/RackPositionStrategyEnum'
          description: >-
            How every `position` and `row` in this response was determined. The
            same value the standup racks endpoint reports for this site.


            * `derived_from_name` - DERIVED_FROM_NAME

            * `derived_from_scalable_unit` - DERIVED_FROM_SCALABLE_UNIT
        racks:
          type: array
          items:
            $ref: '#/components/schemas/AllocationCandidateRack'
      required:
        - rack_position_strategy
        - racks
        - site_id
    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'
    RackPositionStrategyEnum:
      enum:
        - derived_from_name
        - derived_from_scalable_unit
      type: string
      description: |-
        * `derived_from_name` - DERIVED_FROM_NAME
        * `derived_from_scalable_unit` - DERIVED_FROM_SCALABLE_UNIT
    AllocationCandidateRack:
      type: object
      description: A rack and the devices in it that can be allocated.
      properties:
        rack_id:
          type: string
          format: uuid
        rack_name:
          type: string
        location_id:
          type: string
          format: uuid
          description: >-
            The rack's `Location` — the hall row, at sites that model rows.
            Group racks by this rather than by `location_name`: a site can hold
            two rows sharing a name, and they are different rows.
        location_name:
          type: string
        row:
          type: integer
          minimum: 1
          nullable: true
          description: >-
            The row's rank across the site, read off `location_name` — `Row B`
            reports 2. Pairs with `position` to place a rack on a grid: `(2,
            10)` is row B, slot 10. An absolute ordinal, not a dense 1..N index,
            so a site whose rows jump `Row D` to `Row F` reports 4 then 6 and
            lane 5 is yours to draw or close. Null for every rack when the
            site's rows cannot be told apart. See `rack_position_strategy`.
        position:
          type: integer
          minimum: 1
          nullable: true
          description: >-
            The rack's slot along its row — `A10` reports 10, so it sorts after
            `A9` and before `A11`. The absolute number read off the rack name,
            not a dense 1..N index, so an unoccupied slot leaves a hole; only
            comparable within one `location_id`. Null when the slot cannot be
            determined. See `rack_position_strategy`.
        devices:
          type: array
          items:
            $ref: '#/components/schemas/AllocationCandidateDevice'
      required:
        - devices
        - location_id
        - location_name
        - position
        - rack_id
        - rack_name
        - row
    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
    AllocationCandidateDevice:
      type: object
      description: One device offered to the allocation builder.
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        current_allocation_id:
          type: string
          format: uuid
          nullable: true
          description: >-
            The allocation holding this device now, or null. A device whose only
            allocation starts in the future reads null here and still appears
            under that allocation in the current-allocations response.
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/AllocationCandidateWarningEnum'
          description: >-
            Advisory only — none of these makes the device unallocatable. A
            device that cannot be allocated at all is absent from this response.
      required:
        - current_allocation_id
        - id
        - name
        - warnings
    AllocationCandidateWarningEnum:
      enum:
        - job_running
        - not_customer_ready
      type: string
      description: |-
        * `job_running` - JOB_RUNNING
        * `not_customer_ready` - NOT_CUSTOMER_READY
  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.