PATCH /accounts/{account_id}/workers/scripts/{script_name}/script-settings
Patch script-level settings when using Worker Versions. Including but not limited to Logpush and Tail Consumers.
Servers
- https://api.cloudflare.com/client/v4
Path parameters
Name | Type | Required | Description |
---|---|---|---|
script_name |
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 |
---|---|---|---|
tail_consumers[] |
Array | No |
List of Workers that will consume logs from the attached Worker. |
tail_consumers[].namespace |
String | No |
Optional dispatch namespace the script belongs to. |
tail_consumers[].environment |
String | No |
Optional environment if the Worker utilizes one. |
tail_consumers[].service |
String | Yes |
Name of Worker that is to be the consumer. |
logpush |
Boolean | No |
Whether Logpush is turned on for the Worker. |
observability |
Object | No |
Observability settings for the Worker. |
observability.head_sampling_rate |
Number | No |
The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1. |
observability.enabled |
Boolean | Yes |
Whether observability is enabled for the Worker. |
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.