WorkerWorker Script

Patch Script Settings

PATCH
Patch script metadata or config, such as bindings or usage model

Path parameters

account_identifierstringRequired
Identifier
script_namestringRequired
Name of the script, used in URLs and route configuration.

Request

This endpoint expects an object.
settings
objectRequired

Response

This endpoint returns an object
bindings
list of unionsOptional
List of bindings attached to this Worker
compatibility_date
stringOptional
Opt your Worker into changes after this date
compatibility_flags
list of stringsOptional
Opt your Worker into specific changes
logpush
booleanOptional
Whether Logpush is turned on for the Worker.
migrations
unionOptional
Migrations to apply for Durable Objects associated with this Worker.
placement
objectOptional
tags
list of stringsOptional
Tags to help you manage your Workers
tail_consumers
list of objectsOptional
List of Workers that will consume logs from the attached Worker.
usage_model
stringOptional
Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').
PATCH
1curl -X PATCH https://api.cloudflare.com/client/v4/accounts/:account_identifier/workers/scripts/:script_name/settings \
2 -H "X-Auth-Key: string" \
3 -H "X-Auth-User-Service-Key: string" \
4 -H "Authorization: Bearer <token>" \
5 -H "Content-Type: application/json" \
6 -d '{
7 "settings": {}
8}'
200Updated
1{
2 "bindings": [
3 {
4 "type": "kv_namespace",
5 "name": "string",
6 "namespace_id": "string"
7 }
8 ],
9 "compatibility_date": "string",
10 "compatibility_flags": [
11 "string"
12 ],
13 "logpush": true,
14 "migrations": {
15 "new_tag": "string",
16 "old_tag": "string",
17 "deleted_classes": [
18 "string"
19 ],
20 "new_classes": [
21 "string"
22 ],
23 "renamed_classes": [
24 {
25 "from": "string",
26 "to": "string"
27 }
28 ],
29 "transferred_classes": [
30 {
31 "from": "string",
32 "from_script": "string",
33 "to": "string"
34 }
35 ]
36 },
37 "placement": {
38 "mode": "smart"
39 },
40 "tags": [
41 "string"
42 ],
43 "tail_consumers": [
44 {
45 "service": "string",
46 "environment": "string",
47 "namespace": "string"
48 }
49 ],
50 "usage_model": "string"
51}