Create unique variable names
You can use this operation to create multiple unique variable names.
HTTP method and URI path
POST /zosmf/resource-mgmt/rest/<version>/unique-variable-names
In this request, the URI path variable <version> identifies the version of the z/OSMF software service instance name service. The following value is valid: 1.0.
Query parameters
None.
Description
This operation creates up to 50 unique variable names. For the properties that you can specify, see Request content.
On successful completion, HTTP status code 201 (Created) is returned, indicating that the request resulted in the creation of unique variable names. A response body is provided, as described in Response content.
Request content
Field name | Type | Required or optional | Description |
---|---|---|---|
prefix | String | Optional | The prefix to be used when creating the variable names. If a prefix is not specified on the request, one is supplied by the service. |
quantity | String | Required | The number of names to be generated, 1-50. |
HTTP status codes
On successful completion, HTTP status code 201 (Created) is returned and the response body is provided, as described in Response content.
Otherwise, the following HTTP status codes are returned for the indicated errors. The response body is a standard error response body that provides the reason code that is indicated and associated error message.
HTTP error status code | Description |
---|---|
HTTP 400 Bad request | The request contained incorrect parameters. |
HTTP 401 Unauthorized | The requester user ID is not authorized for this request. |
Response content
On successful completion, the service returns a response body, which contains a JSON object with details about the variable names. Table 3 lists the fields in the JSON object.
Field | Type | Description |
---|---|---|
name-list | String Array | The variable names that were created. |
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
POST /zosmf/resource-mgmt/rest/1.0/unique-variable-name
{
"prefix": "VAR",
"quantity": "5"
}
The response body is as follows.
{
"name-list": [
"VAR1462458322735",
"VAR1462458322737",
"VAR1462458322739",
"VAR1462458322741",
"VAR1462458322743"
]
}