Workers
List Workers
Get Worker
Create Worker
Update Worker
Edit Worker
Delete Worker
ModelsExpand Collapse
Worker { id, created_on, logpush, 8 more }
observability: { enabled, head_sampling_rate, logs, traces } Observability settings for the Worker.
Observability settings for the Worker.
The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%).
logs: optional { 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: { 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 of { namespace_id, namespace_name, worker_id, worker_name } 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 of { namespace_id, namespace_name, worker_id, worker_name } Other Workers that reference Durable Object classes implemented by the Worker.
Other Workers that reference Durable Object classes implemented by the Worker.
queues: array of { queue_consumer_id, queue_id, queue_name } Queues that send messages to the Worker.
Queues that send messages to the Worker.
workers: array of { id, name } Other Workers that reference the Worker using service bindings.
Other Workers that reference the Worker using service bindings.
subdomain: { enabled, previews_enabled } Subdomain settings for the Worker.
Subdomain settings for the Worker.
Whether preview URLs are enabled for the Worker.
WorkersVersions
List Versions
Get Version
Create Version
Delete Version
ModelsExpand Collapse
Version { id, created_on, number, 15 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: optional { "workers/message", "workers/tag", "workers/triggered_by" } Metadata about the version.
Metadata about the version.
assets: optional { 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: optional { html_handling, not_found_handling, run_worker_first } Configuration for assets within a Worker.
Configuration for assets within a Worker.
html_handling: optional "auto-trailing-slash" or "force-trailing-slash" or "drop-trailing-slash" or "none"Determines the redirects and rewrites of requests for HTML content.
Determines the redirects and rewrites of requests for HTML content.
not_found_handling: optional "none" or "404-page" or "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: optional array of string or 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: optional array of { name, type } or { instance_name, name, type, namespace } or { name, namespace, type } or 31 moreList 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.
AISearch { instance_name, name, type, namespace }
AISearchNamespace { name, namespace, type }
DispatchNamespace { name, namespace, type, outbound }
Inherit { name, type, old_name, version_id }
Ratelimit { name, namespace_id, simple, type }
R2Bucket { bucket_name, name, type, jurisdiction }
jurisdiction: optional "eu" or "fedramp" or "fedramp-high"The jurisdiction of the R2 bucket.
The jurisdiction of the R2 bucket.
SecretKey { algorithm, format, name, 4 more }
Algorithm-specific key parameters. Learn more.
format: "raw" or "pkcs8" or "spki" or "jwk"Data format of the key. Learn more.
Data format of the key. Learn more.
usages: array of "encrypt" or "decrypt" or "sign" or 5 moreAllowed operations with the key. Learn more.
Allowed operations with the key. Learn more.
Base64-encoded key data. Required if format is “raw”, “pkcs8”, or “spki”.
Key data in JSON Web Key format. Required if format is “jwk”.
Workflow { 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.
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: optional SingleStepMigration { deleted_classes, new_classes, new_sqlite_classes, 4 more } or { 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 delete Durable Object namespaces from.
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.
Migrations to apply in order.
Migrations to apply in order.
A list of classes to delete Durable Object namespaces from.
A list of classes to create Durable Object namespaces with SQLite from.
modules: optional array of { content_base64, content_type, name } 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: optional { mode } or { region } or { hostname } or 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.