Get system variables
Use this operation to get all of the z/OSMF system variables.
HTTP method and URI path
GET /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.
Query parameters
- name=var-name
- Specifies the name of the system variable or variables. The variable var-name can be the full name of the system variable or a partial name with the * wildcard character as a suffix or prefix, for example, abc* or *abc. When specifying multiple variable name filters, separate them with &, for example, ?name=abc*&name=*def
Description
This operation retrieves system variables from the system variable pool and returns them in a list. You can filter the returned list by using a variable name as the query parameter.
On successful completion, HTTP status code 200 is returned, along with a response body, which is described in Response content.
Request content
None.Authorization requirements
HTTP status codes
On successful completion, HTTP status code 200 (OK) is returned.
If the system variable pool does not exist for the requested system, HTTP status code 200 is returned with an empty array of variables.
Otherwise, the following HTTP status codes are returned for the indicated errors.
HTTP error status code | Reason Code | Description |
---|---|---|
401 | The submitter of the request is not authorized to invoke the task to get the system variables | |
404 | 1 | Requested system was not found |
404 | 2 | Requested system variable pool was not found |
Response content
On successful completion, the service returns a response body, which contains a JSON object with details about the system variables. See Table 2 and Table 3. If no system variables match the filter criteria, HTTP status code 200 (OK) is returned with an empty array.
Field name | Type | Description |
---|---|---|
variables | Array of objects | A list of one or more variables retrieved from system variable pool. See Table 3. |
Field name | Type | Description |
---|---|---|
name | String | Descriptive name for the variable |
value | String | Value for the variable |
description | String | Description of the variable |
Example HTTP interaction
GET /zosmf/variables/rest/1.0/variables/systems./<sysplex-name>.<system-name>
{variables: [
{"name":"sample1", "value":"20", "Description":"Description":"value of sample1"},
{... }
]
}