Start of change

Create a new software services template based on an existing one

You can use this operation to create a new software services template based on one that already exists, with the same source files.

HTTP method and URI path

POST /zosmf/provisioning/rest/<version>/scc/<object-id>/actions/create_based_on
In this request
<object-id>
Identifies the existing software services template.
<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 software services template in the catalog, based on the existing software services template identified by the object ID. It has the same source files (workflow definition, action definition, variable input, and documentation).

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. See Table 1.

Table 1. Request content for the software services template request
Field name Type Required or optional Description
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 (-).
domain-name String Varies Name of the domain. Required if the user ID has administrator privileges to more than one domain.
approvals Array of strings Optional An array of strings representing the user IDs that are responsible for approving the template.
target-copy-path String Required The absolute path name of an empty z/OS UNIX directory. The source file contents of the existing software services template are copied into this location, and the new template is created based on that content. If the directory does not exist, it is created. However, the parent directory must already exist.

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

Table 2. Response from a successful 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 software services template based on an existing one, with request body
POST /zosmf/provisioning/rest/1.0/scc/0389ed37-fe13-4176-af65-c171b6ba6b37/actions/create_based_on
    HTTP/1.1

{
"name" : "config2",
"target-copy-path":"/users/gg/zosmf/newConfig2"
}
Figure 2. Sample response body
{
    generated-name: "mqUpgrade.1.default"
    object-id: "cd00fb41-20ed-4133-b985-52e28edfcfd0"
    object-uri: "/zosmf/provisioning/rest/1.0/scc/cd00fb41-20ed-4133-b985-52e28edfcfd0"
}

End of change