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
- <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
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. |
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.
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.
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.
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"}
]
}