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

# Set triage on selected racks

> Apply in_triage to every device across a selected set of racks.

The rack-level mirror of DeviceViewSet.triage: it takes rack_ids + in_triage
and resolves the device set from those racks. Devices already at the target
value are skipped so entered_triage_at only moves on real transitions;
`devices_changed` reports the number whose value actually flipped across all
selected racks.

Exiting triage (in_triage=False) also clears triage_ticket_url, mirroring the
device action (FLEET-1585) -- a rack exit must not leave stale child-ticket
links. parent_ticket_url is left untouched.



## OpenAPI

````yaml /openapi/fleet-manager-openapi.yaml post /api/v1/racks/triage/
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/racks/triage/:
    post:
      tags:
        - Racks
      summary: Set triage on selected racks
      description: >-
        Apply in_triage to every device across a selected set of racks.


        The rack-level mirror of DeviceViewSet.triage: it takes rack_ids +
        in_triage

        and resolves the device set from those racks. Devices already at the
        target

        value are skipped so entered_triage_at only moves on real transitions;

        `devices_changed` reports the number whose value actually flipped across
        all

        selected racks.


        Exiting triage (in_triage=False) also clears triage_ticket_url,
        mirroring the

        device action (FLEET-1585) -- a rack exit must not leave stale
        child-ticket

        links. parent_ticket_url is left untouched.
      operationId: api_v1_racks_triage_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RackTriageRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/RackTriageRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/RackTriageRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RackTriageResponse'
          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:
            - rack:triage
        - cookieAuth: []
components:
  schemas:
    RackTriageRequest:
      type: object
      description: Input payload for the rack triage action.
      properties:
        rack_ids:
          type: array
          items:
            type: string
            format: uuid
        in_triage:
          type: boolean
      required:
        - in_triage
        - rack_ids
    RackTriageResponse:
      type: object
      description: >-
        Result of a rack triage action.


        Mirrors ``DeviceTriageResponseSerializer``: reports how many device rows
        across

        the selected racks actually flipped, with no per-rack breakdown.
      properties:
        in_triage:
          type: boolean
        devices_changed:
          type: integer
      required:
        - devices_changed
        - in_triage
    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'
    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.