delete device.md

Delete Device

Fleets API · Devices

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

Delete a device. If the device does not exist, this API will return a 204. To learn more about devices, read Device Concept.

RBAC Capability Required: fleet.device.delete

Authentication

Path parameters

Name Type Required Description
project_name string Yes
name string Yes

Query parameters

Name Type Required Description
$force boolean No Force the delete of this device
$reason string No Must be set to one of Failed|Maintenance|Storage|Other - if 'Other', the additional 'notes' query parameter is required with a brief description of the reason
$notes string No Other reason description - minimum 5 characters, maximum 255 characters

Example request

curl -X DELETE "https://app.mk.io/api/v1/projects/{project_name}/fleet/devices/{name}" \
  -H "Authorization: Bearer <token>"

Responses

200 — Device deleted.

No response body.

204 — Nothing to delete.

No response body.

400 — Bad Request

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

401 — Unauthorized

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

403 — Forbidden

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

404 — Not Found

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

409 — This could be due to one of:

No response body.

429 — Too Many Requests

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}

500 — Internal Server Error

Example:

{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}