Start of change

List the responses for actions performed against a software services instance

You can use this operation to list the responses for actions that were performed against a software services instance.

HTTP method and URI path

GET /zosmf/provisioning/rest/<version>/scr/<object-id>/actions
In this request, the URI path variables are described, as follows:
  • <version> identifies the version of the provisioning service. The following value is valid: 1.0.
  • <object-id> identifies the software services instance for which actions are to be retrieved.

Query parameters

You can specify the following query parameter on this request. Objects matching all query parameters are returned.
type
Optional, specifies the type of the software.
name
Optional, regular expression, specifies the name of the action object.
state
Optional, specifies the current state of the action:
  • in-progress
  • submitted
  • responded
  • warning
  • complete
  • failed.
If you specify no query parameters, then all actions are returned.

Description

This operation lists the action objects for actions that were performed against a software services instance.

On successful completion, HTTP status code 200 (OK) is returned and the response body is provided, as described in Table 3.

Authorization requirements

The user’s z/OS user ID must have READ access to the following resource profile in the ZMFAPLA class: <SAF-prefix>.ZOSMF.PROVISIONING.SOFTWARE_SERVICES.

For catalog registry-type objects, the user issuing the request must be at least one of the following:
  • The owner of the software object
  • A member of the tenant of the software object
  • A domain administrator of the software object.

For more information, see Authorization requirements.

HTTP status codes

On successful completion, HTTP status code 200 (OK) is returned and the response body is provided, as described in Table 3.

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

Table 1. HTTP error response codes for a get software services instance contents request
HTTP error status code Description
HTTP 401 Unauthorized The requester user ID is not authorized for this request.
HTTP 404 Not found The specified software services instance was not found; the software services instance does not exist.

Response content

On successful completion, the response body is a JSON object that contains the retrieved data. See Table 2 and Table 3 lists the fields in the JSON object.

Table 2. JSON object that is returned for a list actions request
Field Type Description
scr-list-actions Array of objects Array of action objects.
Table 3. Fields for each action object
Field Type Description
action-id String The action ID for the action object.
name String The name for the action.
type String Type of the action.
state String. Must be one of the following:
  • in-progress
  • submitted
  • responded
  • warning
  • complete
  • failed.
The current state of the action. The values submitted, responded, and warning are valid only for command type actions.
ran-at-time String The time the do action operation was done to create the action, in ISO8601 format
ran-by-user String The user ID that ran the do action operation that created the action

If a failure occurs, the response body contains a JSON object with a description of the error.

Table 4. Response from a request failure
Field Type Description
httpStatus Integer HTTP status code.
requestMethod String HTTP request method.
requestUri String HTTP request URI.
messageID String Message identifier for the error.
messageText String Message text describing the error.
additionalInfo String Additional information describing the error.
debug String Debug information about for the error.

Example HTTP interaction

In the following example, the GET method is used to retrieve the list of responses for actions that were performed against a software services instance.

Figure 1. Sample request to list performed actions
GET /zosmf/provisioning/rest/1.0/scr/b0d1806f-7d42-4b8d-ad4b-8b8747642cc3/actions

The following is an example of the response.

Figure 2. Sample response from a list actions request
{
     "scr-list-actions":
     [
          {
            "name":"Instructions1",
            "state":"complete",
            "type":"instructions",
            "action-id":"f5c4df98-f9fd-4fca-b1a5-e0d1b7d1f0d9",
            "ran-at-time":"2015-10-26T18:29:20.949Z",
            "ran-by-user":"ZOSMFAD"
          },      
          {
            "name":"deprovision",        
            "state":"complete",         
            "type":"workflow",         
            "action-id":"ae3ec9cc-9be3-42b4-98f5-aa64934e31a3",         
            "ran-at-time":"2015-10-27T14:34:27.186Z",        
            "ran-by-user":"ZOSMFAD"
          } 
      ]
}


End of change