# Remove selected services from device

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

Authorization Bearer

Bearer authentication of the form `Bearer <token>`, where token is your
auth token.

## Path parameters

| Parameter       | Type   | Required |
|-----------------|--------|----------|
| project_name    | string | Yes      |
| name            | string | Yes      |

## Request

This endpoint expects an object.

### Metadata

- **metadata**: object [DefaultMetadata](https://docs.mediakind.com/api-reference/fleets-api/schemas/defaultmetadata) Required  
  Resource metadata.
    - **displayName**: string Required  
      A human-readable name for the resource.
    - **labels**: map from strings to string Optional  
      A dictionary of labels associated with the resource.  
      Maximum number of labels: 32.  
      Maximum length of a label or value: 256 characters.  
      Label: alphanumeric, hyphens and underscores.  
      Value: alphanumeric, hyphens, underscores and spaces.

### Spec

- **spec**: object [DeviceRemoveServicesBodySpec](https://docs.mediakind.com/api-reference/fleets-api/schemas/deviceremoveservicesbodyspec) Required  
  Device services remove specification
    - **description**: string Required <=2048 characters  
      The description to use in the MKC file.
    - **selector**: object [DeviceRemoveServicesSelectorBody](https://docs.mediakind.com/api-reference/fleets-api/schemas/deviceremoveservicesselectorbody) Optional  
      The selector used to pick which services to remove
    - **tags**: object [DeviceRemoveServicesSelectorTagsBody](https://docs.mediakind.com/api-reference/fleets-api/schemas/deviceremoveservicesselectortagsbody) Optional  
      The tags the selector used to pick which services to remove
        - **exclude**: list of strings Optional  
          The exclude tags the selector used to pick which services to remove
        - **include**: list of strings Optional  
          The include tags the selector used to pick which services to remove

## Response

202 The non-flow services were successfully removed.

No response body.

## Errors

### 400 Bad Request
- **error**: object [ErrorDetail](https://docs.mediakind.com/api-reference/fleets-api/schemas/errordetail) Required  
  Pertinent information about the error  
  - **code**: string Required  
  - **detail**: string Required  
  - **extraDetail**: map from strings to any Optional  
  - **ref**: string Required  
  - **status**: integer Required

### 401 Unauthorized
### 403 Forbidden
### 404 Not Found
### 409 Conflict
### 429 Too Many Requests
### 500 Internal Server Error
  
Each error follows a similar structure as described above.
