ServerTemplates
ServerTemplates allow you to pre-configure servers by starting from a base image and adding scripts that run during the boot, operational, and shutdown phases. A ServerTemplate is a description of how a new instance will be configured when it is provisioned by your cloud provider.
All revisions of a ServerTemplate belong to a ServerTemplate lineage that is exposed by the "lineage" attribute. (NOTE: This attribute is merely a string to locate all revisions of a ServerTemplate and NOT a working URL)
Actions
- index
- show
- create
- update
- destroy
- clone
- commit
- detect_changes_in_head
- publish
- resolve
- swap_repository
index
Lists the ServerTemplates available to this account. HEAD revisions have a revision of 0.
The 'inputs_2_0' view is for retrieving inputs in 2.0 serialization (for more details please see Inputs#index.)
- URLs
- GET /api/server_templates
- HTTP response code
- 200 OK
- Content-type
- application/vnd.rightscale.server_template;type=collection
Required roles
- observer
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
filter | no | Array | * | * | no | See below for valid filter parameters. |
view | no | String | default, inputs, inputs_2_0 | * | no | Specifies how many attributes and/or expanded nested relationships to include. |
Filters
name | partial_match? | description |
---|---|---|
description | yes | The ServerTemplate description to filter on. |
lineage | no | The ServerTemplate lineage to filter on (this attribute is simply a string and not a working URL). |
multi_cloud_image_href | no | The MultiCloud Image used by the ServerTemplate to filter on. |
name | yes | The name of the ServerTemplate to filter on. |
revision | no | The revision of the ServerTemplate to filter on. |
Example Responses
Click on a format below to see an example response for the 'default' view:
JSON XML[{
"name": "NICKNAME_432575730",
"description": "DESCRIPTION_2032361450",
"revision": 0,
"links": [
{"rel":"self","href":"/api/server_templates/1"},
{"rel":"multi_cloud_images","href":"/api/server_templates/1/multi_cloud_images"},
{"rel":"default_multi_cloud_image","href":"/api/multi_cloud_images/1"},
{"rel":"inputs","href":"/api/server_templates/1/inputs"},
{"rel":"alert_specs","href":"/api/server_templates/1/alert_specs"},
{"rel":"runnable_bindings","href":"/api/server_templates/1/runnable_bindings"},
{"rel":"cookbook_attachments","href":"/api/server_templates/1/cookbook_attachments"}
],
"actions": [
{
"rel": "commit"
},
{
"rel": "clone"
},
{
"rel": "resolve"
},
{
"rel": "swap_repository"
},
{
"rel": "detect_changes_in_head"
}
],
"lineage": "https://testscale_1/api/acct/560182816/ec2_server_templates/1"
},{
"name": "NICKNAME_933461844",
"description": "DESCRIPTION_2990931717",
"revision": 0,
"links": [
{"rel":"self","href":"/api/server_templates/5"},
{"rel":"multi_cloud_images","href":"/api/server_templates/5/multi_cloud_images"},
{"rel":"default_multi_cloud_image","href":"/api/multi_cloud_images/2"},
{"rel":"inputs","href":"/api/server_templates/5/inputs"},
{"rel":"alert_specs","href":"/api/server_templates/5/alert_specs"},
{"rel":"runnable_bindings","href":"/api/server_templates/5/runnable_bindings"},
{"rel":"cookbook_attachments","href":"/api/server_templates/5/cookbook_attachments"}
],
"actions": [
{
"rel": "commit"
},
{
"rel": "clone"
},
{
"rel": "resolve"
},
{
"rel": "swap_repository"
},
{
"rel": "detect_changes_in_head"
}
],
"lineage": "https://testscale_1/api/acct/560182816/ec2_server_templates/5"
}]
<?xml version="1.0" encoding="UTF-8"?>
<server_templates>
<server_template>
<name>NICKNAME_432575730</name>
<description>DESCRIPTION_2032361450</description>
<revision>0</revision>
<links>
<link rel="self" href="/api/server_templates/1"/>
<link rel="multi_cloud_images" href="/api/server_templates/1/multi_cloud_images"/>
<link rel="default_multi_cloud_image" href="/api/multi_cloud_images/1"/>
<link rel="inputs" href="/api/server_templates/1/inputs"/>
<link rel="alert_specs" href="/api/server_templates/1/alert_specs"/>
<link rel="runnable_bindings" href="/api/server_templates/1/runnable_bindings"/>
<link rel="cookbook_attachments" href="/api/server_templates/1/cookbook_attachments"/>
</links>
<actions>
<action rel="commit"/>
<action rel="clone"/>
<action rel="resolve"/>
<action rel="swap_repository"/>
<action rel="detect_changes_in_head"/>
</actions>
<lineage>https://testscale_1/api/acct/560182816/ec2_server_templates/1</lineage>
</server_template>
<server_template>
<name>NICKNAME_933461844</name>
<description>DESCRIPTION_2990931717</description>
<revision>0</revision>
<links>
<link rel="self" href="/api/server_templates/5"/>
<link rel="multi_cloud_images" href="/api/server_templates/5/multi_cloud_images"/>
<link rel="default_multi_cloud_image" href="/api/multi_cloud_images/2"/>
<link rel="inputs" href="/api/server_templates/5/inputs"/>
<link rel="alert_specs" href="/api/server_templates/5/alert_specs"/>
<link rel="runnable_bindings" href="/api/server_templates/5/runnable_bindings"/>
<link rel="cookbook_attachments" href="/api/server_templates/5/cookbook_attachments"/>
</links>
<actions>
<action rel="commit"/>
<action rel="clone"/>
<action rel="resolve"/>
<action rel="swap_repository"/>
<action rel="detect_changes_in_head"/>
</actions>
<lineage>https://testscale_1/api/acct/560182816/ec2_server_templates/5</lineage>
</server_template>
</server_templates>
Click on a format below to see an example response for the 'inputs' view:
JSON XML[{
"name": "NICKNAME_432575730",
"description": "DESCRIPTION_2032361450",
"revision": 0,
"links": [
{"rel":"self","href":"/api/server_templates/1"},
{"rel":"multi_cloud_images","href":"/api/server_templates/1/multi_cloud_images"},
{"rel":"default_multi_cloud_image","href":"/api/multi_cloud_images/1"},
{"rel":"inputs","href":"/api/server_templates/1/inputs"},
{"rel":"alert_specs","href":"/api/server_templates/1/alert_specs"},
{"rel":"runnable_bindings","href":"/api/server_templates/1/runnable_bindings"},
{"rel":"cookbook_attachments","href":"/api/server_templates/1/cookbook_attachments"}
],
"actions": [
{
"rel": "commit"
},
{
"rel": "clone"
},
{
"rel": "resolve"
},
{
"rel": "swap_repository"
},
{
"rel": "detect_changes_in_head"
}
],
"lineage": "https://testscale_1/api/acct/560182816/ec2_server_templates/1",
"inputs": [
{
"name": "input_definition_3604220013",
"value": "text:"
},
{
"name": "input_definition_422628238",
"value": "text:"
}
]
},{
"name": "NICKNAME_933461844",
"description": "DESCRIPTION_2990931717",
"revision": 0,
"links": [
{"rel":"self","href":"/api/server_templates/5"},
{"rel":"multi_cloud_images","href":"/api/server_templates/5/multi_cloud_images"},
{"rel":"default_multi_cloud_image","href":"/api/multi_cloud_images/2"},
{"rel":"inputs","href":"/api/server_templates/5/inputs"},
{"rel":"alert_specs","href":"/api/server_templates/5/alert_specs"},
{"rel":"runnable_bindings","href":"/api/server_templates/5/runnable_bindings"},
{"rel":"cookbook_attachments","href":"/api/server_templates/5/cookbook_attachments"}
],
"actions": [
{
"rel": "commit"
},
{
"rel": "clone"
},
{
"rel": "resolve"
},
{
"rel": "swap_repository"
},
{
"rel": "detect_changes_in_head"
}
],
"lineage": "https://testscale_1/api/acct/560182816/ec2_server_templates/5",
"inputs": [
{
"name": "input_definition_440612151",
"value": "text:"
},
{
"name": "input_definition_744357030",
"value": "text:"
}
]
}]
<?xml version="1.0" encoding="UTF-8"?>
<server_templates>
<server_template>
<name>NICKNAME_432575730</name>
<description>DESCRIPTION_2032361450</description>
<revision>0</revision>
<links>
<link rel="self" href="/api/server_templates/1"/>
<link rel="multi_cloud_images" href="/api/server_templates/1/multi_cloud_images"/>
<link rel="default_multi_cloud_image" href="/api/multi_cloud_images/1"/>
<link rel="inputs" href="/api/server_templates/1/inputs"/>
<link rel="alert_specs" href="/api/server_templates/1/alert_specs"/>
<link rel="runnable_bindings" href="/api/server_templates/1/runnable_bindings"/>
<link rel="cookbook_attachments" href="/api/server_templates/1/cookbook_attachments"/>
</links>
<actions>
<action rel="commit"/>
<action rel="clone"/>
<action rel="resolve"/>
<action rel="swap_repository"/>
<action rel="detect_changes_in_head"/>
</actions>
<lineage>https://testscale_1/api/acct/560182816/ec2_server_templates/1</lineage>
<inputs>
<input>
<name>input_definition_3604220013</name>
<value>text:</value>
</input>
<input>
<name>input_definition_422628238</name>
<value>text:</value>
</input>
</inputs>
</server_template>
<server_template>
<name>NICKNAME_933461844</name>
<description>DESCRIPTION_2990931717</description>
<revision>0</revision>
<links>
<link rel="self" href="/api/server_templates/5"/>
<link rel="multi_cloud_images" href="/api/server_templates/5/multi_cloud_images"/>
<link rel="default_multi_cloud_image" href="/api/multi_cloud_images/2"/>
<link rel="inputs" href="/api/server_templates/5/inputs"/>
<link rel="alert_specs" href="/api/server_templates/5/alert_specs"/>
<link rel="runnable_bindings" href="/api/server_templates/5/runnable_bindings"/>
<link rel="cookbook_attachments" href="/api/server_templates/5/cookbook_attachments"/>
</links>
<actions>
<action rel="commit"/>
<action rel="clone"/>
<action rel="resolve"/>
<action rel="swap_repository"/>
<action rel="detect_changes_in_head"/>
</actions>
<lineage>https://testscale_1/api/acct/560182816/ec2_server_templates/5</lineage>
<inputs>
<input>
<name>input_definition_440612151</name>
<value>text:</value>
</input>
<input>
<name>input_definition_744357030</name>
<value>text:</value>
</input>
</inputs>
</server_template>
</server_templates>
Click on a format below to see an example response for the 'inputs_2_0' view:
JSON XML[{
"name": "NICKNAME_432575730",
"description": "DESCRIPTION_2032361450",
"revision": 0,
"links": [
{"rel":"self","href":"/api/server_templates/1"},
{"rel":"multi_cloud_images","href":"/api/server_templates/1/multi_cloud_images"},
{"rel":"default_multi_cloud_image","href":"/api/multi_cloud_images/1"},
{"rel":"inputs","href":"/api/server_templates/1/inputs"},
{"rel":"alert_specs","href":"/api/server_templates/1/alert_specs"},
{"rel":"runnable_bindings","href":"/api/server_templates/1/runnable_bindings"},
{"rel":"cookbook_attachments","href":"/api/server_templates/1/cookbook_attachments"}
],
"actions": [
{
"rel": "commit"
},
{
"rel": "clone"
},
{
"rel": "resolve"
},
{
"rel": "swap_repository"
},
{
"rel": "detect_changes_in_head"
}
],
"lineage": "https://testscale_1/api/acct/560182816/ec2_server_templates/1",
"inputs": [
{
"name": "input_definition_3604220013",
"value": "blank"
},
{
"name": "input_definition_422628238",
"value": "blank"
}
]
},{
"name": "NICKNAME_933461844",
"description": "DESCRIPTION_2990931717",
"revision": 0,
"links": [
{"rel":"self","href":"/api/server_templates/5"},
{"rel":"multi_cloud_images","href":"/api/server_templates/5/multi_cloud_images"},
{"rel":"default_multi_cloud_image","href":"/api/multi_cloud_images/2"},
{"rel":"inputs","href":"/api/server_templates/5/inputs"},
{"rel":"alert_specs","href":"/api/server_templates/5/alert_specs"},
{"rel":"runnable_bindings","href":"/api/server_templates/5/runnable_bindings"},
{"rel":"cookbook_attachments","href":"/api/server_templates/5/cookbook_attachments"}
],
"actions": [
{
"rel": "commit"
},
{
"rel": "clone"
},
{
"rel": "resolve"
},
{
"rel": "swap_repository"
},
{
"rel": "detect_changes_in_head"
}
],
"lineage": "https://testscale_1/api/acct/560182816/ec2_server_templates/5",
"inputs": [
{
"name": "input_definition_440612151",
"value": "blank"
},
{
"name": "input_definition_744357030",
"value": "blank"
}
]
}]
<?xml version="1.0" encoding="UTF-8"?>
<server_templates>
<server_template>
<name>NICKNAME_432575730</name>
<description>DESCRIPTION_2032361450</description>
<revision>0</revision>
<links>
<link rel="self" href="/api/server_templates/1"/>
<link rel="multi_cloud_images" href="/api/server_templates/1/multi_cloud_images"/>
<link rel="default_multi_cloud_image" href="/api/multi_cloud_images/1"/>
<link rel="inputs" href="/api/server_templates/1/inputs"/>
<link rel="alert_specs" href="/api/server_templates/1/alert_specs"/>
<link rel="runnable_bindings" href="/api/server_templates/1/runnable_bindings"/>
<link rel="cookbook_attachments" href="/api/server_templates/1/cookbook_attachments"/>
</links>
<actions>
<action rel="commit"/>
<action rel="clone"/>
<action rel="resolve"/>
<action rel="swap_repository"/>
<action rel="detect_changes_in_head"/>
</actions>
<lineage>https://testscale_1/api/acct/560182816/ec2_server_templates/1</lineage>
<inputs>
<input>
<name>input_definition_3604220013</name>
<value>blank</value>
</input>
<input>
<name>input_definition_422628238</name>
<value>blank</value>
</input>
</inputs>
</server_template>
<server_template>
<name>NICKNAME_933461844</name>
<description>DESCRIPTION_2990931717</description>
<revision>0</revision>
<links>
<link rel="self" href="/api/server_templates/5"/>
<link rel="multi_cloud_images" href="/api/server_templates/5/multi_cloud_images"/>
<link rel="default_multi_cloud_image" href="/api/multi_cloud_images/2"/>
<link rel="inputs" href="/api/server_templates/5/inputs"/>
<link rel="alert_specs" href="/api/server_templates/5/alert_specs"/>
<link rel="runnable_bindings" href="/api/server_templates/5/runnable_bindings"/>
<link rel="cookbook_attachments" href="/api/server_templates/5/cookbook_attachments"/>
</links>
<actions>
<action rel="commit"/>
<action rel="clone"/>
<action rel="resolve"/>
<action rel="swap_repository"/>
<action rel="detect_changes_in_head"/>
</actions>
<lineage>https://testscale_1/api/acct/560182816/ec2_server_templates/5</lineage>
<inputs>
<input>
<name>input_definition_440612151</name>
<value>blank</value>
</input>
<input>
<name>input_definition_744357030</name>
<value>blank</value>
</input>
</inputs>
</server_template>
</server_templates>
show
Show information about a single ServerTemplate. HEAD revisions have a revision of 0.
The 'inputs_2_0' view is for retrieving inputs in 2.0 serialization (for more details please see Inputs#index.)
- URLs
- GET /api/server_templates/:id
- HTTP response code
- 200 OK
- Content-type
- application/vnd.rightscale.server_template
Required roles
- observer
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
view | no | String | default, inputs, inputs_2_0 | * | no | Specifies how many attributes and/or expanded nested relationships to include. |
Example Responses
Click on a format below to see an example response for the 'default' view:
JSON XML{
"name": "NICKNAME_432575730",
"description": "DESCRIPTION_2032361450",
"revision": 0,
"links": [
{"rel":"self","href":"/api/server_templates/1"},
{"rel":"multi_cloud_images","href":"/api/server_templates/1/multi_cloud_images"},
{"rel":"default_multi_cloud_image","href":"/api/multi_cloud_images/1"},
{"rel":"inputs","href":"/api/server_templates/1/inputs"},
{"rel":"alert_specs","href":"/api/server_templates/1/alert_specs"},
{"rel":"runnable_bindings","href":"/api/server_templates/1/runnable_bindings"},
{"rel":"cookbook_attachments","href":"/api/server_templates/1/cookbook_attachments"}
],
"actions": [
{
"rel": "commit"
},
{
"rel": "clone"
},
{
"rel": "resolve"
},
{
"rel": "swap_repository"
},
{
"rel": "detect_changes_in_head"
}
],
"lineage": "https://testscale_1/api/acct/560182816/ec2_server_templates/1"
}
<?xml version="1.0" encoding="UTF-8"?>
<server_template>
<name>NICKNAME_432575730</name>
<description>DESCRIPTION_2032361450</description>
<revision>0</revision>
<links>
<link rel="self" href="/api/server_templates/1"/>
<link rel="multi_cloud_images" href="/api/server_templates/1/multi_cloud_images"/>
<link rel="default_multi_cloud_image" href="/api/multi_cloud_images/1"/>
<link rel="inputs" href="/api/server_templates/1/inputs"/>
<link rel="alert_specs" href="/api/server_templates/1/alert_specs"/>
<link rel="runnable_bindings" href="/api/server_templates/1/runnable_bindings"/>
<link rel="cookbook_attachments" href="/api/server_templates/1/cookbook_attachments"/>
</links>
<actions>
<action rel="commit"/>
<action rel="clone"/>
<action rel="resolve"/>
<action rel="swap_repository"/>
<action rel="detect_changes_in_head"/>
</actions>
<lineage>https://testscale_1/api/acct/560182816/ec2_server_templates/1</lineage>
</server_template>
Click on a format below to see an example response for the 'inputs' view:
JSON XML{
"name": "NICKNAME_432575730",
"description": "DESCRIPTION_2032361450",
"revision": 0,
"links": [
{"rel":"self","href":"/api/server_templates/1"},
{"rel":"multi_cloud_images","href":"/api/server_templates/1/multi_cloud_images"},
{"rel":"default_multi_cloud_image","href":"/api/multi_cloud_images/1"},
{"rel":"inputs","href":"/api/server_templates/1/inputs"},
{"rel":"alert_specs","href":"/api/server_templates/1/alert_specs"},
{"rel":"runnable_bindings","href":"/api/server_templates/1/runnable_bindings"},
{"rel":"cookbook_attachments","href":"/api/server_templates/1/cookbook_attachments"}
],
"actions": [
{
"rel": "commit"
},
{
"rel": "clone"
},
{
"rel": "resolve"
},
{
"rel": "swap_repository"
},
{
"rel": "detect_changes_in_head"
}
],
"lineage": "https://testscale_1/api/acct/560182816/ec2_server_templates/1",
"inputs": [
{
"name": "input_definition_3604220013",
"value": "text:"
},
{
"name": "input_definition_422628238",
"value": "text:"
}
]
}
<?xml version="1.0" encoding="UTF-8"?>
<server_template>
<name>NICKNAME_432575730</name>
<description>DESCRIPTION_2032361450</description>
<revision>0</revision>
<links>
<link rel="self" href="/api/server_templates/1"/>
<link rel="multi_cloud_images" href="/api/server_templates/1/multi_cloud_images"/>
<link rel="default_multi_cloud_image" href="/api/multi_cloud_images/1"/>
<link rel="inputs" href="/api/server_templates/1/inputs"/>
<link rel="alert_specs" href="/api/server_templates/1/alert_specs"/>
<link rel="runnable_bindings" href="/api/server_templates/1/runnable_bindings"/>
<link rel="cookbook_attachments" href="/api/server_templates/1/cookbook_attachments"/>
</links>
<actions>
<action rel="commit"/>
<action rel="clone"/>
<action rel="resolve"/>
<action rel="swap_repository"/>
<action rel="detect_changes_in_head"/>
</actions>
<lineage>https://testscale_1/api/acct/560182816/ec2_server_templates/1</lineage>
<inputs>
<input>
<name>input_definition_3604220013</name>
<value>text:</value>
</input>
<input>
<name>input_definition_422628238</name>
<value>text:</value>
</input>
</inputs>
</server_template>
Click on a format below to see an example response for the 'inputs_2_0' view:
JSON XML{
"name": "NICKNAME_432575730",
"description": "DESCRIPTION_2032361450",
"revision": 0,
"links": [
{"rel":"self","href":"/api/server_templates/1"},
{"rel":"multi_cloud_images","href":"/api/server_templates/1/multi_cloud_images"},
{"rel":"default_multi_cloud_image","href":"/api/multi_cloud_images/1"},
{"rel":"inputs","href":"/api/server_templates/1/inputs"},
{"rel":"alert_specs","href":"/api/server_templates/1/alert_specs"},
{"rel":"runnable_bindings","href":"/api/server_templates/1/runnable_bindings"},
{"rel":"cookbook_attachments","href":"/api/server_templates/1/cookbook_attachments"}
],
"actions": [
{
"rel": "commit"
},
{
"rel": "clone"
},
{
"rel": "resolve"
},
{
"rel": "swap_repository"
},
{
"rel": "detect_changes_in_head"
}
],
"lineage": "https://testscale_1/api/acct/560182816/ec2_server_templates/1",
"inputs": [
{
"name": "input_definition_3604220013",
"value": "blank"
},
{
"name": "input_definition_422628238",
"value": "blank"
}
]
}
<?xml version="1.0" encoding="UTF-8"?>
<server_template>
<name>NICKNAME_432575730</name>
<description>DESCRIPTION_2032361450</description>
<revision>0</revision>
<links>
<link rel="self" href="/api/server_templates/1"/>
<link rel="multi_cloud_images" href="/api/server_templates/1/multi_cloud_images"/>
<link rel="default_multi_cloud_image" href="/api/multi_cloud_images/1"/>
<link rel="inputs" href="/api/server_templates/1/inputs"/>
<link rel="alert_specs" href="/api/server_templates/1/alert_specs"/>
<link rel="runnable_bindings" href="/api/server_templates/1/runnable_bindings"/>
<link rel="cookbook_attachments" href="/api/server_templates/1/cookbook_attachments"/>
</links>
<actions>
<action rel="commit"/>
<action rel="clone"/>
<action rel="resolve"/>
<action rel="swap_repository"/>
<action rel="detect_changes_in_head"/>
</actions>
<lineage>https://testscale_1/api/acct/560182816/ec2_server_templates/1</lineage>
<inputs>
<input>
<name>input_definition_3604220013</name>
<value>blank</value>
</input>
<input>
<name>input_definition_422628238</name>
<value>blank</value>
</input>
</inputs>
</server_template>
create
Creates a new ServerTemplate with the given parameters.
- URLs
- POST /api/server_templates
- HTTP response code
- 201 Created
- Location
- Href of the created ServerTemplate.
Required roles
- designer
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
server_template | yes | Hash | * | * | no | |
server_template[description] | no | String | * | * | yes | The description of the ServerTemplate to be created. |
server_template[name] | yes | String | * | * | no | The name of the ServerTemplate to be created. |
update
Updates attributes of a given ServerTemplate. Only HEAD revisions can be updated (revision 0). Currently, the attributes you can update are only the 'direct' attributes of a server template. To manage multi cloud images of a ServerTemplate, please see the resource 'ServerTemplateMultiCloudImages'.
- URLs
- PUT /api/server_templates/:id
- HTTP response code
- 204 No Content
Required roles
- designer
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
server_template | yes | Hash | * | * | no | |
server_template[description] | no | String | * | * | yes | The updated description for the ServerTemplate. |
server_template[name] | no | String | * | * | no | The updated name for the ServerTemplate. |
destroy
Deletes a given ServerTemplate.
- URLs
- DELETE /api/server_templates/:id
- HTTP response code
- 204 No Content
Required roles
- designer
clone
Clones a given ServerTemplate.
- URLs
- POST /api/server_templates/:id/clone
- HTTP response code
- 201 Created
- Location
- Href of the cloned ServerTemplate.
Required roles
- designer
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
server_template | yes | Hash | * | * | no | |
server_template[description] | no | String | * | * | no | The description for the cloned ServerTemplate. |
server_template[name] | yes | String | * | * | no | The name for the cloned ServerTemplate. |
commit
Commits a given ServerTemplate. Only HEAD revisions (revision 0) that are owned by the account can be committed.
- URLs
- POST /api/server_templates/:id/commit
- HTTP response code
- 201 Created
- Location
- Href of the committed ServerTemplate.
Required roles
- designer
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
commit_head_dependencies | yes | String | true, false | * | no | Commit all HEAD revisions (if any) of the associated MultiCloud Images, RightScripts and Chef repo sequences. |
commit_message | yes | String | * | * | no | The message associated with the commit. |
freeze_repositories | yes | String | true, false | * | no | Freeze the repositories. |
detect_changes_in_head
Identifies RightScripts attached to the resource that differ from their HEAD.
If the attached revision of the RightScript is the HEAD, then this will indicate a difference between it and the latest committed revision in the same lineage.
- URLs
- POST /api/server_templates/:id/detect_changes_in_head
- HTTP response code
- 200 OK
- Content-type
- application/vnd.rightscale.changes;type=collection
Required roles
- observer
publish
Publishes a given ServerTemplate and its subordinates. Only non-HEAD revisions that are owned by the account can be published.
- URLs
- POST /api/server_templates/:id/publish
- HTTP response code
- 201 Created
- Location
- Href of the created Publication.
Required roles
- publisher
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
account_group_hrefs | yes | Array | * | * | no | List of hrefs of account groups to publish to. |
allow_comments | no | String | true, false | * | no | Allow users to leave comments on this ServerTemplate. |
categories | no | Array | * | * | no | List of Categories. |
descriptions | yes | Hash | * | * | no | |
descriptions[long] | yes | String | * | * | no | Long Description. |
descriptions[notes] | yes | String | * | * | no | New Revision Notes. |
descriptions[short] | yes | String | * | * | no | Short Description. |
email_comments | no | String | true, false | * | no | Email me when a user comments on this ServerTemplate. |
resolve
Enumerates all attached cookbooks, missing dependencies and bound executables.
Version constraints on missing dependencies and the state of the Chef Recipes; whether or not the cookbook or recipe itself could be found among the attachments, will also be reported.
- URLs
- POST /api/server_templates/:id/resolve
- HTTP response code
- 200 OK
- Content-type
- application/vnd.rightscale.cookbook_resolution;type=collection
Required roles
- observer
swap_repository
In-place replacement of attached cookbooks from a given repository.
For each attached cookbook coming from the source repository, replace it by attaching a cookbook of identical name coming from the target repository.
In order for the operation to be successful, all attachments that came from the source repository must exist in the target repository.
If multiple cookbooks of a given name exist in the target repository, preference is given by the following order (top most being the highest preference):
- Name & Version Match / Primary Namespace
- Name & Version Match / Alternate Namespace
- Name Match / Primary Namespace
- Name Match / Alternate Namespace
If multiple cookbooks still have the same preference for the replacement, the operation is indeterministic.
- URLs
- POST /api/server_templates/:id/swap_repository
- HTTP response code
- 200 OK
Required roles
- designer
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
source_repository_href | yes | String | * | * | no | The repository whose cookbook attachments are to be replaced. |
target_repository_href | yes | String | * | * | no | The repository whose cookbook attachments are to be utilized. |