Import system variables
Use this operation to import z/OSMF system variables from a file.
HTTP method and URI path
POST /zosmf/variables/rest/<version>/systems/<sysplex-name>.<system-name>/actions/import
- <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 imports system variables from a file. The file must be accessible by the authenticated user. The file contains variable definitions in comma-separated value (CSV) format, where each row consists of the variable name, value and description. There should be no header row in the file. The variables imported from the file are processed in the same way as variables that are specified with the create system variables API.
On successful completion, HTTP status code 204 (No content) is returned.
Authorization requirements
Request content
The request content is expected to contain a JSON object. See Table 1.
Field name | Type | Required or optional | Description |
---|---|---|---|
variables-import-file | String | Required | Path to the CSV-formatted file containing the variables to import |
HTTP status codes
On successful completion, HTTP status code 204 (No content) is returned.
If the system variable pool does not exist for the requested system, HTTP status code 204 is returned.
Otherwise, the following HTTP status codes are returned for the indicated errors.
HTTP error status code | Description |
---|---|
400 | Request body is not syntactically correct |
400 | Specified file was either not found or could not be opened |
400 | Specified file has an incorrect format |
401 | Submitter of the request is not authorized to add or delete system variables |
404 | Requested system was not found |
500 | A server error occurred during processing of the request. |
Response content
None.
Example HTTP interaction
POST /zosmf/variables/rest/1.0/systems/TESTPLEX.TESTNODE/actions/import
{ "variables-import-file": "/u/testuser/variables.csv" }