1.4. http://localhost:7080/rest/content : Content related
This endpoint deals with content (upload)
Defining class: org.rhq.enterprise.server.rest.ContentHandlerBean
Produces: application/json, application/xml
Methods
POST /content/fresh
Description
Upload content to the server. This will return a handle that can be used later to retrieve and further process the contentParameters: Name P.Type Description Required Type Allowed values Default value -body- An application/octet-stream to be stored. true java.io.InputStream -all- -none- Return type: javax.ws.rs.core.Response
GET /content/{handle}/info
Description
Retrieve the length of the content with the passed handleParameters: Name P.Type Description Required Type Allowed values Default value handle Path none String -all- -none- Return type: IntegerValue
PUT /content/{handle}/plugins
Description
Put the uploaded content into the plugin drop box.Notes
This endpoint allows to deploy previously uploaded content as a plugin. You need to provide a valid plugin (file) name in order for the plugin processing to succeed. Optionally you can request that a plugin scan will be started and the plugin be registered in the system. You can also specify a delay in milliseconds after which the plugin will be automatically pushed out to the agents.Note that a non-negative "pushOutDelay" only makes sense when the "scan" is set to true, otherwise no update on the agents can occur because there will be no updated plugins on the server. If a non-negative "pushOutDelay" is given together with "scan" set to false a 406 error is returned.The content identified by the handle is not removed. Note that this method is deprecated - use a PUT to /plugins.
Parameters: Name P.Type Description Required Type Allowed values Default value handle Path Name of the handle retrieved from upload true String all name Query Name of the plugin file false String all scan Query Should a discovery scan be started? false boolean all false pushOutDelay Query The delay in milliseconds before the agents update their plugins. Any negative value disables the automatic update of agents false long all -1 Return type: javax.ws.rs.core.Response
Error codes: Code Reason 406 No name provided or invalid combination of parameters supplied 404 No content for handle found 403 Caller has not rights to upload plugins DELETE /content/{handle}
Description
Remove the content with the passed handleNotes
This operation is by default idempotent, returning 204.If you want to check if the content existed at all, you need to pass the 'validate' query parameter.
Parameters: Name P.Type Description Required Type Allowed values Default value handle Path none String -all- -none- validate Query Validate if the content exists false boolean all false Return type: javax.ws.rs.core.Response
Error codes: Code Reason 204 Content was deleted or did not exist with validation not set 404 Content did not exist and validate was set