Start of change

Create a variable name

You can use this operation to create a variable name.

HTTP method and URI path

POST  /zosmf/resource-mgmt/rest/<version>/ssin/variable-name

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 a variable name based on the input variable prefix and the last 2 digits from the SSIN for the input registry ID. 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 a new variable name. 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 variable name request
Field name Type Required or optional Description
variable-prefix String Required The prefix to use to create the variable name.
registry-id String Required The ID of the software instance registry entry.

Authorization requirements

The user’s z/OS user ID must have READ access to the following resource profile in the ZMFAPLA class: <SAF-prefix>.ZOSMF.PROVISIONING.RESOURCE_MANAGEMENT.

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 name. Table 3 lists the fields in the JSON object.

Table 3. Response from a create variable name request
Field Type Description
name String Variable name.
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 a variable name.
Figure 1. Sample request to create a variable name
POST /zosmf/resource-mgmt/rest/1.0/ssin/variable-name

{
    "variable-prefix": "VAR",
    "registry-id": "3196202f-9a6c-4fdf-8dcd-e307e3ce2d5b"
 }

The response body is as follows.

{
   "name": "VAR00"
 }

End of change