Skip to content

Commit dcbc0d5

Browse files
committed
updates diagrams
1 parent 7adb5d7 commit dcbc0d5

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed
729 KB
Loading
1.29 MB
Loading
-273 KB
Binary file not shown.

src/content/changelog/workers/2025-09-03-new-workers-api.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
22
title: A new, simpler REST API for Cloudflare Workers (Beta)
33
description: Simpler Workers API, SDK methods, and Terraform resources for directly managing Workers, Versions, and Deployments
4-
date: 2025-09-03
4+
date: 2025-09-04
55
---
66
You can now manage [**Workers**](/api/resources/workers/subresources/beta/subresources/workers/methods/create/), [**Versions**](/api/resources/workers/subresources/beta/subresources/workers/models/worker/#(schema)), and [**Deployments**](/api/resources/workers/subresources/scripts/subresources/content/methods/update/) as separate resources with a new, resource-oriented API (Beta).
77

88
This new API is supported in the [Cloudflare Terraform provider](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs) and the [Cloudflare Typescript SDK](https://github.com/cloudflare/cloudflare-typescript), allowing platform teams to manage a Worker's infrastructure in Terraform, while development teams handle code deployments from a separate repository or workflow. We also designed this API with AI agents in mind, as a clear, predictable structure is essential for them to reliably build, test, and deploy applications.
99

1010
### Try it out
1111
- [**New beta API endpoints**](/api/resources/workers/subresources/beta/)
12-
- [**Cloudflare TypeScript SDK v4.6.0**](https://github.com/cloudflare/cloudflare-typescript)
12+
- [**Cloudflare TypeScript SDK v5.0.0**](https://github.com/cloudflare/cloudflare-typescript)
13+
- [**Cloudflare Go SDK v6.0.0**](https://github.com/cloudflare/cloudflare-go)
1314
- [**Terraform provider v5.9.0**](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs): [`cloudflare_worker`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/worker) , [`cloudflare_worker_version`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/worker_version), and [`cloudflare_workers_deployments`](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/workers_deployment) resources.
1415
- See full examples in our [Infrastructure as Code (IaC) guide](/workers/platform/infrastructure-as-code)
1516

1617

17-
![**Before and after**](~/assets/images/workers/platform/endpoints.png)
18-
19-
## Before: Eight endpoints with mixed responsibilities
18+
## Before: Eight+ endpoints with mixed responsibilities
19+
![**Before**](~/assets/images/workers/platform/api-before.png)
2020
The existing API was originally designed for simple, one-shot script uploads.
2121

2222
```sh
@@ -41,6 +41,7 @@ This API worked for creating a basic Worker, uploading all of its code, and depl
4141
- **Scripts used names as primary identifiers**: The existing API uses the Worker script name as the primary identifier for a Worker, which meant that if you wanted to rename a Worker via API, you needed to deploy an entirely new script and update every reference across your infrastructure. If you were using Terraform, renaming a Worker could inadvertently result in destroying the Worker altogether.
4242

4343
## After: Three resources with clear boundaries
44+
![**After**](~/assets/images/workers/platform/api-after.png)
4445
The new API has three core resources with distinct boundaries: [**Worker**](/api/resources/workers/subresources/beta/subresources/workers/methods/create/), [**Versions**](/api/resources/workers/subresources/beta/subresources/workers/models/worker/#(schema)), and [**Deployment**](/api/resources/workers/subresources/scripts/subresources/content/methods/update/). All endpoints now use clean JSON payloads, with script content embedded as `base64`-encoded string, a simpler and more reliable approach than the previous `multipart/form-data` format.
4546
- **Worker**: The parent resource representing your application. It has a stable UUID and holds persistent settings like `name`, `tags`, and `logpush`. You can now create a Worker to establish its identity and settings **before** any code is uploaded.
4647

0 commit comments

Comments
 (0)