---
updatedAt: 2026-06-08T17:23:24.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/linode-api/llms.txt
---

# Get a StackScript

Returns all of the information about a specified StackScript, including the contents of the script.


**Permissions and scopes**

To call this operation, you need the following:

- **Identity and access permissions**. Your user needs these roles assigned. [Learn more](https://techdocs.akamai.com/cloud-computing/docs/identity-access-cm-available-roles).
  - Roles: `stackscript_viewer`
- **OAuth scopes**. Your user needs these scopes assigned. [Learn more](https://techdocs.akamai.com/linode-api/reference/get-started#oauth).

  - Scopes: `stackscripts:read_only`


**CLI**

```shell
linode-cli stackscripts view 10079
```

[Learn more](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli)

# OpenAPI definition

````json
{
  "components": {
    "securitySchemes": {
      "oauth": {
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://login.linode.com/oauth/authorize",
            "scopes": {
              "account:read_only": "Allows access to GET information about your account.",
              "account:read_write": "Allows access to all endpoints related to your account.",
              "domains:read_only": "Allows access to GET Domains on your account.",
              "domains:read_write": "Allows access to all Domain endpoints.",
              "events:read_only": "Allows access to GET your Events.",
              "events:read_write": "Allows access to all endpoints related to your Events.",
              "firewall:read_only": "Allows access to GET information about your Firewalls.",
              "firewall:read_write": "Allows access to all Firewall endpoints.",
              "images:read_only": "Allows access to GET your Images.",
              "images:read_write": "Allows access to all endpoints related to your Images.",
              "ips:read_only": "Allows access to GET your ips.",
              "ips:read_write": "Allows access to all endpoints related to your ips.",
              "linodes:read_only": "Allows access to GET Linodes on your account.",
              "linodes:read_write": "Allow access to all endpoints related to your Linodes.",
              "lke:read_only": "Allows access to GET LKE Clusters on your account.",
              "lke:read_write": "Allows access to all endpoints related to LKE Clusters on your account.",
              "longview:read_only": "Allows access to GET your Longview Clients.",
              "longview:read_write": "Allows access to all endpoints related to your Longview Clients.",
              "monitor:read-write": "Allows access to all Monitor (Akamai Cloud Pulse) endpoints.",
              "monitor:read_only": "Allows access to Monitor (Akamai Cloud Pulse) data.",
              "nodebalancers:read_only": "Allows access to GET NodeBalancers on your account.",
              "nodebalancers:read_write": "Allows access to all NodeBalancer endpoints.",
              "object_storage:read_only": "Allows access to GET information related to your Object Storage.",
              "object_storage:read_write": "Allows access to all Object Storage endpoints.",
              "stackscripts:read_only": "Allows access to GET your StackScripts.",
              "stackscripts:read_write": "Allows access to all endpoints related to your StackScripts.",
              "volumes:read_only": "Allows access to GET your Volumes.",
              "volumes:read_write": "Allows access to all endpoints related to your Volumes.",
              "vpc:read_write": "Allows access to all endpoints related to VPC and Subnet creation, updating, and deletion."
            },
            "tokenUrl": "https://login.linode.com/oauth/token"
          }
        },
        "type": "oauth2"
      },
      "personalAccessToken": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "externalDocs": {
    "description": "See documentation for Akamai's Linode API",
    "url": "https://techdocs.akamai.com/linode-api/reference"
  },
  "info": {
    "description": "[Read the API documentation](https://techdocs.akamai.com/linode-api/reference/api).",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "title": "Linode StackScripts",
    "version": "4.229.1"
  },
  "openapi": "3.0.1",
  "paths": {
    "/{apiVersion}/linode/stackscripts/{stackscriptId}": {
      "get": {
        "description": "Returns all of the information about a specified StackScript, including the contents of the script.\n\n\n**Permissions and scopes**\n\nTo call this operation, you need the following:\n\n- **Identity and access permissions**. Your user needs these roles assigned. [Learn more](https://techdocs.akamai.com/cloud-computing/docs/identity-access-cm-available-roles).\n  - Roles: `stackscript_viewer`\n- **OAuth scopes**. Your user needs these scopes assigned. [Learn more](https://techdocs.akamai.com/linode-api/reference/get-started#oauth).\n\n  - Scopes: `stackscripts:read_only`\n\n\n**CLI**\n\n```shell\nlinode-cli stackscripts view 10079\n```\n\n[Learn more](https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli)",
        "externalDocs": {
          "description": "See documentation for this operation in Akamai's Linode API",
          "url": "https://techdocs.akamai.com/linode-api/reference/get-stack-script"
        },
        "operationId": "get-stack-script",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "created": "2026-03-31T00:40:32",
                  "deployments_active": 0,
                  "deployments_total": 0,
                  "description": "This StackScript installs and configures MySQL",
                  "id": 123456,
                  "images": [
                    "linode/debian13"
                  ],
                  "is_public": false,
                  "label": "example-stackscript",
                  "logo_url": "",
                  "mine": true,
                  "ordinal": 0,
                  "rev_note": "",
                  "script": "#!/bin/bash",
                  "updated": "2026-03-31T00:40:32",
                  "user_defined_fields": [],
                  "user_gravatar_id": "e96f2ce1564b85f70309dd06b6c134c8",
                  "username": "alfulani"
                },
                "schema": {
                  "additionalProperties": false,
                  "description": "A StackScript on your account, which you can use to automatically deploy a fully configured application.",
                  "properties": {
                    "created": {
                      "description": "__Read-only__ The date this StackScript was created.",
                      "example": "2018-01-01T00:01:01",
                      "format": "date-time",
                      "readOnly": true,
                      "type": "string",
                      "x-linode-cli-display": 6
                    },
                    "deployments_active": {
                      "description": "__Read-only__ Count of currently active, deployed Linodes created from this StackScript.",
                      "example": 1,
                      "readOnly": true,
                      "type": "integer"
                    },
                    "deployments_total": {
                      "description": "__Filterable__, __Read-only__ The total number of times this StackScript has been deployed.",
                      "example": 12,
                      "readOnly": true,
                      "type": "integer",
                      "x-akamai": {
                        "labels": [
                          "Filterable"
                        ]
                      },
                      "x-linode-filterable": true
                    },
                    "description": {
                      "description": "__Filterable__ A description for the StackScript.",
                      "example": "This StackScript installs and configures MySQL",
                      "type": "string",
                      "x-akamai": {
                        "labels": [
                          "Filterable"
                        ]
                      },
                      "x-linode-filterable": true
                    },
                    "id": {
                      "description": "__Read-only__ The unique ID of this StackScript.",
                      "example": 10079,
                      "readOnly": true,
                      "type": "integer",
                      "x-linode-cli-display": 1
                    },
                    "images": {
                      "description": "An array of Image IDs. These are the Images that can be deployed with this StackScript.\n\n`any/all` indicates that all available Images, including private Images, are accepted.",
                      "example": [
                        "linode/debian13",
                        "linode/debian13"
                      ],
                      "items": {
                        "type": "string"
                      },
                      "type": "array",
                      "x-linode-cli-display": 4
                    },
                    "is_public": {
                      "description": "__Filterable__ This determines whether other users can use your StackScript. __Once a StackScript is made public, it cannot be made private.__",
                      "example": true,
                      "type": "boolean",
                      "x-akamai": {
                        "labels": [
                          "Filterable"
                        ]
                      },
                      "x-linode-cli-display": 5,
                      "x-linode-filterable": true
                    },
                    "label": {
                      "description": "__Filterable__ The StackScript's label is for display purposes only.",
                      "example": "a-stackscript",
                      "maxLength": 128,
                      "minLength": 3,
                      "type": "string",
                      "x-akamai": {
                        "labels": [
                          "Filterable"
                        ]
                      },
                      "x-linode-cli-display": 3,
                      "x-linode-filterable": true
                    },
                    "mine": {
                      "description": "__Filterable__, __Read-only__ Returns `true` if this StackScript is owned by the account of the user making the request, and the user making the request is unrestricted or has access to this StackScript.",
                      "example": true,
                      "readOnly": true,
                      "type": "boolean",
                      "x-akamai": {
                        "labels": [
                          "Filterable"
                        ]
                      },
                      "x-linode-filterable": true
                    },
                    "rev_note": {
                      "description": "__Filterable__ This field allows you to add notes for the set of revisions made to this StackScript.",
                      "example": "Set up MySQL",
                      "type": "string",
                      "x-akamai": {
                        "labels": [
                          "Filterable"
                        ]
                      },
                      "x-linode-filterable": true
                    },
                    "script": {
                      "description": "The script to execute when provisioning a new Linode with this StackScript.",
                      "example": "\\\"#!/bin/bash\\\"",
                      "type": "string",
                      "x-linode-cli-format": "file"
                    },
                    "updated": {
                      "description": "__Read-only__ The date this StackScript was last updated.",
                      "example": "2018-01-01T00:01:01",
                      "format": "date-time",
                      "readOnly": true,
                      "type": "string",
                      "x-linode-cli-display": 7
                    },
                    "user_defined_fields": {
                      "description": "__Read-only__ 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)](https://techdocs.akamai.com/cloud-computing/docs/write-a-custom-script-for-use-with-stackscripts#declare-user-defined-fields-udfs) for more information.",
                      "example": {
                        "example": "hunter2",
                        "label": "Enter the DB password",
                        "name": "DB_PASSWORD"
                      },
                      "items": {
                        "additionalProperties": false,
                        "description": "A custom field defined by the User with a special syntax within a StackScript. Derived from the contents of the script.",
                        "properties": {
                          "default": {
                            "description": "__Read-only__ The default value.  If not specified, this value will be used.",
                            "readOnly": true,
                            "type": "string"
                          },
                          "example": {
                            "description": "__Read-only__ An example value for the field.",
                            "example": "hunter2",
                            "readOnly": true,
                            "type": "string"
                          },
                          "label": {
                            "description": "__Read-only__ A human-readable label for the field that will serve as the input prompt for entering the value during deployment.",
                            "example": "Enter the password",
                            "readOnly": true,
                            "type": "string"
                          },
                          "manyOf": {
                            "description": "__Read-only__ A list of acceptable values for the field in any quantity, combination or order.",
                            "example": "avalue,anothervalue,thirdvalue",
                            "readOnly": true,
                            "type": "string"
                          },
                          "name": {
                            "description": "__Read-only__ The name of the field.",
                            "example": "DB_PASSWORD",
                            "readOnly": true,
                            "type": "string"
                          },
                          "oneOf": {
                            "description": "__Read-only__ A list of acceptable single values for the field.",
                            "example": "avalue,anothervalue,thirdvalue",
                            "readOnly": true,
                            "type": "string"
                          }
                        },
                        "required": [
                          "label",
                          "name",
                          "example"
                        ],
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/user-defined-field.yaml"
                        }
                      },
                      "readOnly": true,
                      "type": "array"
                    },
                    "user_gravatar_id": {
                      "description": "__Read-only__ The Gravatar ID for the User who created the StackScript.",
                      "example": "a445b305abda30ebc766bc7fda037c37",
                      "readOnly": true,
                      "type": "string"
                    },
                    "username": {
                      "description": "__Read-only__ The User who created the StackScript.",
                      "example": "myuser",
                      "readOnly": true,
                      "type": "string",
                      "x-linode-cli-display": 2
                    }
                  },
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/stack-script.yaml"
                  }
                }
              }
            },
            "description": "A single StackScript."
          },
          "default": {
            "content": {
              "application/json": {
                "example": {
                  "errors": [
                    {
                      "reason": "Invalid JSON"
                    }
                  ]
                },
                "schema": {
                  "additionalProperties": false,
                  "properties": {
                    "errors": {
                      "items": {
                        "additionalProperties": false,
                        "description": "An object for describing a single error that occurred during the processing of a request.",
                        "properties": {
                          "field": {
                            "description": "The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as `null` if the error is not specific to any single element of the request.",
                            "example": "fieldname",
                            "type": "string"
                          },
                          "reason": {
                            "description": "What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to [Open a support ticket](ref:post-ticket) or perform some other action before you can complete the request successfully.",
                            "example": "fieldname must be a valid value",
                            "type": "string"
                          }
                        },
                        "type": "object",
                        "x-akamai": {
                          "file-path": "schemas/error-object.yaml"
                        }
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "See [Errors](ref:errors) for the range of possible error response codes."
          }
        },
        "security": [
          {
            "personalAccessToken": []
          },
          {
            "oauth": [
              "stackscripts:read_only"
            ]
          }
        ],
        "summary": "Get a StackScript",
        "tags": [
          "StackScripts"
        ],
        "x-akamai": {
          "tabs": [
            {
              "syntax": "linode-cli stackscripts view 10079",
              "title": "CLI",
              "url": "https://techdocs.akamai.com/cloud-computing/docs/getting-started-with-the-linode-cli"
            }
          ]
        },
        "x-linode-cli-action": "view",
        "x-linode-grant": "read_only",
        "x-linode-iam": [
          {
            "roles": [
              "stackscript_viewer"
            ]
          }
        ]
      },
      "parameters": [
        {
          "description": "__Enum__ Call either the `v4` URL, or `v4beta` for operations still in Beta.",
          "in": "path",
          "name": "apiVersion",
          "required": true,
          "schema": {
            "enum": [
              "v4",
              "v4beta"
            ],
            "example": "v4",
            "type": "string"
          },
          "x-akamai": {
            "file-path": "parameters/api-version-path.yaml"
          }
        },
        {
          "description": "The ID of the StackScript to look up.",
          "in": "path",
          "name": "stackscriptId",
          "required": true,
          "schema": {
            "example": 10079,
            "type": "string"
          },
          "x-akamai": {
            "file-path": "parameters/stackscript-id-path.yaml"
          }
        }
      ],
      "x-akamai": {
        "file-path": "paths/stack-script.yaml",
        "path-info": "/{apiVersion}/linode/stackscripts/{stackscriptId}"
      },
      "x-linode-cli-command": "stackscripts"
    }
  },
  "servers": [
    {
      "url": "https://api.linode.com"
    }
  ],
  "tags": [
    {
      "description": "Create and manage StackScripts, reusable scripts that run during the deployment of new Linode instances to automate custom configurations.",
      "name": "StackScripts"
    }
  ],
  "x-akamai": {
    "auth-type": "OAUTH",
    "file-path": "linode-stack-scripts.yaml"
  },
  "x-readme": {
    "explorer-enabled": false,
    "samples-languages": [
      "curl",
      "python",
      "node"
    ]
  }
}
````

# Sibling pages

* [Create a StackScript](https://techdocs.akamai.com/linode-api/reference/post-add-stack-script.md)
* [List StackScripts](https://techdocs.akamai.com/linode-api/reference/get-stack-scripts.md)
* [Update a StackScript](https://techdocs.akamai.com/linode-api/reference/put-stack-script.md)
* [Delete a StackScript](https://techdocs.akamai.com/linode-api/reference/delete-stack-script.md)