Remove Object Definition

The Remove Object Definition operation removes a defined CPC from the HMC. Upon operation completion, the CPC specified will no longer be managed by the HMC. [Added by feature add-remove-object-definition]

HTTP method and URI

POST /api/cpcs/{cpc-id}/operations/remove-object-definition

In this request, the URI variable {cpc-id} is the object ID of the target CPC object.

Request body contents

The request body is expected to contain a JSON object with the following field:

Name Type Rqd/Opt Description
clear-persisted-data Boolean Required Whether or not persisted data such as Custom Groups should be cleared upon removal of the designated CPC.

Description

This operation removes a defined CPC from the HMC and optionally clears persisted data (such as Custom Groups) related to the CPC.

Note: A review of time sources may be necessary if the targeted CPC was previously defined as a time source for the HMC.

The URI path must designate an existing CPC object and the API user must have object-access permission to it; otherwise, status code 404 (Not Found) is returned. In addition, the API user must have action/task permission to the Remove Object Definition task; otherwise, status code 403 (Forbidden) is returned. An Inventory Change notification is emitted asynchronously to this operation.

Authorization requirements

This operation has the following authorization requirements:
  • Object-access permission to the CPC object designated by {cpc-id}.
  • Action/task permission for the Remove Object Definition task.

HTTP status and reason codes

On success, HTTP status code 204 (No Content) is returned, and no response body is provided.

The following HTTP status codes are returned for the indicated errors. The response body is a standard error response body providing the reason code indicated and associated error message.

HTTP error status code Reason code Description
400 (Bad Request) Various Errors were detected during common request validation. See Common request validation reason codes for a list of the possible reason codes.
403 (Forbidden) 1 The API user does not have the required permission for this operation.
404 (Not Found) 1 The request URI does not designate an existing resource of the expected type, or designates a resource for which the API user does not have object-access permission.
409 (Conflict) 417 The specific CPC is not defined to the HMC.
500 (Server Error) 0 Unexpected error occurred when processing the operation.

Additional standard status and reason codes can be returned, as described in Invoking API operations.

Example HTTP interaction

Figure 1. Remove Object Definition: Request
POST /api/cpcs/66c57e37-9d59-390c-a866-3f836f26aab9/operations/remove-object-definition
HTTP/1.1
x-api-session:3w9732tb1e5zcfzbkmejo516sylzkyoh9uf7oc81n4om6y8m84
Content-Type: application/json
Content-Length: 31
{
 "clear-persisted-data":false
}
Figure 2. Remove Object Definition: Response
204 No Content
Server: Hardware management console API web server / 2.0
Cache-control: no-cache
Date: Fri, 02 Feb 2024 22:47:24 GMT
<No response body>