Workers
ModelsExpand Collapse
SingleStepMigration { deleted_classes, new_classes, new_sqlite_classes, 4 more } A single set of migrations to apply.
A single set of migrations to apply.
A list of classes to create Durable Object namespaces with SQLite from.
Tag used to verify against the latest migration tag for this Worker. If they don’t match, the upload is rejected.
WorkersBeta
WorkersBetaWorkers
List Workers
Get Worker
Create Worker
Update Worker
Edit Worker
Delete Worker
ModelsExpand Collapse
Worker { id, created_on, logpush, 8 more }
observability: Observability { enabled, head_sampling_rate, logs, traces } Observability settings for the Worker.
Observability settings for the Worker.
logs?: Logs { destinations, enabled, head_sampling_rate, 2 more } Log settings for the Worker.
Log settings for the Worker.
Whether invocation logs are enabled for the Worker.
references: References { dispatch_namespace_outbounds, domains, durable_objects, 2 more } Other resources that reference the Worker and depend on it existing.
Other resources that reference the Worker and depend on it existing.
dispatch_namespace_outbounds: Array<DispatchNamespaceOutbound>Other Workers that reference the Worker as an outbound for a dispatch namespace.
Other Workers that reference the Worker as an outbound for a dispatch namespace.
durable_objects: Array<DurableObject>Other Workers that reference Durable Object classes implemented by the Worker.
Other Workers that reference Durable Object classes implemented by the Worker.
workers: Array<Worker>Other Workers that reference the Worker using service bindings.
Other Workers that reference the Worker using service bindings.
subdomain: Subdomain { enabled, previews_enabled } Subdomain settings for the Worker.
Subdomain settings for the Worker.
Whether preview URLs are enabled for the Worker.
WorkersBetaWorkersVersions
List Versions
Get Version
Create Version
Delete Version
ModelsExpand Collapse
Version { id, created_on, number, 16 more }
All routable URLs that always point to this version. Does not include alias URLs, since aliases can be updated to point to a different version.
annotations?: Annotations { workers/message, workers/tag, workers/triggered_by } Metadata about the version.
Metadata about the version.
assets?: Assets { config, jwt } Configuration for assets within a Worker.
_headers and
_redirects files should be
included as modules named _headers and _redirects with content type text/plain.
Configuration for assets within a Worker.
_headers and
_redirects files should be
included as modules named _headers and _redirects with content type text/plain.
config?: Config { html_handling, not_found_handling, run_worker_first } Configuration for assets within a Worker.
Configuration for assets within a Worker.
html_handling?: "auto-trailing-slash" | "force-trailing-slash" | "drop-trailing-slash" | "none"Determines the redirects and rewrites of requests for HTML content.
Determines the redirects and rewrites of requests for HTML content.
not_found_handling?: "none" | "404-page" | "single-page-application"Determines the response when a request does not match a static asset, and there is no Worker script.
Determines the response when a request does not match a static asset, and there is no Worker script.
run_worker_first?: Array<string> | booleanContains a list path rules to control routing to either the Worker or assets. Glob (*) and negative (!) rules are supported. Rules must start with either ’/’ or ’!/’. At least one non-negative rule must be provided, and negative rules have higher precedence than non-negative rules.
Contains a list path rules to control routing to either the Worker or assets. Glob (*) and negative (!) rules are supported. Rules must start with either ’/’ or ’!/’. At least one non-negative rule must be provided, and negative rules have higher precedence than non-negative rules.
bindings?: Array<WorkersBindingKindAI { name, type } | WorkersBindingKindAISearch { instance_name, name, type, namespace } | WorkersBindingKindAISearchNamespace { name, namespace, type } | 32 more>List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
WorkersBindingKindAISearch { instance_name, name, type, namespace }
WorkersBindingKindAISearchNamespace { name, namespace, type }
WorkersBindingKindDispatchNamespace { name, namespace, type, outbound }
WorkersBindingKindInherit { name, type, old_name, version_id }
WorkersBindingKindRatelimit { name, namespace_id, simple, type }
WorkersBindingKindR2Bucket { bucket_name, name, type, jurisdiction }
jurisdiction?: "eu" | "fedramp" | "fedramp-high"The jurisdiction of the R2 bucket.
The jurisdiction of the R2 bucket.
WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
Algorithm-specific key parameters. Learn more.
format: "raw" | "pkcs8" | "spki" | "jwk"Data format of the key. Learn more.
Data format of the key. Learn more.
usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>Allowed operations with the key. Learn more.
Allowed operations with the key. Learn more.
Key data in JSON Web Key format. Required if format is “jwk”.
WorkersBindingKindWorkflow { name, type, workflow_name, 2 more }
Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.
Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a compatibility_date.
containers?: Array<Container>List of containers attached to a Worker. Containers can only be attached to Durable Object classes of this Worker script.
List of containers attached to a Worker. Containers can only be attached to Durable Object classes of this Worker script.
The name of the main module in the modules array (e.g. the name of the module that exports a fetch handler).
Durable Object migration tag. Set when the version is deployed. Omitted if the version has not been deployed or the Worker does not use Durable Objects.
migrations?: SingleStepMigration { deleted_classes, new_classes, new_sqlite_classes, 4 more } | WorkersMultipleStepMigrations { new_tag, old_tag, steps } Migrations for Durable Objects associated with the version. Migrations are applied when the version is deployed.
Migrations for Durable Objects associated with the version. Migrations are applied when the version is deployed.
SingleStepMigration { deleted_classes, new_classes, new_sqlite_classes, 4 more } A single set of migrations to apply.
A single set of migrations to apply.
A list of classes to create Durable Object namespaces with SQLite from.
Tag used to verify against the latest migration tag for this Worker. If they don’t match, the upload is rejected.
WorkersMultipleStepMigrations { new_tag, old_tag, steps }
Tag used to verify against the latest migration tag for this Worker. If they don’t match, the upload is rejected.
modules?: Array<Module>Code, sourcemaps, and other content used at runtime.
This includes _headers and
_redirects files used to configure
Static Assets. _headers and _redirects files should be
included as modules named _headers and _redirects with content type text/plain.
Code, sourcemaps, and other content used at runtime.
This includes _headers and
_redirects files used to configure
Static Assets. _headers and _redirects files should be
included as modules named _headers and _redirects with content type text/plain.
placement?: Mode { mode } | Region { region } | Hostname { hostname } | 5 moreConfiguration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.
Configuration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.
Mode { mode }
Enables Smart Placement.
Time in milliseconds spent on Worker startup.
WorkersRoutes
List Routes
Get Route
Create Route
Update Route
Delete Route
ModelsExpand Collapse
RouteListResponse { id, pattern, script }
Pattern to match incoming requests against. Learn more.
RouteGetResponse { id, pattern, script }
Pattern to match incoming requests against. Learn more.
RouteCreateResponse { id, pattern, script }
Pattern to match incoming requests against. Learn more.
RouteUpdateResponse { id, pattern, script }
Pattern to match incoming requests against. Learn more.
WorkersAssets
WorkersAssetsUpload
Upload Assets
WorkersScripts
List Workers
Search Workers
Download Worker
Upload Worker Module
Delete Worker
ModelsExpand Collapse
Script { id, compatibility_date, compatibility_flags, 18 more }
Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.
Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a compatibility_date.
The tag of the Durable Object migration that was most recently applied for this Worker.
named_handlers?: Array<NamedHandler>Named exports, such as Durable Object class implementations and named entrypoints.
Named exports, such as Durable Object class implementations and named entrypoints.
observability?: Observability { enabled, head_sampling_rate, logs, traces } Observability settings for the Worker.
Observability settings for the Worker.
The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.
logs?: Logs | nullLog settings for the Worker.
Log settings for the Worker.
Whether invocation logs are enabled for the Worker.
placement?: UnionMember0 { mode, last_analyzed_at, status } | UnionMember1 { region, last_analyzed_at, status } | UnionMember2 { hostname, last_analyzed_at, status } | 5 moreConfiguration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.
Configuration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.
UnionMember0 { mode, last_analyzed_at, status }
Enables Smart Placement.
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember1 { region, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember2 { hostname, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember3 { host, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember4 { mode, region, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember5 { hostname, mode, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember6 { host, mode, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember7 { mode, target, last_analyzed_at, status }
target: Array<Region { region } | Hostname { hostname } | Host { host } >Array of placement targets (currently limited to single target).
Array of placement targets (currently limited to single target).
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
Deprecatedplacement_mode?: "smart" | "targeted"Configuration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.
Configuration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.
Deprecatedplacement_status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
ScriptSetting { logpush, observability, tags, tail_consumers }
observability?: Observability | nullObservability settings for the Worker.
Observability settings for the Worker.
The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.
logs?: Logs | nullLog settings for the Worker.
Log settings for the Worker.
Whether invocation logs are enabled for the Worker.
ScriptListResponse { id, compatibility_date, compatibility_flags, 19 more }
Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.
Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a compatibility_date.
The tag of the Durable Object migration that was most recently applied for this Worker.
named_handlers?: Array<NamedHandler>Named exports, such as Durable Object class implementations and named entrypoints.
Named exports, such as Durable Object class implementations and named entrypoints.
observability?: Observability { enabled, head_sampling_rate, logs, traces } Observability settings for the Worker.
Observability settings for the Worker.
The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.
logs?: Logs | nullLog settings for the Worker.
Log settings for the Worker.
Whether invocation logs are enabled for the Worker.
placement?: UnionMember0 { mode, last_analyzed_at, status } | UnionMember1 { region, last_analyzed_at, status } | UnionMember2 { hostname, last_analyzed_at, status } | 5 moreConfiguration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.
Configuration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.
UnionMember0 { mode, last_analyzed_at, status }
Enables Smart Placement.
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember1 { region, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember2 { hostname, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember3 { host, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember4 { mode, region, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember5 { hostname, mode, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember6 { host, mode, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember7 { mode, target, last_analyzed_at, status }
target: Array<Region { region } | Hostname { hostname } | Host { host } >Array of placement targets (currently limited to single target).
Array of placement targets (currently limited to single target).
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
routes?: Array<Route> | nullRoutes associated with the Worker.
Routes associated with the Worker.
Pattern to match incoming requests against. Learn more.
ScriptUpdateResponse { startup_time_ms, id, compatibility_date, 20 more }
Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.
Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a compatibility_date.
The tag of the Durable Object migration that was most recently applied for this Worker.
named_handlers?: Array<NamedHandler>Named exports, such as Durable Object class implementations and named entrypoints.
Named exports, such as Durable Object class implementations and named entrypoints.
observability?: Observability { enabled, head_sampling_rate, logs, traces } Observability settings for the Worker.
Observability settings for the Worker.
The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.
logs?: Logs | nullLog settings for the Worker.
Log settings for the Worker.
Whether invocation logs are enabled for the Worker.
placement?: UnionMember0 { mode, last_analyzed_at, status } | UnionMember1 { region, last_analyzed_at, status } | UnionMember2 { hostname, last_analyzed_at, status } | 5 moreConfiguration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.
Configuration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.
UnionMember0 { mode, last_analyzed_at, status }
Enables Smart Placement.
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember1 { region, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember2 { hostname, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember3 { host, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember4 { mode, region, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember5 { hostname, mode, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember6 { host, mode, last_analyzed_at, status }
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
UnionMember7 { mode, target, last_analyzed_at, status }
target: Array<Region { region } | Hostname { hostname } | Host { host } >Array of placement targets (currently limited to single target).
Array of placement targets (currently limited to single target).
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"Status of Smart Placement.
Status of Smart Placement.
WorkersScriptsAssets
WorkersScriptsAssetsUpload
Create Assets Upload Session
WorkersScriptsSubdomain
Get Worker subdomain
Post Worker subdomain
Delete Worker subdomain
ModelsExpand Collapse
WorkersScriptsSchedules
Get Cron Triggers
Update Cron Triggers
WorkersScriptsTail
List Tails
Start Tail
Delete Tail
WorkersScriptsContent
Get script content
Put script content
WorkersScriptsSettings
Get Script Settings
Patch Script Settings
WorkersScriptsDeployments
List Deployments
Create Deployment
Get Deployment
Delete Deployment
ModelsExpand Collapse
WorkersScriptsVersions
List Versions
Get Version Detail
Upload Version
ModelsExpand Collapse
VersionGetResponse { resources, id, metadata, number }
resources: Resources { bindings, script, script_runtime }
bindings?: Array<WorkersBindingKindAI { name, type } | WorkersBindingKindAISearch { instance_name, name, type, namespace } | WorkersBindingKindAISearchNamespace { name, namespace, type } | 32 more>List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
WorkersBindingKindAISearch { instance_name, name, type, namespace }
WorkersBindingKindAISearchNamespace { name, namespace, type }
WorkersBindingKindDispatchNamespace { name, namespace, type, outbound }
WorkersBindingKindInherit { name, type, old_name, version_id }
WorkersBindingKindRatelimit { name, namespace_id, simple, type }
WorkersBindingKindR2Bucket { bucket_name, name, type, jurisdiction }
jurisdiction?: "eu" | "fedramp" | "fedramp-high"The jurisdiction of the R2 bucket.
The jurisdiction of the R2 bucket.
WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
Algorithm-specific key parameters. Learn more.
format: "raw" | "pkcs8" | "spki" | "jwk"Data format of the key. Learn more.
Data format of the key. Learn more.
usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>Allowed operations with the key. Learn more.
Allowed operations with the key. Learn more.
Key data in JSON Web Key format. Required if format is “jwk”.
WorkersBindingKindWorkflow { name, type, workflow_name, 2 more }
script_runtime?: ScriptRuntime { compatibility_date, compatibility_flags, limits, 2 more } Runtime configuration for the Worker.
Runtime configuration for the Worker.
Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.
Flags that enable or disable certain features in the Workers runtime.
VersionCreateResponse { resources, id, metadata, 2 more }
resources: Resources { bindings, script, script_runtime }
bindings?: Array<WorkersBindingKindAI { name, type } | WorkersBindingKindAISearch { instance_name, name, type, namespace } | WorkersBindingKindAISearchNamespace { name, namespace, type } | 32 more>List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
WorkersBindingKindAISearch { instance_name, name, type, namespace }
WorkersBindingKindAISearchNamespace { name, namespace, type }
WorkersBindingKindDispatchNamespace { name, namespace, type, outbound }
WorkersBindingKindInherit { name, type, old_name, version_id }
WorkersBindingKindRatelimit { name, namespace_id, simple, type }
WorkersBindingKindR2Bucket { bucket_name, name, type, jurisdiction }
jurisdiction?: "eu" | "fedramp" | "fedramp-high"The jurisdiction of the R2 bucket.
The jurisdiction of the R2 bucket.
WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
Algorithm-specific key parameters. Learn more.
format: "raw" | "pkcs8" | "spki" | "jwk"Data format of the key. Learn more.
Data format of the key. Learn more.
usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>Allowed operations with the key. Learn more.
Allowed operations with the key. Learn more.
Key data in JSON Web Key format. Required if format is “jwk”.
WorkersBindingKindWorkflow { name, type, workflow_name, 2 more }
script_runtime?: ScriptRuntime { compatibility_date, compatibility_flags, limits, 2 more } Runtime configuration for the Worker.
Runtime configuration for the Worker.
Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.
Flags that enable or disable certain features in the Workers runtime.
Time in milliseconds spent on Worker startup.
WorkersScriptsSecrets
List script secrets
Get secret binding
Add script secret
Delete script secret
ModelsExpand Collapse
SecretListResponse = WorkersBindingKindSecretText { name, text, type } | WorkersBindingKindSecretKey { algorithm, format, name, 4 more } A secret value accessible through a binding.
A secret value accessible through a binding.
WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
Algorithm-specific key parameters. Learn more.
format: "raw" | "pkcs8" | "spki" | "jwk"Data format of the key. Learn more.
Data format of the key. Learn more.
usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>Allowed operations with the key. Learn more.
Allowed operations with the key. Learn more.
Key data in JSON Web Key format. Required if format is “jwk”.
SecretGetResponse = WorkersBindingKindSecretText { name, text, type } | WorkersBindingKindSecretKey { algorithm, format, name, 4 more } A secret value accessible through a binding.
A secret value accessible through a binding.
WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
Algorithm-specific key parameters. Learn more.
format: "raw" | "pkcs8" | "spki" | "jwk"Data format of the key. Learn more.
Data format of the key. Learn more.
usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>Allowed operations with the key. Learn more.
Allowed operations with the key. Learn more.
Key data in JSON Web Key format. Required if format is “jwk”.
SecretUpdateResponse = WorkersBindingKindSecretText { name, text, type } | WorkersBindingKindSecretKey { algorithm, format, name, 4 more } A secret value accessible through a binding.
A secret value accessible through a binding.
WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
Algorithm-specific key parameters. Learn more.
format: "raw" | "pkcs8" | "spki" | "jwk"Data format of the key. Learn more.
Data format of the key. Learn more.
usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>Allowed operations with the key. Learn more.
Allowed operations with the key. Learn more.
Key data in JSON Web Key format. Required if format is “jwk”.
WorkersScriptsScript And Version Settings
Get Settings
Patch Settings
ModelsExpand Collapse
ScriptAndVersionSettingGetResponse { annotations, bindings, compatibility_date, 9 more }
annotations?: Annotations { workers/message, workers/tag, workers/triggered_by } Annotations for the Worker version. Annotations are not inherited across settings updates; omitting this field means the new version will have no annotations.
Annotations for the Worker version. Annotations are not inherited across settings updates; omitting this field means the new version will have no annotations.
bindings?: Array<WorkersBindingKindAI { name, type } | WorkersBindingKindAISearch { instance_name, name, type, namespace } | WorkersBindingKindAISearchNamespace { name, namespace, type } | 32 more>List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
WorkersBindingKindAISearch { instance_name, name, type, namespace }
WorkersBindingKindAISearchNamespace { name, namespace, type }
WorkersBindingKindDispatchNamespace { name, namespace, type, outbound }
WorkersBindingKindInherit { name, type, old_name, version_id }
WorkersBindingKindRatelimit { name, namespace_id, simple, type }
WorkersBindingKindR2Bucket { bucket_name, name, type, jurisdiction }
jurisdiction?: "eu" | "fedramp" | "fedramp-high"The jurisdiction of the R2 bucket.
The jurisdiction of the R2 bucket.
WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
Algorithm-specific key parameters. Learn more.
format: "raw" | "pkcs8" | "spki" | "jwk"Data format of the key. Learn more.
Data format of the key. Learn more.
usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>Allowed operations with the key. Learn more.
Allowed operations with the key. Learn more.
Key data in JSON Web Key format. Required if format is “jwk”.
WorkersBindingKindWorkflow { name, type, workflow_name, 2 more }
Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.
Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a compatibility_date.
migrations?: SingleStepMigration { deleted_classes, new_classes, new_sqlite_classes, 4 more } | WorkersMultipleStepMigrations { new_tag, old_tag, steps } Migrations to apply for Durable Objects associated with this Worker.
Migrations to apply for Durable Objects associated with this Worker.
SingleStepMigration { deleted_classes, new_classes, new_sqlite_classes, 4 more } A single set of migrations to apply.
A single set of migrations to apply.
A list of classes to create Durable Object namespaces with SQLite from.
Tag used to verify against the latest migration tag for this Worker. If they don’t match, the upload is rejected.
WorkersMultipleStepMigrations { new_tag, old_tag, steps }
Tag used to verify against the latest migration tag for this Worker. If they don’t match, the upload is rejected.
observability?: Observability { enabled, head_sampling_rate, logs, traces } Observability settings for the Worker.
Observability settings for the Worker.
The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.
logs?: Logs | nullLog settings for the Worker.
Log settings for the Worker.
Whether invocation logs are enabled for the Worker.
placement?: Mode { mode } | Region { region } | Hostname { hostname } | 5 moreConfiguration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.
Configuration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.
Mode { mode }
Enables Smart Placement.
ScriptAndVersionSettingEditResponse { annotations, bindings, compatibility_date, 9 more }
annotations?: Annotations { workers/message, workers/tag, workers/triggered_by } Annotations for the Worker version. Annotations are not inherited across settings updates; omitting this field means the new version will have no annotations.
Annotations for the Worker version. Annotations are not inherited across settings updates; omitting this field means the new version will have no annotations.
bindings?: Array<WorkersBindingKindAI { name, type } | WorkersBindingKindAISearch { instance_name, name, type, namespace } | WorkersBindingKindAISearchNamespace { name, namespace, type } | 32 more>List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.
WorkersBindingKindAISearch { instance_name, name, type, namespace }
WorkersBindingKindAISearchNamespace { name, namespace, type }
WorkersBindingKindDispatchNamespace { name, namespace, type, outbound }
WorkersBindingKindInherit { name, type, old_name, version_id }
WorkersBindingKindRatelimit { name, namespace_id, simple, type }
WorkersBindingKindR2Bucket { bucket_name, name, type, jurisdiction }
jurisdiction?: "eu" | "fedramp" | "fedramp-high"The jurisdiction of the R2 bucket.
The jurisdiction of the R2 bucket.
WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
Algorithm-specific key parameters. Learn more.
format: "raw" | "pkcs8" | "spki" | "jwk"Data format of the key. Learn more.
Data format of the key. Learn more.
usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>Allowed operations with the key. Learn more.
Allowed operations with the key. Learn more.
Key data in JSON Web Key format. Required if format is “jwk”.
WorkersBindingKindWorkflow { name, type, workflow_name, 2 more }
Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.
Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a compatibility_date.
migrations?: SingleStepMigration { deleted_classes, new_classes, new_sqlite_classes, 4 more } | WorkersMultipleStepMigrations { new_tag, old_tag, steps } Migrations to apply for Durable Objects associated with this Worker.
Migrations to apply for Durable Objects associated with this Worker.
SingleStepMigration { deleted_classes, new_classes, new_sqlite_classes, 4 more } A single set of migrations to apply.
A single set of migrations to apply.
A list of classes to create Durable Object namespaces with SQLite from.
Tag used to verify against the latest migration tag for this Worker. If they don’t match, the upload is rejected.
WorkersMultipleStepMigrations { new_tag, old_tag, steps }
Tag used to verify against the latest migration tag for this Worker. If they don’t match, the upload is rejected.
observability?: Observability { enabled, head_sampling_rate, logs, traces } Observability settings for the Worker.
Observability settings for the Worker.
The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.
logs?: Logs | nullLog settings for the Worker.
Log settings for the Worker.
Whether invocation logs are enabled for the Worker.
placement?: Mode { mode } | Region { region } | Hostname { hostname } | 5 moreConfiguration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.
Configuration for Smart Placement. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.
Mode { mode }
Enables Smart Placement.
WorkersAccount Settings
Fetch Worker Account Settings
Create Worker Account Settings
WorkersDomains
List Domains
Get Domain
Attach Domain
Detach Domain
ModelsExpand Collapse
DomainListResponse { id, cert_id, environment, 4 more }
DomainGetResponse { id, cert_id, environment, 4 more }
DomainUpdateResponse { id, cert_id, environment, 4 more }
WorkersSubdomains
Get Subdomain
Create Subdomain
Delete Subdomain
WorkersObservability
WorkersObservabilityTelemetry
List keys
Run a query
List values
ModelsExpand Collapse
TelemetryQueryResponse { run, statistics, agents, 5 more } Complete results of a query run. The populated fields depend on the requested view type (events, calculations, invocations, traces, or agents).
Complete results of a query run. The populated fields depend on the requested view type (events, calculations, invocations, traces, or agents).
run: Run { id, accountId, dry, 8 more } The query run metadata including the query definition, execution status, and timeframe.
The query run metadata including the query definition, execution status, and timeframe.
Number of time-series buckets used for the query. Higher values produce more detailed series data.
query: Query { id, adhoc, created, 6 more } A saved query definition with its parameters, metadata, and ownership information.
A saved query definition with its parameters, metadata, and ownership information.
parameters: Parameters { calculations, datasets, filterCombination, 6 more }
calculations?: Array<Calculation>Create Calculations to compute as part of the query.
Create Calculations to compute as part of the query.
filterCombination?: "and" | "or" | "AND" | "OR"Set a Flag to describe how to combine the filters on the query.
Set a Flag to describe how to combine the filters on the query.
filters?: Array<UnionMember0 { filterCombination, filters, kind } | WorkersObservabilityFilterLeaf { key, operation, type, 2 more } >Configure the Filters to apply to the query. Supports nested groups via kind: ‘group’.
Configure the Filters to apply to the query. Supports nested groups via kind: ‘group’.
WorkersObservabilityFilterLeaf { key, operation, type, 2 more } A filter condition applied to query results. Use the keys and values endpoints to discover available fields and their values before constructing filters.
A filter condition applied to query results. Use the keys and values endpoints to discover available fields and their values before constructing filters.
Filter field name. Use verified keys from previous query results or the keys endpoint. Common keys include $metadata.service, $metadata.origin, $metadata.trigger, $metadata.message, and $metadata.error.
operation: "includes" | "not_includes" | "starts_with" | 25 moreComparison operator. String operators: includes, not_includes, starts_with, regex. Existence: exists, is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq, gt, gte, lt, lte.
Comparison operator. String operators: includes, not_includes, starts_with, regex. Existence: exists, is_null. Set membership: in, not_in (comma-separated values). Numeric: eq, neq, gt, gte, lt, lte.
type: "string" | "number" | "boolean"Data type of the filter field. Must match the actual type of the key being filtered.
Data type of the filter field. Must match the actual type of the key being filtered.
havings?: Array<Having>Configure the Having clauses that filter on calculations in the query result.
Configure the Having clauses that filter on calculations in the query result.
Set a limit on the number of results / records returned by the query
statistics: Statistics { bytes_read, elapsed, rows_read, abr_level } Query performance statistics from the database. Includes execution time, rows scanned, and bytes read. Does not include network latency.
Query performance statistics from the database. Includes execution time, rows scanned, and bytes read. Does not include network latency.
agents?: Array<Agent>Durable Object agent summaries. Present when the query view is ‘agents’. Each entry represents an agent with its event counts and status.
Durable Object agent summaries. Present when the query view is ‘agents’. Each entry represents an agent with its event counts and status.
calculations?: Array<Calculation>Aggregated calculation results. Present when the query view is ‘calculations’. Contains computed metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series data.
Aggregated calculation results. Present when the query view is ‘calculations’. Contains computed metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series data.
compare?: Array<Compare>Comparison calculation results from the previous time period. Present when the compare option is enabled. Same structure as calculations.
Comparison calculation results from the previous time period. Present when the compare option is enabled. Same structure as calculations.
events?: Events { count, events, fields, series } Individual event results. Present when the query view is ‘events’. Contains the matching log lines and their metadata.
Individual event results. Present when the query view is ‘events’. Contains the matching log lines and their metadata.
Total number of events matching the query (may exceed the number returned due to limits).
events?: Array<Event>List of individual telemetry events matching the query.
List of individual telemetry events matching the query.
"$metadata": Metadata { id, account, cloudService, 28 more } Structured metadata extracted from the event. These fields are indexed and available for filtering and aggregation.
Structured metadata extracted from the event. These fields are indexed and available for filtering and aggregation.
source: string | unknownRaw log payload. May be a string or a structured object depending on how the log was emitted.
Raw log payload. May be a string or a structured object depending on how the log was emitted.
Cloudflare Containers event information that enriches your logs for identifying and debugging issues.
"$workers"?: UnionMember0 { eventType, requestId, scriptName, 9 more } | UnionMember1 { cpuTimeMs, eventType, outcome, 13 more } Cloudflare Workers event information that enriches your logs for identifying and debugging issues.
Cloudflare Workers event information that enriches your logs for identifying and debugging issues.
fields?: Array<Field>List of fields discovered in the matched events. Useful for building dynamic UIs.
List of fields discovered in the matched events. Useful for building dynamic UIs.
invocations?: Record<string, Array<Invocation>>Events grouped by invocation (request ID). Present when the query view is ‘invocations’. Each key is a request ID mapping to all events from that invocation.
Events grouped by invocation (request ID). Present when the query view is ‘invocations’. Each key is a request ID mapping to all events from that invocation.
"$metadata": Metadata { id, account, cloudService, 28 more } Structured metadata extracted from the event. These fields are indexed and available for filtering and aggregation.
Structured metadata extracted from the event. These fields are indexed and available for filtering and aggregation.
source: string | unknownRaw log payload. May be a string or a structured object depending on how the log was emitted.
Raw log payload. May be a string or a structured object depending on how the log was emitted.
Cloudflare Containers event information that enriches your logs for identifying and debugging issues.
"$workers"?: UnionMember0 { eventType, requestId, scriptName, 9 more } | UnionMember1 { cpuTimeMs, eventType, outcome, 13 more } Cloudflare Workers event information that enriches your logs for identifying and debugging issues.
Cloudflare Workers event information that enriches your logs for identifying and debugging issues.