Export a Template

get

/paas/api/v1.1/instancemgmt/{identityDomainId}/templates/cst/instances/{templateName}/export

Export an existing template as a YAML file

Request

Path Parameters
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

OK
Body ()
Root Schema : export-response
Type: object
The response body contains template contents in YAML format.
Show Source

400 Response

Bad Request. Returned if unable to export template.
Back to Top

Examples

The following example shows how to export an existing template in Oracle Cloud Stack by submitting a GET request to the export endpoint for the template. The response is a text document with the template definition in YAML syntax.

cURL Command

curl -i -X GET \
-u yourUsername:yourPassword \
-H "X-ID-TENANT-NAME:MyIdentityDomain" \
https://psm.us.oraclecloud.com/paas/api/v1.1/instancemgmt/MyIdentityDomain/templates/cst/instances/MyTemplate/export

Note: This example uses the URL prefix for the United States. For information about the URL prefixes for other regions of the world, see Send Requests.

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Date: Thu, 25 Aug 2016 18:50:14 GMT
Content-Length: 5329
Content-Type: text/plain

Example of Response Body

A line with three dashes is typically used to indicate the start of a YAML document.

---
  template: 
    templateName: MyTemplate
    templateVersion: 1.0.0
    . . .

Redirection to a File

You can also redirect the cURL standard output stream (the YAML document) to a new file. For example:

curl -X GET \
-u yourUsername:yourPassword \
-H "X-ID-TENANT-NAME:MyIdentityDomain" \
https://psm.us.oraclecloud.com/paas/api/v1.1/instancemgmt/MyIdentityDomain/templates/cst/instances/MyTemplate/export \
>MyTemplate.yaml
Back to Top