StackScripts v4.166.0
StackScripts List
If the request is not authenticated, only public StackScripts are returned.
For more information on StackScripts, please read our StackScripts documentation.
Authorizations
personalAccessToken | |
oauth | stackscripts:read_only |
Query Parameters
page |
The page of a collection to return. |
page_size |
The number of items to return per page. |
Request Samples
curl https://api.linode.com/v4/linode/stackscripts
linode-cli stackscripts list
Response Samples
{
"data": [
{
"created": "2018-01-01T00:01:01",
"deployments_active": 1,
"deployments_total": 12,
"description": "This StackScript installs and configures MySQL\n",
"id": 10079,
"images": [
"linode/debian9",
"linode/debian8"
],
"is_public": true,
"label": "a-stackscript",
"mine": true,
"rev_note": "Set up MySQL",
"script": "\"#!/bin/bash\"\n",
"updated": "2018-01-01T00:01:01",
"user_defined_fields": [
{
"example": "hunter2",
"label": "Enter the DB password",
"name": "DB_PASSWORD"
}
],
"user_gravatar_id": "a445b305abda30ebc766bc7fda037c37",
"username": "myuser"
}
],
"page": 1,
"pages": 1,
"results": 1
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
data | array
of objects
| ||||||||||||||||||||||||||||||||||||||||||
page | integer The current page. | ||||||||||||||||||||||||||||||||||||||||||
pages | integer The total number of pages. | ||||||||||||||||||||||||||||||||||||||||||
results | integer The total number of results. |
errors | array
of objects
|
StackScript Create
Creates a StackScript in your Account.
Authorizations
personalAccessToken | |
oauth | stackscripts:read_write |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST -d '{
"label": "a-stackscript",
"description": "This StackScript installs and configures MySQL",
"images": [
"linode/debian9",
"linode/debian8"
],
"is_public": true,
"rev_note": "Set up MySQL",
"script": "#!/bin/bash"
}' \
https://api.linode.com/v4/linode/stackscripts
linode-cli stackscripts create \
--label a-stackscript \
--description "This StackScript install and configures MySQL" \
--images "linode/debian9" \
--images "linode/debian8" \
--is_public true \
--rev_note "Set up MySQL" \
--script '#!/bin/bash'
Request Body Schema
description | string A description for the StackScript. |
images Required | array
of strings An array of Image IDs. These are the Images that can be deployed with this StackScript.
|
is_public | boolean This determines whether other users can use your StackScript. Once a StackScript is made public, it cannot be made private. |
label Required | string
3..128
charactersThe StackScript’s label is for display purposes only. |
rev_note | string This field allows you to add notes for the set of revisions made to this StackScript. |
script Required | string The script to execute when provisioning a new Linode with this StackScript. |
Response Samples
{
"created": "2018-01-01T00:01:01",
"deployments_active": 1,
"deployments_total": 12,
"description": "This StackScript installs and configures MySQL\n",
"id": 10079,
"images": [
"linode/debian9",
"linode/debian8"
],
"is_public": true,
"label": "a-stackscript",
"mine": true,
"rev_note": "Set up MySQL",
"script": "\"#!/bin/bash\"\n",
"updated": "2018-01-01T00:01:01",
"user_defined_fields": [
{
"example": "hunter2",
"label": "Enter the DB password",
"name": "DB_PASSWORD"
}
],
"user_gravatar_id": "a445b305abda30ebc766bc7fda037c37",
"username": "myuser"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string<date-time> The date this StackScript was created. | ||||||||||||
deployments_active | integer Count of currently active, deployed Linodes created from this StackScript. | ||||||||||||
deployments_total | integer The total number of times this StackScript has been deployed. | ||||||||||||
description | string A description for the StackScript. | ||||||||||||
id | integer The unique ID of this StackScript. | ||||||||||||
images | array
of strings An array of Image IDs. These are the Images that can be deployed with this StackScript.
| ||||||||||||
is_public | boolean This determines whether other users can use your StackScript. Once a StackScript is made public, it cannot be made private. | ||||||||||||
label | string
3..128
charactersThe StackScript’s label is for display purposes only. | ||||||||||||
mine | boolean Returns | ||||||||||||
rev_note | string This field allows you to add notes for the set of revisions made to this StackScript. | ||||||||||||
script | string The script to execute when provisioning a new Linode with this StackScript. | ||||||||||||
updated | string<date-time> The date this StackScript was last updated. | ||||||||||||
user_defined_fields | array
of objects This is a list of fields defined with a special syntax inside this StackScript that allow for supplying customized parameters during deployment. See Declare User-Defined Fields (UDFs) for more information.
| ||||||||||||
user_gravatar_id | string The Gravatar ID for the User who created the StackScript. | ||||||||||||
username | string The User who created the StackScript. |
errors | array
of objects
|
StackScript Delete
Deletes a private StackScript you have permission to read_write
. You cannot delete a public StackScript.
Authorizations
personalAccessToken | |
oauth | stackscripts:read_write |
Path Parameters
stackscriptId | string RequiredThe ID of the StackScript to look up. |
Request Samples
curl -H "Authorization: Bearer $TOKEN" \
-X DELETE \
https://api.linode.com/v4/linode/stackscripts/10079
linode-cli stackscripts delete 10079
Response Samples
{}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
errors | array
of objects
|
StackScript View
Returns all of the information about a specified StackScript, including the contents of the script.
Authorizations
personalAccessToken | |
oauth | stackscripts:read_only |
Path Parameters
stackscriptId | string RequiredThe ID of the StackScript to look up. |
Request Samples
curl https://api.linode.com/v4/linode/stackscripts/10079
linode-cli stackscripts view 10079
Response Samples
{
"created": "2018-01-01T00:01:01",
"deployments_active": 1,
"deployments_total": 12,
"description": "This StackScript installs and configures MySQL\n",
"id": 10079,
"images": [
"linode/debian9",
"linode/debian8"
],
"is_public": true,
"label": "a-stackscript",
"mine": true,
"rev_note": "Set up MySQL",
"script": "\"#!/bin/bash\"\n",
"updated": "2018-01-01T00:01:01",
"user_defined_fields": [
{
"example": "hunter2",
"label": "Enter the DB password",
"name": "DB_PASSWORD"
}
],
"user_gravatar_id": "a445b305abda30ebc766bc7fda037c37",
"username": "myuser"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string<date-time> The date this StackScript was created. | ||||||||||||
deployments_active | integer Count of currently active, deployed Linodes created from this StackScript. | ||||||||||||
deployments_total | integer The total number of times this StackScript has been deployed. | ||||||||||||
description | string A description for the StackScript. | ||||||||||||
id | integer The unique ID of this StackScript. | ||||||||||||
images | array
of strings An array of Image IDs. These are the Images that can be deployed with this StackScript.
| ||||||||||||
is_public | boolean This determines whether other users can use your StackScript. Once a StackScript is made public, it cannot be made private. | ||||||||||||
label | string
3..128
charactersThe StackScript’s label is for display purposes only. | ||||||||||||
mine | boolean Returns | ||||||||||||
rev_note | string This field allows you to add notes for the set of revisions made to this StackScript. | ||||||||||||
script | string The script to execute when provisioning a new Linode with this StackScript. | ||||||||||||
updated | string<date-time> The date this StackScript was last updated. | ||||||||||||
user_defined_fields | array
of objects This is a list of fields defined with a special syntax inside this StackScript that allow for supplying customized parameters during deployment. See Declare User-Defined Fields (UDFs) for more information.
| ||||||||||||
user_gravatar_id | string The Gravatar ID for the User who created the StackScript. | ||||||||||||
username | string The User who created the StackScript. |
errors | array
of objects
|
StackScript Update
Updates a StackScript.
Once a StackScript is made public, it cannot be made private.
Authorizations
personalAccessToken | |
oauth | stackscripts:read_write |
Path Parameters
stackscriptId | string RequiredThe ID of the StackScript to look up. |
Request Samples
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X PUT -d '{
"label": "a-stackscript",
"description": "This StackScript installs and configures MySQL",
"images": [
"linode/debian9",
"linode/debian8"
],
"is_public": true,
"rev_note": "Set up MySQL",
"script": "#!/bin/bash"
}' \
https://api.linode.com/v4/linode/stackscripts/10079
linode-cli stackscripts update 10079 \
--label a-stackscript \
--description "This StackScript installs \
and configures MySQL" \
--images "linode/debian9" \
--images "linode/debian8" \
--is_public true \
--rev_note "Set up MySQL" \
--script '#!/bin/bash'
Request Body Schema
description | string A description for the StackScript. |
images | array
of strings An array of Image IDs. These are the Images that can be deployed with this StackScript.
|
is_public | boolean This determines whether other users can use your StackScript. Once a StackScript is made public, it cannot be made private. |
label | string
3..128
charactersThe StackScript’s label is for display purposes only. |
rev_note | string This field allows you to add notes for the set of revisions made to this StackScript. |
script | string The script to execute when provisioning a new Linode with this StackScript. |
Response Samples
{
"created": "2018-01-01T00:01:01",
"deployments_active": 1,
"deployments_total": 12,
"description": "This StackScript installs and configures MySQL\n",
"id": 10079,
"images": [
"linode/debian9",
"linode/debian8"
],
"is_public": true,
"label": "a-stackscript",
"mine": true,
"rev_note": "Set up MySQL",
"script": "\"#!/bin/bash\"\n",
"updated": "2018-01-01T00:01:01",
"user_defined_fields": [
{
"example": "hunter2",
"label": "Enter the DB password",
"name": "DB_PASSWORD"
}
],
"user_gravatar_id": "a445b305abda30ebc766bc7fda037c37",
"username": "myuser"
}
{
"errors": [
{
"field": "fieldname",
"reason": "fieldname must be a valid value"
}
]
}
Responses
created | string<date-time> The date this StackScript was created. | ||||||||||||
deployments_active | integer Count of currently active, deployed Linodes created from this StackScript. | ||||||||||||
deployments_total | integer The total number of times this StackScript has been deployed. | ||||||||||||
description | string A description for the StackScript. | ||||||||||||
id | integer The unique ID of this StackScript. | ||||||||||||
images | array
of strings An array of Image IDs. These are the Images that can be deployed with this StackScript.
| ||||||||||||
is_public | boolean This determines whether other users can use your StackScript. Once a StackScript is made public, it cannot be made private. | ||||||||||||
label | string
3..128
charactersThe StackScript’s label is for display purposes only. | ||||||||||||
mine | boolean Returns | ||||||||||||
rev_note | string This field allows you to add notes for the set of revisions made to this StackScript. | ||||||||||||
script | string The script to execute when provisioning a new Linode with this StackScript. | ||||||||||||
updated | string<date-time> The date this StackScript was last updated. | ||||||||||||
user_defined_fields | array
of objects This is a list of fields defined with a special syntax inside this StackScript that allow for supplying customized parameters during deployment. See Declare User-Defined Fields (UDFs) for more information.
| ||||||||||||
user_gravatar_id | string The Gravatar ID for the User who created the StackScript. | ||||||||||||
username | string The User who created the StackScript. |
errors | array
of objects
|