Update variables in a software services instance

You can use this operation to update variables in a software services instance.

HTTP method and URI path

PUT /zosmf/provisioning/rest/version/scr/object-id/variables
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 variables are to be updated.

Query parameters

None.

Description

This operation updates variables in a software services instance. If it already exists, the value and visibility are updated based on the values in the variable structure.

Request content

The request body contents must be a JSON object containing a variables field with the variables to be updated in the object. See Table 1.
Table 1. Request content for the update software services instance variables request
Field name Type Description
variables Variable[] The variables for the software, with the structure that is described in Table 2. The name field identifies the variable. If a variable in the variables array does not already exist in the software object it is added. If it does already exist the name and visibility are updated based on the values in the variable structure.
Table 2. Variable structure
Field Type
name String
value String
visibility String. The value must be public or private.

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.

The user issuing the request must be the owner of the software services instance, or, for catalog registry type objects, a domain administrator of the software services instance, or, for general registry type objects, the landlord.

For more information, see Authorization requirements.

HTTP status codes

On successful completion, HTTP status code 204 Normal is returned.

Otherwise, the following HTTP status codes are returned for the indicated errors.

Table 3. HTTP error response codes for a update software services instance request
HTTP error status code Description
HTTP 400 Bad request Request contained incorrect parameters.
HTTP 401 Unauthorized The requestor user ID is not authorized for this request.
HTTP 404 Not found The specified software services instance instance was not found.

Response content

On successful completion, the response body contains nothing.

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 PUT method is used to update variables for a software services instance. 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 update variables for a software services instance
PUT  /zosmf/provisioning/rest/1.0/scr/76963ea5-81a4-42d6-99d6-f3e19747cf61/variables
Variable structure:
{
   "variables":[
      {"name":"var1","value":"val1","visibility":"public"},
      {"name":"var2","value":"val2","visibility":"public"}
   ]
}