Get system variables
Use this operation to get the z/OSMF variables or system symbols from a selected system.
HTTP method and URI path
GET /zosmf/variables/rest/<version>/systems/<sysplex-name>.<system-name>
GET/zosmf/variables/rest/<version>/systems/local
- <version> identifies the version of the z/OSMF
system variables service. The
following value is valid:
1.0. - <sysplex-name> identifies the sysplex. For system symbols, we only support the local sysplex-name here.
- <system-name> identifies the system.
- <local> indicates the API to retrieve the variable/symbol value from the local system which the z/OSMF server is running on.
| Parameter | Required/Optional | Description |
|---|---|---|
| var-name | Optional |
The name of a z/OSMF variable or a system symbol.
If you omit the var-name in the request, all the z/OSMF variable values/symbol values defined in the system are returned. If you need to specify more than one var-name in the request, you can use the array format
parameter, for example:
|
| source | Optional |
Identify the var-name that represents a z/OSMF variable name or a system symbol name. Valid
values for the source are:
|
Description
This operation retrieves z/OSMF variables from the variable pool or system symbols and returns them in a list.
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
For general requirements, see Authorization requirements.
Unlike the other z/OSMF Variables services, a get variables request does not require the client to have READ access to ZOSMF.VARIABLES.SYSTEM.ADMIN resource profile in the ZMFAPLA class.
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 | Description |
|---|---|
404 |
Requested system was not found. |
404 |
The system identifier in the URI of the request is not valid. |
| 500 | A server error occurred during processing of the request. |
Response content
200 (OK) is returned with an empty array.| Field name | Type | Description |
|---|---|---|
| system-variable-list | Array of objects | List of z/OSMF variable value. |
| system-symbol-list | Array of objects | List of system symbol value. |
| Field name | Type | Description |
|---|---|---|
name |
String | Descriptive name for the variable/symbol. |
value |
String | Value for the variable/symbol. |
description |
String | Description of the variable. For the system-symbol-list, this field is reserved for future use. |