Start of change

Get key-value variables for a software services instance

You can use this operation to retrieve the variables for a software services instance in key-value format.

HTTP method and URI path

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

Query parameters

You can specify the following query parameter on this request:
name
Use this optional parameter to specify variable names. You can use regular expression.

Description

This operation retrieves the variables for a z/OSMF software services instance in key-value format.

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

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 services instance
  • A member of the tenant of the software services instance
  • A domain administrator of the software services instance.

For more information, see Authorization requirements.

HTTP status codes

On successful completion, HTTP status code 200 (normal) is returned and the response body is provided, as described in Response content.

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 key-value variables 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 instance was not found; the software services instance does not exist.

Response content

On successful completion, the response body contains a JSON object that consists of an array of the variable names and values for the software services instance, described in the tables that follow.

Table 2. Get key-value variables request: Format of the variables object
Field name Type Description
variables List of variable names and values in key-value pair format.
Example:
{"var1":"val1",
"var2":"val2"}
Variables for the software services instance. Only variables with public visibility are returned.

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

Table 3. 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 key-value variables for a software object. The software services instance is uniquely identified by the software services instance key, which is represented by the following string value: 76963ea5-81a4-42d6-99d6-f3e19747cf61.

Figure 1. Sample request to get software services instance variables in key-value format
GET /zosmf/provisioning/rest/1.0/76963ea5-81a4-42d6-99d6-f3e19747cf61/key-value-variables

The following is an example of the response.

Figure 2. Sample response from a get key-value variables request
{
       "variables":{
                           {"var1":"val1",
                            "var2":"val2"}
       }
}

End of change