---
title: "Assign Device To Farm"
method: POST
path: "/api/v1/admin/devices/{device_id}/assignments"
tags: ["device administration"]
---

# Assign Device To Farm

`POST /api/v1/admin/devices/{device_id}/assignments`

## Request

- Base URL: `https://api.brumby.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.brumby.com/api/v1/admin/devices/{device_id}/assignments`
- Auth: HTTP bearer

## Path parameters

- `device_id` string, required

## Request body

- InstallationAssign
  - `external_farm_id` string, required
  - `farm_name` string, required
  - `reason` string, nullable

## Response `201`

Successful Response

- InstallationResponse
  - `installation_id` string, uuid, required
  - `device_id` string, required
  - `external_farm_id` string, required
  - `farm_name` string, required
  - `assigned_by_actor` string, required
  - `assignment_reason` string, nullable, required
  - `kind` 'field' | 'bench', required: Why a device is at a farm. FIELD is the record that matters: a dock physically installed somewhere, and the trail of where it has been. BENCH is a simulator pointed at a farm's geometry so it can fly it, which happens several times a day and means nothing about where any hardware is. Keeping them apart is what lets a bench move be cheap -- no reason typed, no weight -- without burying a real installation under forty test ones.
  - `installed_at` string, date-time, required
  - `uninstalled_at` string, date-time, nullable, required
  - `unassigned_by_actor` string, nullable, required
  - `unassignment_reason` string, nullable, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/brumby/apis/brumby-platform-api.md) - [All operations](https://skmtc.dev/brumby/apis/brumby-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/brumby/apis/brumby-platform-api/revisions/fe185e20813e?raw)
