diff --git a/src/content/docs/workers/versions-and-deployments/index.mdx b/src/content/docs/workers/versions-and-deployments/index.mdx index 5c089c4e4a3..8934116d356 100644 --- a/src/content/docs/workers/versions-and-deployments/index.mdx +++ b/src/content/docs/workers/versions-and-deployments/index.mdx @@ -51,6 +51,17 @@ Wrangler allows you to view the 100 most recent versions and deployments. Refer 2. Select your Worker > **Deployments**. +The Deployments tab shows the deployment history and IDs. It does not display the code of previous deployments. + +### Retrieve code from a previous deployment + +The Cloudflare dashboard and Wrangler do not provide a built-in way to download the code of a previous deployment. You can retrieve a specific deployment's code using the Cloudflare API: +```bash +curl -s -H "Authorization: Bearer " \ + "https://api.cloudflare.com/client/v4/accounts//workers/scripts//content/v2?deployment=" +``` +You can find the in the Deployments tab in the dashboard, or by running wrangler deployments list. The API token requires Workers Scripts: Read permission. + ## Next steps - [Deployment management](/workers/versions-and-deployments/deployment-management/) - Upload versions without deploying them and control when they go live