1.8. http://localhost:7080/rest/operation : Endpoints for operations.
These endpoints deal with scheduling of operations and retrieval of operation results.
Defining class: org.rhq.enterprise.server.rest.OperationsHandlerBean
Produces: application/json, application/xml
Methods
GET /operation/definition/{id}
Description
Retrieve a single operation definition by its idParameters: Name P.Type Description Required Type Allowed values Default value id Path Id of the definition to retrieve true int all resourceId Query Id of a resource that supports this operation false Integer all Return type: javax.ws.rs.core.Response
GET /operation/definitions
Description
List all operation definitions for a resourceSupports returning a gzip'ed Content-Encoding
Parameters: Name P.Type Description Required Type Allowed values Default value resourceId Query Id of the resource true Integer all Return type: javax.ws.rs.core.Response
POST /operation/definition/{id}
Description
Create a new (draft) operation from the passed definition id for the passed resourceParameters: Name P.Type Description Required Type Allowed values Default value id Path Id of the definition true int all resourceId Query Id of the resource true Integer all Return type: javax.ws.rs.core.Response
GET /operation/{id}
Description
Return a (draft) operationParameters: Name P.Type Description Required Type Allowed values Default value id Path Id of the operation to retrieve true int all Return type: javax.ws.rs.core.Response
PUT /operation/{id}
Description
Update a (draft) operation. If the state is set to 'ready', the operation will be scheduledParameters: Name P.Type Description Required Type Allowed values Default value id Path Id of the operation to update true int all -body- The operation definition to use for the update. true OperationRest -all- -none- Return type: javax.ws.rs.core.Response
Error codes: Code Reason 404 No draft operation with the passed id exists 406 Draft was set for scheduling, but parameters failed validation 200 Update was successful, operation was scheduled if requested DELETE /operation/{id}
Description
Delete a (draft) operationParameters: Name P.Type Description Required Type Allowed values Default value id Path Id of the operation to remove true int all Return type: javax.ws.rs.core.Response
GET /operation/history/{id}
Description
Return the outcome of the scheduled operationSupports returning a gzip'ed Content-Encoding
Parameters: Name P.Type Description Required Type Allowed values Default value id Path Name of the submitted job. true String all Return type: javax.ws.rs.core.Response
GET /operation/history
Description
Return the outcome of the executed operations for a resourceSupports returning a gzip'ed Content-Encoding
Parameters: Name P.Type Description Required Type Allowed values Default value resourceId Query Id of a resource to limit to false int all ps Query Page size for paging false int all 20 page Query Page for paging, 0-based false Integer all Return type: javax.ws.rs.core.Response
DELETE /operation/history/{id}
Description
Delete the operation history item with the passed idNotes
This operation is by default idempotent, returning 204.If you want to check if the job existed at all, you need to pass the 'validate' query parameter.
Parameters: Name P.Type Description Required Type Allowed values Default value id Path Name for the submitted job true String all validate Query Validate if the job exists false boolean all false Return type: javax.ws.rs.core.Response
Error codes: Code Reason 204 Item was deleted or did not exist with validation not set 404 Item did not exist and validate was set 406 Passed Job ID did not pass name validation