Software management services

The software management REST interface is an application programming interface (API) implemented through industry standard Representational State Transfer (REST) services. This interface allows a client application to interact with the z/OSMF Software Management task.

Table 1 lists the operations that the software management services provide.

Table 1. Operations provided through the software management services.
Operation HTTP method and URI path
List the software instances defined to z/OSMF GET /zosmf/swmgmt/swi
Retrieve the properties of a software instance GET /zosmf/swmgmt/swi/<system-nickname>/<swi-name>
List the data sets included in a software instance POST /zosmf/swmgmt/swi/<system-nickname>/<swi-name>/datasets
Add a new software instance POST /zosmf/swmgmt/swi
Export a defined software instance POST /zosmf/swmgmt/swi/<system-nickname>/<swi-name>/export
Modify the properties of a software instance PUT /zosmf/swmgmt/swi/<system-nickname>/<swi-name>
Load the products, features, and FMIDs for a software instance PUT /zosmf/swmgmt/swi/<system-nickname>/<swi-name>/products
Delete a software instance DELETE /zosmf/swmgmt/swi/<system-nickname>/<swi-name>
Deleting the Temporary Catalog Aliases POST /zosmf/swmgmt/swi/<system-nickname>/<swi-name>/deltempcatalias
Start of changeList the portable software instances defined to z/OSMFEnd of change Start of changeGET /zosmf/swmgmt/pswiEnd of change
Deploy a software instance POST /zosmf/swmgmt/dep
Delete a Deployment DELETE /zosmf/swmgmt/dep/<dep-name>
Start of changeRetrieve the properties of a portable software instanceEnd of change Start of changeGET /zosmf/swmgmt/pswi/<system-nickname>/<pswi-name>End of change
Start of changeAdd a new portable software instanceEnd of change Start of changePOST /zosmf/swmgmt/pswiEnd of change
Start of changeDelete a portable software instanceEnd of change Start of changeDELETE /zosmf/swmgmt/pswi/<system-nickname>/<pswi-name>End of change
Retrieve the z/OS system UUID POST /zosmf/swmgmt/system/uuid/<system-nickname>

Required authorizations

To submit requests through the software management services, the user ID initiating the request requires the same authorizations as when performing an analogous operation using the z/OSMF Software Management task. For information about access controls for the Software Management task, see Creating access controls for the Software Management task in IBM z/OS Management Facility Configuration Guide.

For information about client authentication in z/OSMF, see Authenticating to z/OSMF.

Content type used for HTTP response data

The JSON content type ("Content-Type: application/json") is used for response data.

Error handling

For errors that occur during the processing of a request, the API returns an appropriate HTTP status code to the calling client. An error is indicated by a 4nn code or a 5nn code. Some errors might also include a returned JSON object that contains the following attributes: Start of change
{
  "error":
  {
    "reason":"reason-code",
    "messages":["message-text"]
  }
}
End of change
where:
error
Start of changeJSON object that contains a reason code and a list of one or more message strings to describe the errors detected while processing the request.End of change
reason-code
Reason code returned for the request. The value is an integer.
message-text
Array that contains the text of each message that was issued.
The following HTTP status codes are valid:
HTTP 200 OK
Success.
HTTP 400 Bad request
The request contained incorrect parameters.
HTTP 401 Unauthorized
The submitter of the request did not authenticate to z/OSMF.
HTTP 403 Forbidden
The server rejected the request.
HTTP 404 Not found
The target of the request was not found.
HTTP 409 Conflict
The request could not be completed because there is a conflict with the current state of the resource.
HTTP 500 Internal server error
The server encountered an error that prevented it from completing the request.
HTTP 503 Service unavailable
The server is currently unavailable to process the request.

Error logging

Errors from the software management services are logged in the z/OSMF log. You can use this information to diagnose the problem or provide it to IBM® Support, if required.

For information about working with z/OSMF log files, see z/OSMF log files in IBM z/OS Management Facility Configuration Guide.