update device.md

Update Device

Fleets API · Devices

PATCH https://app.mk.io/api/v1/projects/{project_name}/fleet/devices/{name}

Update a device. To learn more about devices, read Device Concept.

RBAC Capability Required: fleet.device.update

Authentication

Path parameters

Name Type Required Description
project_name string Yes
name string Yes

Request body

Content type: application/json

Example request

curl -X PATCH "https://app.mk.io/api/v1/projects/{project_name}/fleet/devices/{name}" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "metadata": {
    "displayName": "string",
    "labels": {
      "key": "string"
    }
  },
  "spec": {
    "autoPreloadLatestSoftware": true,
    "availableNetworks": [
      {
        "interfaceName": "eth0",
        "networkName": "internet"
      }
    ],
    "desiredSoftwareVersion": "1.0.0.2",
    "geolocation": {
      "coordinates": [
        0
      ]
    },
    "locationId": "string",
    "preloadSoftwareVersion": "1.0.0.0",
    "shortCode": "XU7U23WD",
    "siteName": "world"
  }
}'

Responses

200 — The updated device

400 — Bad Request

401 — Unauthorized

403 — Forbidden

404 — Not Found

429 — Too Many Requests

500 — Internal Server Error


Source spec: fleets-api · operationId: [patch]_/api/v1/projects/{project_name}/fleet/devices/{name}