remove selected services from device.md

Remove selected services from device

Fleets API · Devices

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

Removes selected services from a specific device. This clears all selected configurations from the device. Please ensure that any important configurations on the device are backed up first.

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 POST "https://app.mk.io/api/v1/projects/{project_name}/fleet/devices/{name}/removeServices" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "metadata": {
    "displayName": "string",
    "labels": {
      "key": "string"
    }
  },
  "spec": {
    "description": "string",
    "selector": {
      "tags": {
        "exclude": [
          "string"
        ],
        "include": [
          "string"
        ]
      }
    }
  }
}'

Responses

202 — The non-flow services were successfully removed.

No response body.

400 — Bad Request

401 — Unauthorized

403 — Forbidden

404 — Not Found

409 — Conflict

429 — Too Many Requests

500 — Internal Server Error