Create a software services template
Use this operation to create a software services template in the catalog. The template is a private entry until it is published.
HTTP method and URI path
POST /zosmf/provisioning/rest/<version>/scc
In this request, the URI path variable <version> identifies the version of the z/OSMF software services template service. The following value is valid: 1.0.
Query parameters
None.
Description
This operation creates a software services template in the catalog, based on the properties that are specified in the request body (a JSON object). 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 software services template. A response body is provided, as described in Response content.
Request content
The request content is expected to contain a JSON object that describes the software services template to be created. See Table 1.
Field name | Type | Required or optional | Description |
---|---|---|---|
action-definition-file | String | Required | Location of the action definition file, a file in XML format that defines the actions for the software services instance provisioned from the template. Specify the fully qualified z/OS UNIX path of the file, beginning with the forward slash (/) and including the file name. For example, specify /usr/lpp/zosmf/v2r1/samples/actions.xml. |
description | String | Optional | Description of the software services template. |
name | String | Required | Descriptive name for the software services template. The name must be unique, no longer than 48 characters, and consist of alphanumeric characters (A-Z, a-z, and 0-9), national characters ($@), underscore (_), and hyphen (-). |
workflow-definition-file | String | Required | Location of the workflow definition file, the primary XML file that defines
the
workflow. Specify the fully qualified z/OS UNIX path of the file, beginning with the forward slash (/) and including the file name. For example, specify /usr/lpp/zosmf//v2r1/samples/workflow_sample_automation.xml. |
workflow-variable-input-file | String | Optional | Location of the workflow variable input file, an optional properties file used
to specify in advance the values for one or more of the variables that are defined in the workflow
definition file. Specify the fully qualified z/OS UNIX path of the file, beginning with the forward slash (/) and including the file name. |
domain-name | String | Optional | Name of the domain. Required if the user ID has administrator authorization to more than one domain. |
approvals | Array of strings | Optional | An array of strings representing user IDs of users that are responsible for approving the template. |
workflow-clean-after-provisioned | boolean | Optional | Indicates if a workflow that performs provisioning should be automatically deleted after it completes successfully. The value is true to delete, false to keep. The default value, if none is specified, is false, which keeps the workflow. |
consumer-documentation-file | String | Optional | Location of a file that provides information for consumers about the template. Specify the fully qualified z/OS UNIX path of the file, beginning with the forward slash (/) and including the file name. |
consumer-documentation-type | String | Optional | Type of the consumer documentation file, either text or pdf. This is required if consumer-documentation-file is specified. |
admin-documentation-file | String | Optional | Location of a file that provides information for administrators about the template. Specify the fully qualified z/OS UNIX path of the file, beginning with the forward slash (/) and including the file name. |
admin-documentation-type | String | Optional | Type of the administrator documentation file, either text or pdf. This is required if admin-documentation-file is specified. |
Authorization requirements
The user's z/OS user ID must be defined as a landlord and a domain administrator.
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.
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.
Response content
On successful completion, the service returns a response body, which contains a JSON object with details about the software services template. Table 2 lists the fields in the JSON object.
Field | Type | Description |
---|---|---|
generated-name | String | The generated name associated with this software services template. |
object-id | String | The object ID of the newly created software services template. The object ID is to be used on further requests to the session. |
object-uri | String | The object URI of the newly created software services template. |
Field | Type | Description |
---|---|---|
http-status | String | HTTP status code. |
request-method | String | HTTP request method. |
request-uri | String | HTTP request URI. |
reason | String | HTTP status reason code. |
message | String | Message describing the error. |
detailed-message | String | Message describing the error in more detail. |
debug | String | Debug information about for the error. |
Example HTTP interaction
POST https://localhost:4444/zosmf/provisioning/rest/1.0/scc/
{
"name":"mq",
"description":"Provision an mq instance.",
"action-definition-file":"/u/zoscloud-beta/factory/mq/qmgr/qmgrActions.xml",
"workflow-definition-file":"/u/zoscloud-beta/factory/mq/qmgr/provision.xml",
"domain-name":"default",
"workflow-clean-after-provisioned":true,
"workflow-variable-input-file":"/u/zoscloud-beta/factory/mq/workflow_variables.properties",
"consumer-documentation-file":"/u/zoscloud-beta/factory/mq/mqaas_readme.pdf",
"consumer-documentation-type":"pdf",
"admin-documentation-file":"/u/zoscloud-beta/factory/mq/admin_readme.txt",
"admin-documentation-type":"text",
"approvals":["zosmfad"]
}
The following is the response body for the request.
{
"generated-name": "mqDemo.1.default",
"object-id": "a79cbb30-f960-403b-8dd3-cccb44b9f192",
"object-uri": "/zosmf/provisioning/rest/1.0/scc/a79cbb30-f960-403b-8dd3-cccb44b9f192"
}