Start of change

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

The request content contains a JSON object. Table 1 lists the fields in the JSON object.
Table 1. Request content for the create unique variable names request
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.

Authorization requirements

None.

For more information, see Authorization requirements.

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.

Table 2. HTTP error response codes for a create variable request
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.

Table 3. Response from a create unique variable names request
Field Type Description
name-list String Array The variable names that were created.
If a failure occurs, the response body contains a JSON object with a description of the error.
Table 4. Response from a request failure
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

Figure 1 shows a request to create 5 unique variable names.
Figure 1. Sample request to create a variable name
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"
   ]
 }

End of change