CommandsResource Resource

GET /commands/commands

Retrieve detailed information on all recent commands.

Request Parameters
name type description default
endTime query timestamp of the command end time -1
limit query command count to return (from offset) 50
name query the command name, unique for the command class HdfsCreateSnapshotCommand#COMMAND_NAME n/a
offset query command position to start 0
startTime query timestamp of the command start time -1
success query whether the command was successful, if already finished n/a
Response Body
media type data type description
application/json ApiCommandList (JSON) Detailed information about recent asynchronous commands.

GET /commands/{commandId}

Retrieve detailed information on an asynchronous command.

Cloudera Manager keeps the results and statuses of asynchronous commands, which have non-negative command IDs. On the other hand, synchronous commands complete immediately, and their results are passed back in the return object of the command execution API call. Outside of that return object, there is no way to check the result of a synchronous command.

Request Parameters
name type description default
commandId path The command id. n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Detailed command information.

POST /commands/{commandId}/abort

Abort a running command.

Request Parameters
name type description default
commandId path The command id. n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Detailed command information.

GET /commands/{commandId}/download

Download a zip-compressed archive of diagnostic bundle. Log files are returned zipped together.

Request Parameters
name type description default
commandId path The command id. n/a
Response Body
media type data type description
application/octet-stream object Contents of the diagnostic bundle.

POST /commands/{commandId}/retry

Try to rerun a command.

Request Parameters
name type description default
commandId path ID of the command that needs to be run. n/a
Response Body
media type data type description
application/json ApiCommand (JSON) Command that represents the retry attempt.

GET /commands/{commandId}/steps

Retrieve detailed information of an asynchronous command including the command steps.

Cloudera Manager keeps the results and statuses of asynchronous commands, which have non-negative command IDs. On the other hand, synchronous commands complete immediately, and their results are passed back in the return object of the command execution API call. Outside of that return object, there is no way to check the result of a synchronous command.

Request Parameters
name type description default
commandId path The command id. n/a
Response Body
media type data type description
application/json ApiCommandWithSteps (JSON) Detailed command information including the command steps.

GET /commands/{commandId}/logs/stderr

Download a zip-compressed archive of standard error outputs for the command's one-off processes. Log files are returned zipped together.

Request Parameters
name type description default
commandId path The command id. n/a
Response Body
media type data type description
application/octet-stream object Contents of the role's standard output.

GET /commands/{commandId}/logs/stdout

Download a zip-compressed archive of standard outputs for the command's one-off processes. Log files are returned zipped together.

Request Parameters
name type description default
commandId path The command id. n/a
Response Body
media type data type description
application/octet-stream object Contents of the role's standard output.