Beta
BetaWorkers
List Workers
Get Worker
Create Worker
Update Worker
Edit Worker
Delete Worker
ModelsExpand Collapse
class Worker: …
observability: ObservabilityObservability 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[ObservabilityLogs]Log settings for the Worker.
Log settings for the Worker.
Whether invocation logs are enabled for the Worker.
references: ReferencesOther resources that reference the Worker and depend on it existing.
Other resources that reference the Worker and depend on it existing.
dispatch_namespace_outbounds: List[ReferencesDispatchNamespaceOutbound]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: List[ReferencesDurableObject]Other Workers that reference Durable Object classes implemented by the Worker.
Other Workers that reference Durable Object classes implemented by the Worker.
workers: List[ReferencesWorker]Other Workers that reference the Worker using service bindings.
Other Workers that reference the Worker using service bindings.
subdomain: SubdomainSubdomain settings for the Worker.
Subdomain settings for the Worker.
Whether preview URLs are enabled for the Worker.
BetaWorkersVersions
List Versions
Get Version
Create Version
Delete Version
ModelsExpand Collapse
class Version: …
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.
assets: Optional[Assets]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[AssetsConfig]Configuration for assets within a Worker.
Configuration for assets within a Worker.
html_handling: Optional[Literal["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: Optional[Literal["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: Optional[Union[List[str], bool, null]]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.
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[List[Binding]]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.
class BindingWorkersBindingKindAISearch: …
class BindingWorkersBindingKindAISearchNamespace: …
class BindingWorkersBindingKindDispatchNamespace: …
class BindingWorkersBindingKindInherit: …
class BindingWorkersBindingKindRatelimit: …
class BindingWorkersBindingKindR2Bucket: …
jurisdiction: Optional[Literal["eu", "fedramp", "fedramp-high"]]The jurisdiction of the R2 bucket.
The jurisdiction of the R2 bucket.
class BindingWorkersBindingKindSecretKey: …
Algorithm-specific key parameters. Learn more.
format: Literal["raw", "pkcs8", "spki", "jwk"]Data format of the key. Learn more.
Data format of the key. Learn more.
usages: List[Literal["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".
class BindingWorkersBindingKindWorkflow: …
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).
migrations: Optional[Migrations]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.
class SingleStepMigration: …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.
class MigrationsWorkersMultipleStepMigrations: …
Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected.
modules: Optional[List[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: Optional[Placement]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.
class PlacementMode: …
Enables Smart Placement.
Time in milliseconds spent on Worker startup.