Start of change

Get prompt variables for a software services template

Use this operation to retrieve the variables that are required to run the software services template and for which a prompt can be used to obtain the value.

HTTP method and URI path

GET /zosmf/provisioning/rest/<version>/scc/<object-id>/prompt-variables
                                
In this request
<object-id>
Identifies the software services template to be retrieved.
<version>
Is the URI path variable <version> that identifies the version of the z/OSMF software services template service. The following value is valid: 1.0.

Query parameters

None.

Description

This operation retrieves the variables for which a prompt can obtain the value.

On successful completion, HTTP status code 200 (Normal) is returned, indicating that the request resulted in a software services template being retrieved. A response body is provided, as described in Response content.

Request content

None.

Authorization requirements

The user's z/OS user ID must be defined as a landlord, domain administrator, domain approver, or template approver.

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

See Authorization requirements.

HTTP status codes

On successful completion, HTTP status code 200 (OK) is returned.

Response content

On successful completion, the service returns a response body, which contains a JSON object with details about the prompt variables. See Table 1 and Table 2.

Table 1. Response from a get prompt variables request
Field Type Required/Optional Description
prompt-variables Array of objects Required Array of Prompt-Variable-Object containing information about the variables prompted at create time. See .
Table 2. Response from a get request: Prompt-Variable-Object
Field Type Description
name String Name of the property.
value String Current value for the property.
required boolean Indicates whether the variable value is required during the workflow create process.
label String Short label for the UI widget.
description String Explanation of what the variable is used for and perhaps what the syntactic requirements are.
abstract String Brief description of the variable for the UI widget.
type String Type of the variable element: boolean, string, integer, decimal, time, date.
must-be-choice boolean Indicates whether the value must come from the provided choices.
choices Array of Strings Contains allowable choices for the value of the variable.
regex String Standard regular expression that constrains the variable value.
multi-line boolean Indicates whether the value requires a multi-line text box.
min String For a string type, indicates the minimum string length of the value. For all other types, indicates the minimum value required.
max String For a string type, indicates the maximum string length of the value. For all other types, indicates the maximum value required.
places String Maximum number of decimal places that can be specified for a variable of type decimal.
error-message String Default error message associated with an incorrect value.

Fields of type String default to null.

Example HTTP interaction

Figure 1 shows a request to retrieve the prompt variables.
Figure 1. Sample request to retrieve prompt variables
GET https://localhost:4444/zosmf/provisioning/rest/1.0/scc/7953ecc0-3b28-4ef4-a72b-18ba854d10d3/prompt-variables

The following is the response body for the request.

Figure 2. Response body for the GET prompt variables request
{
   "prompt-variables": [
     {
       "name": "CSQ_MQ_SSID",
       "label": "MQ_SSID",
       "description": "The name of the MQ subsystem to be provisioned.",
       "type": "string",
       "value": "ZCT1",
       "required": true,
       "choices": null,
       "regex": "[A-Z0-9]{1,4}",
       "min": null,
       "max": null,
       "places": null,
       "abstract": "Subsystem identifier",
       "multi-line": false,
       "must-be-choice": false,
       "error-message": "The value entered is not valid."
     },
     {
       "name": "CSQ_ENVIRONMENT",
       "label": "ENVIRONMENT",
       "description": "The environment for which the queue manager is to be provisioned/de-provisioned. 
        The BSDS, Log and Pageset datasets vary depending on the environment.",
       "type": "string",
       "value": "TEST",
       "required": true,
       "choices": [
         "DEV",
         "TEST",
         "QA",
         "PROD"
       ],
       "regex": null,
       "min": null,
       "max": null,
       "places": null,
       "abstract": "Environment for which the queue manager is to be provisioned/de-provisioned 
       (DEV, TEST, QA, PROD)",
       "multi-line": false,
       "must-be-choice": true,
       "error-message": "The value entered is not valid."
     }
   ]
 }
 

 

End of change