List All Templates
get
/paas/api/v1.1/instancemgmt/{identityDomainId}/templates/cst/instances
View a list of available templates
Request
Path Parameters
-
identityDomainId: string
Name of the Oracle Cloud identity domain
Query Parameters
-
expand(optional): string
The types of information to retrieve. Currently the only valid value is associatedStacks.
-
orderBy(optional): string
The template attributes used to sort the list. Valid values are createdOn, templateName, templateState and createdBy.
Response
Supported Media Types
- application/json
200 Response
OK
Root Schema : viewall-response
Type:
object
The response body contains information about one or more templates.
Show Source
-
items(optional):
array items
A list of templates.
-
links(optional):
object links-response
The response body contains a list of links that are related to a template.
-
totalResults(optional):
integer
Nested Schema : items
Type:
array
A list of templates.
Show Source
-
Array of:
object viewtemplate-response
The response body contains information about the template.
Nested Schema : links-response
Type:
object
The response body contains a list of links that are related to a template.
Show Source
-
items(optional):
array items
A list of links.
Nested Schema : viewtemplate-response
Type:
object
The response body contains information about the template.
Show Source
-
createdBy(optional):
string
Name of the user who imported the template
-
createdOn(optional):
string
Time when the template was imported
-
description(optional):
string
Description of the template
-
latestVersion(optional):
string
Latest version of the template
-
links(optional):
object links-response
The response body contains a list of links that are related to a template.
-
state(optional):
string
Indicates whether or not the template is published
-
templateName(optional):
string
Name of the template
-
type(optional):
string
Indicates whether this template was provided by Oracle (system template) or created by a user
Nested Schema : items
Type:
array
A list of links.
Show Source
-
Array of:
object link-response
A template link
Nested Schema : link-response
Type:
object
A template link
Show Source
-
href(optional):
string
Link URL
-
rel(optional):
string
Link type
Examples
The following example shows how to view a list of templates in Oracle Cloud Stack by submitting a GET request to the templates endpoint.
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
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 Transfer-Encoding: chunked Content-Type: application/json
Example of Response Body
The following shows an example of the response body in JSON format.
{ "items": [ { "templateName":"MyTemplate", "latestVersion":"1.0.0", "description":"My first template", "createdOn":"2016-08-25T18:16:50.233+0000", "createdBy":"yourUsername", "state":"PUBLISHED", "type":"USER_TEMPLATE", "links":[ { "rel":"canonical","href":"https://psm.us.oraclecloud.com/paas/api/v1.1/instancemgmt/MyIdentityDomain/templates/cst/instances/MyTemplate" }, { "rel":"self","href":"https://psm.us.oraclecloud.com/paas/api/v1.1/instancemgmt/MyIdentityDomain/templates/cst/instances" } ] }, { "templateName":"MyTemplate2", "latestVersion":"1.0.0", "description":"My second template", "createdOn":"2016-08-25T18:20:50.233+0000", "createdBy":"joe@example.comyourUsername", "state":"PUBLISHED", "type":"USER_TEMPLATE", "links":[ { "rel":"canonical","href":"https://psm.us.oraclecloud.com/paas/api/v1.1/instancemgmt/MyIdentityDomain/templates/cst/instances/MyTemplate2" }, { "rel":"self","href":"https://psm.us.oraclecloud.com/paas/api/v1.1/instancemgmt/MyIdentityDomain/templates/cst/instances" } ] }, ] }