Skip to content

Commit d095cd7

Browse files
committed
docs: update all content to reflect new Workers API
1 parent 698edbd commit d095cd7

File tree

5 files changed

+275
-317
lines changed

5 files changed

+275
-317
lines changed

src/content/docs/workers/configuration/multipart-upload-metadata.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ title: Multipart upload metadata
55

66
import { Type, MetaInfo } from "~/components";
77

8+
:::note
9+
10+
There is a new API for uploading Workers. See [here](/workers/platform/infrastructure-as-code#cloudflare-rest-api) for more information.
11+
:::
12+
813
If you're using the [Workers Script Upload API](/api/resources/workers/subresources/scripts/methods/update/) or [Version Upload API](/api/resources/workers/subresources/scripts/subresources/versions/methods/create/) directly, `multipart/form-data` uploads require you to specify a `metadata` part. This metadata defines the Worker's configuration in JSON format, analogue to the [wrangler.toml file](/workers/wrangler/configuration/).
914

1015
## Sample `metadata`

src/content/docs/workers/configuration/versions-and-deployments/index.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ When using [Wrangler](/workers/wrangler/), changes made to a Worker's triggers [
6969
New versions are not created when you make changes to [resources connected to your Worker](/workers/runtime-apis/bindings/). For example, if two Workers (Worker A and Worker B) are connected via a [service binding](/workers/runtime-apis/bindings/service-bindings/), changing the code of Worker B will not create a new version of Worker A. Changing the code of Worker B will only create a new version of Worker B. Changes to the service binding (such as, deleting the binding or updating the [environment](/workers/wrangler/environments/) it points to) on Worker A will also not create a new version of Worker B.
7070
:::
7171

72+
#### Directly manage Versions and Deployments
73+
74+
See examples of creating a Worker, Versions, and Deployments directly with the API, library SDKs, and Terraform in [Infrastructure as Code](/workers/platform/infrastructure-as-code/).
75+
7276
### View versions and deployments
7377

7478
#### Via Wrangler

src/content/docs/workers/observability/logs/logpush.mdx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,6 @@ route = { pattern = "example.org/*", zone_name = "example.org" }
9393

9494
</WranglerConfig>
9595

96-
Configure via multipart script upload API:
97-
98-
```bash
99-
curl --request PUT \
100-
"https://api.cloudflare.com/client/v4/accounts/{account_id}/workers/scripts/{script_name}" \
101-
--header "Authorization: Bearer <API_TOKEN>" \
102-
--form 'metadata={"main_module": "my-worker.js", "logpush": true}' \
103-
--form '"my-worker.js"=@./my-worker.js;type=application/javascript+module'
104-
```
105-
10696
## Limits
10797

10898
The `logs` and `exceptions` fields have a combined limit of 16,384 characters before fields will start being truncated. Characters are counted in the order of all `exception.name`s, `exception.message`s, and then `log.message`s.

0 commit comments

Comments
 (0)