Get the job output and result

get

/rhp-restapi/rhp/jobs/{jobId}/output

Gets the job output presenting the job result and progress, which can be paginated using the limit and offset parameters.

Request

Supported Media Types
Path Parameters
Query Parameters
  • The number of lines from the job result to be included in the job output resource.
    Default Value: 0
  • The identifier of the first line on the job result to be included in the job output resource.
    Default Value: 0
Back to Top

Response

Supported Media Types

200 Response

OK. A JSON object containing a job output resource representation with multiple properties and the links array with at least the "self" link.
Body ()
Root Schema : jobOutputResource
Type: object
Show Source

Default Response

Unexpected error. A JSON object containing error details of the issue while executing the operation.
Body ()
Root Schema : errorResource
Type: object
Show Source
Nested Schema : errorDetails
Type: array
If multiple errors are reported they can be organized in a hierarchical structure in this array.
Show Source
Back to Top

Examples

The following example shows how to view the results and output of an existing job by submitting a GET request on the REST resource using cURL.

curl -u restUser -X GET "https://RHP_node_name:8894/rhp-restapi/rhp/jobs/1/output"

HTTP Status Code and Response Headers

The following shows an example of the response header.

HTTP/1.1 200
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET,PUT,POST,DELETE,PATCH,OPTIONS
Access-Control-Allow-Headers: X-Requested-With, Content-Type, Content-Length, Authorization
Connection: keep-alive
Content-Type: application/json
Content-Length: 556
Date:  Tue, 19 Jun 2018 14:03:23 GMT

Response Body

{
       "output" : "nodeName.domain.com: Audit ID: 6\nnodeName.domain.com: Creating a new ACFS file system for image "DB_Image1" ...\nnodeName.domain.com: Copying files...\nnodeName.domain.com: Copying home contents...\nnodeName.domain.com: Changing the home ownership to user aime1...\nnodeName.domain.com: Changing the home ownership to user aime1...",
       "offset" : 0,
       "limit" : 6,
       "hasMore" : no,
       "links" : [{
            "uri" : "http://RHP_node_name:8894/rhp-restapi/rhp/jobs/1/output",
            "rel" : "self"
       }]
}
Back to Top