Decommissioning inactive computers (v2)

Available from 11.0.6. You use the DELETE operation on the api/sam/v2/computers element to decommission a computer from a disconnected scan or a container image. Limitation:A decommissioned computer may still have the is_deleted value set to 0 in the response of the GET operation on the api/sam/v2/computers API endpoint. Despite this, the computer is properly decommissioned and is no longer present in the web interface. This limitation may be addressed in the future releases.

Permissions

User You must have the View Endpoints and Manage Computer Groups permission to use this API.

Resource URL

https://hostname:port/api/sam/v2/computers/computer_id?token=token

Resource information

Table 1. Resource information
Operation details Description
HTTP method DELETE
Request headers
Header
Accept-Language (optional)
Values
en-US (only English is supported)

Negotiates the language of the response. If the header is not specified, the content is returned in the server language.

Request format application/json
Response headers
Header
Content-Type
Values
application/json

Specifies the content type of the response.

Header
Content-Language
Values
en-US, …

Specifies the language of the response content. If the header is not specified, the content is returned in the server language.

Response payload Operation status
Response format application/json
Response codes

200 – OK

400 – "Incorrect request data" if the computer ID query parameter is not valid ID

403 – "Access blocked" if the user does not have required permissions

404 – "Not found" if a computer not found or user has no rights to access it

405 – "Method not allowed" if a computer is already decommissioned, deleted or is a BigFix endpoint

409 – "Conflict" if data import is in progress

Example conversation

Request
DELETE api/sam/v2/computers/27?token=7adc3efb175e2bc0f4484bdd2efca54a8fa04623
Host: localhost:9081 
Accept: application/json 
Accept-Language: en-US
Response body
{
    "message": "success"
}