Create a new version of a software services template

You can use this operation to create a new version of a software services template, with the same name as the original, associated with the same domain and tenants, but with new source files.

HTTP method and URI path

POST /zosmf/provisioning/rest/<version>/scc/<object-id>/actions/create_new_version
In this request
<object-id>
Identifies the existing software services template to create a new version of.
<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 creates a new version of an existing software services template in the catalog. The new version has the same name as the original entry, and is associated with the same domain and tenants. However, it has new source files (workflow definition, action definition, variable input, and documentation). You cannot already have a draft software services template of this version.

The new version is assigned a version number that is the next available number in sequence.

The template that you create a new version of must be in the published or archived state.

On successful completion, HTTP status code 201 (Normal) is returned, indicating that the request resulted in the creation of a new version of a 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.

Table 1. Request content for the software services template request
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, up to 500 characters.
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.

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.

Table 2. Response from a create new version of a software services template request
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.

If a failure occurs, the response body contains a JSON object with a description of the error.

Example HTTP interaction

In Figure 1, a request is submitted to create a new version of a software services template on the system SY1.
Figure 1. Sample request to create a new version of a software services template
POST /zosmf/provisioning/rest/1.0/scc/0389ed37-fe13-4176-af65-c171b6ba6b37/actions/
create_new_version HTTP/1.1
Figure 2. Sample response body
{
generated-name: "mq.2.default"
object-id: "cd00fb41-20ed-4133-b985-52e28edfcfd0"
object-uri: "/zosmf/provisioning/rest/1.0/scc/cd00fb41-20ed-4133-b985-52e28edfcfd0"
}