Create or update system variables
Use this operation to create or update z/OSMF system variables in the system variable pool.
HTTP method and URI path
POST /zosmf/variables/rest/<version>/systems/<sysplex-name>.<system-name>
- <version> identifies the version of the z/OSMF system variables service. The following value is valid: 1.0.
- <sysplex-name> identifies the sysplex.
- <system-name> identifies the system.
Description
This operation creates or updates system variables specified in the request body. If the system variable pool does not exist, this operation creates the pool and adds the variables to it. If there is no request body and the pool does not already exist, the operation creates an empty pool. If there is no request body and the pool already exists, no action is taken. If a variable appears in the request body multiple times, the value of the last occurrence is used as the value of the variable.
On successful completion, HTTP status code 204 (No content) is returned, indicating that the system variables were created or updated with the new value.
Authorization requirements
Request content
Field name | Type | Required or optional | Description |
---|---|---|---|
name | String | Required | Descriptive name for the variable |
value | String | Required | Value for the variable |
description | String | Optional | Description of the variable |
HTTP status codes
On successful completion, HTTP status code 204 (no content) is returned.
Otherwise, the following HTTP status codes are returned for the indicated errors.
HTTP error status code | Reason Code | Description |
---|---|---|
401 | Submitter of the request is not authorized to invoke the task to create the system variables | |
404 | Requested sysplex-name.sysname-name was not found | |
404 | 1 | Requested system-name was not found |
Response content
None.
Example HTTP interaction
POST /zosmf/variables/rest/1.0/variables/systems/sysplex-name.system-name
[
{"name" : "var1","value":"value1","description":"description of the variable"},
{"name" : "var2","value":"value2","description":"description of the variable},....
]