Beta
BetaWorkers
List Workers
Get Worker
Create Worker
Update Worker
Edit Worker
Delete Worker
ModelsExpand Collapse
type Worker struct{…}
Observability WorkerObservabilityObservability settings for the Worker.
Observability settings for the Worker.
The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%).
Logs WorkerObservabilityLogsoptionalLog settings for the Worker.
Log settings for the Worker.
Whether invocation logs are enabled for the Worker.
References WorkerReferencesOther resources that reference the Worker and depend on it existing.
Other resources that reference the Worker and depend on it existing.
DispatchNamespaceOutbounds []WorkerReferencesDispatchNamespaceOutboundOther 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.
DurableObjects []WorkerReferencesDurableObjectOther Workers that reference Durable Object classes implemented by the Worker.
Other Workers that reference Durable Object classes implemented by the Worker.
Workers []WorkerReferencesWorkerOther Workers that reference the Worker using service bindings.
Other Workers that reference the Worker using service bindings.
Subdomain WorkerSubdomainSubdomain 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
type Version struct{…}
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 VersionAssetsoptionalConfiguration 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 VersionAssetsConfigoptionalConfiguration for assets within a Worker.
Configuration for assets within a Worker.
HTMLHandling VersionAssetsConfigHTMLHandlingoptionalDetermines the redirects and rewrites of requests for HTML content.
Determines the redirects and rewrites of requests for HTML content.
NotFoundHandling VersionAssetsConfigNotFoundHandlingoptionalDetermines 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.
RunWorkerFirst VersionAssetsConfigRunWorkerFirstUnionoptionalContains 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.
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 []VersionBindingoptionalList 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.
type VersionBindingsWorkersBindingKindAISearch struct{…}
type VersionBindingsWorkersBindingKindAISearchNamespace struct{…}
type VersionBindingsWorkersBindingKindDispatchNamespace struct{…}
The kind of resource that the binding provides.
type VersionBindingsWorkersBindingKindDurableObjectNamespace struct{…}
type VersionBindingsWorkersBindingKindInherit struct{…}
type VersionBindingsWorkersBindingKindRatelimit struct{…}
type VersionBindingsWorkersBindingKindR2Bucket struct{…}
Jurisdiction VersionBindingsWorkersBindingKindR2BucketJurisdictionoptionalThe jurisdiction of the R2 bucket.
The jurisdiction of the R2 bucket.
type VersionBindingsWorkersBindingKindSecretKey struct{…}
Algorithm-specific key parameters. Learn more.
Format VersionBindingsWorkersBindingKindSecretKeyFormatData format of the key. Learn more.
Data format of the key. Learn more.
Usages []VersionBindingsWorkersBindingKindSecretKeyUsageAllowed 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".
type VersionBindingsWorkersBindingKindWorkflow struct{…}
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 VersionMigrationsoptionalMigrations 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.
type SingleStepMigration struct{…}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.
type VersionMigrationsWorkersMultipleStepMigrations struct{…}
Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected.
Modules []VersionModuleoptionalCode, 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 VersionPlacementoptionalConfiguration 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.
type VersionPlacementMode struct{…}
Enables Smart Placement.
Time in milliseconds spent on Worker startup.