PATCH /accounts/{account_id}/workers/workers/{worker_id}
Perform a partial update on a Worker, where omitted properties are left unchanged from their current values.
Servers
- https://api.cloudflare.com/client/v4
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
worker_id |
String | Yes | |
account_id |
String | Yes |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
id |
String | Yes |
Immutable ID of the Worker. |
references |
Object | Yes |
Other resources that reference the Worker and depend on it existing. |
references.domains[] |
Array | Yes |
Custom domains connected to the Worker. |
references.domains[].id |
String | Yes |
ID of the custom domain. |
references.domains[].zone_name |
String | Yes |
Name of the zone. |
references.domains[].hostname |
String | Yes |
Full hostname of the custom domain, including the zone name. |
references.domains[].certificate_id |
String | Yes |
ID of the TLS certificate issued for the custom domain. |
references.domains[].zone_id |
String | Yes |
ID of the zone. |
references.workers[] |
Array | Yes |
Other Workers that reference the Worker using service bindings. |
references.workers[].id |
String | Yes |
ID of the referencing Worker. |
references.workers[].name |
String | Yes |
Name of the referencing Worker. |
references.durable_objects[] |
Array | Yes |
Other Workers that reference Durable Object classes implemented by the Worker. |
references.durable_objects[].worker_id |
String | Yes |
ID of the Worker using the Durable Object implementation. |
references.durable_objects[].namespace_name |
String | Yes |
Name of the Durable Object namespace being used. |
references.durable_objects[].worker_name |
String | Yes |
Name of the Worker using the Durable Object implementation. |
references.durable_objects[].namespace_id |
String | Yes |
ID of the Durable Object namespace being used. |
references.queues[] |
Array | Yes |
Queues that send messages to the Worker. |
references.queues[].queue_name |
String | Yes |
Name of the queue. |
references.queues[].queue_id |
String | Yes |
ID of the queue. |
references.queues[].queue_consumer_id |
String | Yes |
ID of the queue consumer configuration. |
references.dispatch_namespace_outbounds[] |
Array | Yes |
Other Workers that reference the Worker as an outbound for a dispatch namespace. |
references.dispatch_namespace_outbounds[].worker_id |
String | Yes |
ID of the Worker using the dispatch namespace. |
references.dispatch_namespace_outbounds[].namespace_name |
String | Yes |
Name of the dispatch namespace. |
references.dispatch_namespace_outbounds[].worker_name |
String | Yes |
Name of the Worker using the dispatch namespace. |
references.dispatch_namespace_outbounds[].namespace_id |
String | Yes |
ID of the dispatch namespace. |
name |
String | Yes |
Name of the Worker. |
subdomain |
Object | Yes |
Subdomain settings for the Worker. |
subdomain.previews_enabled |
Boolean | No |
Whether preview URLs are enabled for the Worker. |
subdomain.preview_url_suffix |
String | No |
Prepend a version or preview prefix to this host suffix to form the *.workers.dev preview URL the Worker would serve on once previews are enabled, e.g. |
subdomain.url |
String | No |
The address the Worker would serve on once its *.workers.dev subdomain is enabled. Present whenever the account owns a workers.dev subdomain, regardless of whether |
subdomain.enabled |
Boolean | No |
Whether the *.workers.dev subdomain is enabled for the Worker. Default value: false |
tail_consumers[] |
Array | Yes |
Other Workers that should consume logs from the Worker. |
tail_consumers[].name |
String | Yes |
Name of the consumer Worker. |
deployed_on |
String | No |
When the Worker's most recent deployment was created. |
created_on |
String | Yes |
When the Worker was created. |
logpush |
Boolean | Yes |
Whether logpush is enabled for the Worker. Default value: false |
tags[] |
Array | Yes |
Tags associated with the Worker. |
observability |
Object | Yes |
Observability settings for the Worker. |
observability.traces |
Object | No |
Trace settings for the Worker. |
observability.traces.head_sampling_rate |
Number | No |
The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). Default value: 1 |
observability.traces.persist |
Boolean | No |
Whether trace persistence is enabled for the Worker. Default value: true |
observability.traces.destinations[] |
Array | No |
A list of destinations where traces will be exported to. |
observability.traces.enabled |
Boolean | No |
Whether traces are enabled for the Worker. Default value: false |
observability.traces.propagation_policy |
String | No |
Controls how inbound trace context (traceparent/tracestate) headers on incoming requests are handled. "authenticated" honors inbound trace context only when accompanied by a valid trace auth token. "accept" unconditionally accepts inbound trace context. Requires the trace propagation feature to be enabled. Returns null when the trace propagation feature is not enabled for the account. Valid values:
|
observability.head_sampling_rate |
Number | No |
The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%). Default value: 1 |
observability.logs |
Object | No |
Log settings for the Worker. |
observability.logs.head_sampling_rate |
Number | No |
The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). Default value: 1 |
observability.logs.persist |
Boolean | No |
Whether log persistence is enabled for the Worker. Default value: true |
observability.logs.destinations[] |
Array | No |
A list of destinations where logs will be exported to. |
observability.logs.enabled |
Boolean | No |
Whether logs are enabled for the Worker. Default value: false |
observability.logs.invocation_logs |
Boolean | No |
Whether invocation logs are enabled for the Worker. Default value: true |
observability.redact_query_string |
Boolean | No |
Whether query strings are removed from request URLs in logs and traces. Default value: false |
observability.enabled |
Boolean | No |
Whether observability is enabled for the Worker. Default value: false |
updated_on |
String | Yes |
When the Worker was most recently updated. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.