Skip to content
Start here

Workers

ModelsExpand Collapse
MigrationStep { deleted_classes, new_classes, new_sqlite_classes, 2 more }
deleted_classes?: Array<string>

A list of classes to delete Durable Object namespaces from.

new_classes?: Array<string>

A list of classes to create Durable Object namespaces from.

new_sqlite_classes?: Array<string>

A list of classes to create Durable Object namespaces with SQLite from.

renamed_classes?: Array<RenamedClass>

A list of classes with Durable Object namespaces that were renamed.

from?: string
to?: string
transferred_classes?: Array<TransferredClass>

A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker.

from?: string
from_script?: string
to?: string
SingleStepMigration { deleted_classes, new_classes, new_sqlite_classes, 4 more }

A single set of migrations to apply.

deleted_classes?: Array<string>

A list of classes to delete Durable Object namespaces from.

new_classes?: Array<string>

A list of classes to create Durable Object namespaces from.

new_sqlite_classes?: Array<string>

A list of classes to create Durable Object namespaces with SQLite from.

new_tag?: string

Tag to set as the latest migration tag.

old_tag?: string

Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected.

renamed_classes?: Array<RenamedClass>

A list of classes with Durable Object namespaces that were renamed.

from?: string
to?: string
transferred_classes?: Array<TransferredClass>

A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker.

from?: string
from_script?: string
to?: string
WorkerMetadata { body_part, main_module }

JSON-encoded metadata about the uploaded parts and Worker configuration.

body_part?: string

Name of the part in the multipart request that contains the script (e.g. the file adding a listener to the fetch event). Indicates a service worker syntax Worker.

main_module?: string

Name of the part in the multipart request that contains the main module (e.g. the file exporting a fetch handler). Indicates a module syntax Worker.

WorkersBeta

WorkersBetaWorkers

List Workers
client.workers.beta.workers.list(WorkerListParams { account_id, order, order_by, 2 more } params, RequestOptionsoptions?): V4PagePaginationArray<Worker { id, created_on, logpush, 8 more } >
GET/accounts/{account_id}/workers/workers
Get Worker
client.workers.beta.workers.get(stringworkerId, WorkerGetParams { account_id } params, RequestOptionsoptions?): Worker { id, created_on, logpush, 8 more }
GET/accounts/{account_id}/workers/workers/{worker_id}
Create Worker
client.workers.beta.workers.create(WorkerCreateParams { account_id, name, logpush, 4 more } params, RequestOptionsoptions?): Worker { id, created_on, logpush, 8 more }
POST/accounts/{account_id}/workers/workers
Update Worker
client.workers.beta.workers.update(stringworkerId, WorkerUpdateParams { account_id, name, logpush, 4 more } params, RequestOptionsoptions?): Worker { id, created_on, logpush, 8 more }
PUT/accounts/{account_id}/workers/workers/{worker_id}
Edit Worker
client.workers.beta.workers.edit(stringworkerId, WorkerEditParams { account_id, logpush, name, 4 more } params, RequestOptionsoptions?): Worker { id, created_on, logpush, 8 more }
PATCH/accounts/{account_id}/workers/workers/{worker_id}
Delete Worker
client.workers.beta.workers.delete(stringworkerId, WorkerDeleteParams { account_id } params, RequestOptionsoptions?): WorkerDeleteResponse { errors, messages, success }
DELETE/accounts/{account_id}/workers/workers/{worker_id}
ModelsExpand Collapse
Worker { id, created_on, logpush, 8 more }
id: string

Immutable ID of the Worker.

created_on: string

When the Worker was created.

formatdate-time
logpush: boolean

Whether logpush is enabled for the Worker.

name: string

Name of the Worker.

observability: Observability { enabled, head_sampling_rate, logs, traces }

Observability settings for the Worker.

enabled?: boolean

Whether observability is enabled for the Worker.

head_sampling_rate?: number

The sampling rate for observability. From 0 to 1 (1 = 100%, 0.1 = 10%).

logs?: Logs { destinations, enabled, head_sampling_rate, 2 more }

Log settings for the Worker.

destinations?: Array<string>

A list of destinations where logs will be exported to.

enabled?: boolean

Whether logs are enabled for the Worker.

head_sampling_rate?: number

The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%).

invocation_logs?: boolean

Whether invocation logs are enabled for the Worker.

persist?: boolean

Whether log persistence is enabled for the Worker.

traces?: Traces { destinations, enabled, head_sampling_rate, persist }

Trace settings for the Worker.

destinations?: Array<string>

A list of destinations where traces will be exported to.

enabled?: boolean

Whether traces are enabled for the Worker.

head_sampling_rate?: number

The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%).

persist?: boolean

Whether trace persistence is 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.

dispatch_namespace_outbounds: Array<DispatchNamespaceOutbound>

Other Workers that reference the Worker as an outbound for a dispatch namespace.

namespace_id: string

ID of the dispatch namespace.

namespace_name: string

Name of the dispatch namespace.

worker_id: string

ID of the Worker using the dispatch namespace.

worker_name: string

Name of the Worker using the dispatch namespace.

domains: Array<Domain>

Custom domains connected to the Worker.

id: string

ID of the custom domain.

certificate_id: string

ID of the TLS certificate issued for the custom domain.

hostname: string

Full hostname of the custom domain, including the zone name.

zone_id: string

ID of the zone.

zone_name: string

Name of the zone.

durable_objects: Array<DurableObject>

Other Workers that reference Durable Object classes implemented by the Worker.

namespace_id: string

ID of the Durable Object namespace being used.

namespace_name: string

Name of the Durable Object namespace being used.

worker_id: string

ID of the Worker using the Durable Object implementation.

worker_name: string

Name of the Worker using the Durable Object implementation.

queues: Array<Queue>

Queues that send messages to the Worker.

queue_consumer_id: string

ID of the queue consumer configuration.

queue_id: string

ID of the queue.

queue_name: string

Name of the queue.

workers: Array<Worker>

Other Workers that reference the Worker using service bindings.

id: string

ID of the referencing Worker.

name: string

Name of the referencing Worker.

subdomain: Subdomain { enabled, previews_enabled }

Subdomain settings for the Worker.

enabled?: boolean

Whether the *.workers.dev subdomain is enabled for the Worker.

previews_enabled?: boolean

Whether preview URLs are enabled for the Worker.

tags: Array<string>

Tags associated with the Worker.

tail_consumers: Array<TailConsumer>

Other Workers that should consume logs from the Worker.

name: string

Name of the consumer Worker.

updated_on: string

When the Worker was most recently updated.

formatdate-time
deployed_on?: string | null

When the Worker's most recent deployment was created. null if the Worker has never been deployed.

formatdate-time
WorkerDeleteResponse { errors, messages, success }
errors: Array<Error>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
messages: Array<Message>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
success: true

Whether the API call was successful.

WorkersBetaWorkersVersions

List Versions
client.workers.beta.workers.versions.list(stringworkerId, VersionListParams { account_id, page, per_page } params, RequestOptionsoptions?): V4PagePaginationArray<Version { id, created_on, number, 14 more } >
GET/accounts/{account_id}/workers/workers/{worker_id}/versions
Get Version
client.workers.beta.workers.versions.get(stringworkerId, stringversionId, VersionGetParams { account_id, include } params, RequestOptionsoptions?): Version { id, created_on, number, 14 more }
GET/accounts/{account_id}/workers/workers/{worker_id}/versions/{version_id}
Create Version
client.workers.beta.workers.versions.create(stringworkerId, VersionCreateParams { account_id, deploy, annotations, 10 more } params, RequestOptionsoptions?): Version { id, created_on, number, 14 more }
POST/accounts/{account_id}/workers/workers/{worker_id}/versions
Delete Version
client.workers.beta.workers.versions.delete(stringworkerId, stringversionId, VersionDeleteParams { account_id } params, RequestOptionsoptions?): VersionDeleteResponse { errors, messages, success }
DELETE/accounts/{account_id}/workers/workers/{worker_id}/versions/{version_id}
ModelsExpand Collapse
Version { id, created_on, number, 14 more }
id: string

Version identifier.

formatuuid
created_on: string

When the version was created.

formatdate-time
number: number

The integer version number, starting from one.

urls: Array<string>

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.

"workers/message"?: string

Human-readable message about the version.

maxLength100
"workers/tag"?: string

User-provided identifier for the version.

maxLength25
"workers/triggered_by"?: string

Operation that triggered the creation of 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.

config?: Config { html_handling, not_found_handling, run_worker_first }

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.

One of the following:
"auto-trailing-slash"
"force-trailing-slash"
"drop-trailing-slash"
"none"
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.

One of the following:
"none"
"404-page"
"single-page-application"
run_worker_first?: Array<string> | boolean

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.

One of the following:
Array<string>
boolean
jwt?: string

Token provided upon successful upload of all files from a registered manifest.

bindings?: Array<WorkersBindingKindAI { name, type } | WorkersBindingKindAISearch { instance_name, name, type, namespace } | WorkersBindingKindAISearchNamespace { name, namespace, type } | 31 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.

One of the following:
WorkersBindingKindAI { name, type }
name: string

A JavaScript variable name for the binding.

type: "ai"

The kind of resource that the binding provides.

WorkersBindingKindAISearch { instance_name, name, type, namespace }
instance_name: string

The user-chosen instance name. Must exist at deploy time. The worker can search, chat, update, and manage items/jobs on this instance.

name: string

A JavaScript variable name for the binding.

type: "ai_search"

The kind of resource that the binding provides.

namespace?: string

The namespace the instance belongs to. Defaults to "default" if omitted. Customers who don't use namespaces can simply omit this field.

WorkersBindingKindAISearchNamespace { name, namespace, type }
name: string

A JavaScript variable name for the binding.

namespace: string

The user-chosen namespace name. Must exist before deploy -- Wrangler handles auto-creation on deploy failure (R2 bucket pattern). The "default" namespace is auto-created by config-api for new accounts. Grants full access (CRUD + search + chat) to all instances within the namespace.

type: "ai_search_namespace"

The kind of resource that the binding provides.

WorkersBindingKindAnalyticsEngine { dataset, name, type }
dataset: string

The name of the dataset to bind to.

name: string

A JavaScript variable name for the binding.

type: "analytics_engine"

The kind of resource that the binding provides.

WorkersBindingKindAssets { name, type }
name: string

A JavaScript variable name for the binding.

type: "assets"

The kind of resource that the binding provides.

WorkersBindingKindBrowser { name, type }
name: string

A JavaScript variable name for the binding.

type: "browser"

The kind of resource that the binding provides.

WorkersBindingKindD1 { id, name, type }
id: string

Identifier of the D1 database to bind to.

name: string

A JavaScript variable name for the binding.

type: "d1"

The kind of resource that the binding provides.

WorkersBindingKindDataBlob { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the data content. Only accepted for service worker syntax Workers.

Deprecatedtype: "data_blob"

The kind of resource that the binding provides.

WorkersBindingKindDispatchNamespace { name, namespace, type, outbound }
name: string

A JavaScript variable name for the binding.

namespace: string

The name of the dispatch namespace.

type: "dispatch_namespace"

The kind of resource that the binding provides.

outbound?: Outbound { params, worker }

Outbound worker.

params?: Array<Param>

Pass information from the Dispatch Worker to the Outbound Worker through the parameters.

name: string

Name of the parameter.

worker?: Worker { entrypoint, environment, service }

Outbound worker.

entrypoint?: string

Entrypoint to invoke on the outbound worker.

environment?: string

Environment of the outbound worker.

service?: string

Name of the outbound worker.

WorkersBindingKindDurableObjectNamespace { name, type, class_name, 4 more }
name: string

A JavaScript variable name for the binding.

type: "durable_object_namespace"

The kind of resource that the binding provides.

class_name?: string

The exported class name of the Durable Object.

dispatch_namespace?: string

The dispatch namespace the Durable Object script belongs to.

environment?: string

The environment of the script_name to bind to.

namespace_id?: string

Namespace identifier tag.

maxLength32
script_name?: string

The script where the Durable Object is defined, if it is external to this Worker.

WorkersBindingKindHyperdrive { id, name, type }
id: string

Identifier of the Hyperdrive connection to bind to.

name: string

A JavaScript variable name for the binding.

type: "hyperdrive"

The kind of resource that the binding provides.

WorkersBindingKindInherit { name, type, old_name, version_id }
name: string

The name of the inherited binding.

type: "inherit"

The kind of resource that the binding provides.

old_name?: string

The old name of the inherited binding. If set, the binding will be renamed from old_name to name in the new version. If not set, the binding will keep the same name between versions.

version_id?: string

Identifier for the version to inherit the binding from, which can be the version ID or the literal "latest" to inherit from the latest version. Defaults to inheriting the binding from the latest version.

WorkersBindingKindImages { name, type }
name: string

A JavaScript variable name for the binding.

type: "images"

The kind of resource that the binding provides.

WorkersBindingKindJson { json, name, type }
json: unknown

JSON data to use.

name: string

A JavaScript variable name for the binding.

type: "json"

The kind of resource that the binding provides.

WorkersBindingKindKVNamespace { name, namespace_id, type }
name: string

A JavaScript variable name for the binding.

namespace_id: string

Namespace identifier tag.

maxLength32
type: "kv_namespace"

The kind of resource that the binding provides.

WorkersBindingKindMedia { name, type }
name: string

A JavaScript variable name for the binding.

type: "media"

The kind of resource that the binding provides.

WorkersBindingKindMTLSCertificate { certificate_id, name, type }
certificate_id: string

Identifier of the certificate to bind to.

name: string

A JavaScript variable name for the binding.

type: "mtls_certificate"

The kind of resource that the binding provides.

WorkersBindingKindPlainText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The text value to use.

type: "plain_text"

The kind of resource that the binding provides.

WorkersBindingKindPipelines { name, pipeline, type }
name: string

A JavaScript variable name for the binding.

pipeline: string

Name of the Pipeline to bind to.

type: "pipelines"

The kind of resource that the binding provides.

WorkersBindingKindQueue { name, queue_name, type }
name: string

A JavaScript variable name for the binding.

queue_name: string

Name of the Queue to bind to.

type: "queue"

The kind of resource that the binding provides.

WorkersBindingKindRatelimit { name, namespace_id, simple, type }
name: string

A JavaScript variable name for the binding.

namespace_id: string

Identifier of the rate limit namespace to bind to.

simple: Simple { limit, period }

The rate limit configuration.

limit: number

The limit (requests per period).

period: number

The period in seconds.

type: "ratelimit"

The kind of resource that the binding provides.

WorkersBindingKindR2Bucket { bucket_name, name, type, jurisdiction }
bucket_name: string

R2 bucket to bind to.

name: string

A JavaScript variable name for the binding.

type: "r2_bucket"

The kind of resource that the binding provides.

jurisdiction?: "eu" | "fedramp" | "fedramp-high"

The jurisdiction of the R2 bucket.

One of the following:
"eu"
"fedramp"
"fedramp-high"
WorkersBindingKindSecretText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The secret value to use.

type: "secret_text"

The kind of resource that the binding provides.

WorkersBindingKindSendEmail { name, type, allowed_destination_addresses, 2 more }
name: string

A JavaScript variable name for the binding.

type: "send_email"

The kind of resource that the binding provides.

allowed_destination_addresses?: Array<string>

List of allowed destination addresses.

allowed_sender_addresses?: Array<string>

List of allowed sender addresses.

destination_address?: string

Destination address for the email.

formatemail
WorkersBindingKindService { name, service, type, 2 more }
name: string

A JavaScript variable name for the binding.

service: string

Name of Worker to bind to.

type: "service"

The kind of resource that the binding provides.

entrypoint?: string

Entrypoint to invoke on the target Worker.

environment?: string

Optional environment if the Worker utilizes one.

WorkersBindingKindTextBlob { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the text content. Only accepted for service worker syntax Workers.

Deprecatedtype: "text_blob"

The kind of resource that the binding provides.

WorkersBindingKindVectorize { index_name, name, type }
index_name: string

Name of the Vectorize index to bind to.

name: string

A JavaScript variable name for the binding.

type: "vectorize"

The kind of resource that the binding provides.

WorkersBindingKindVersionMetadata { name, type }
name: string

A JavaScript variable name for the binding.

type: "version_metadata"

The kind of resource that the binding provides.

WorkersBindingKindSecretsStoreSecret { name, secret_name, store_id, type }
name: string

A JavaScript variable name for the binding.

secret_name: string

Name of the secret in the store.

store_id: string

ID of the store containing the secret.

type: "secrets_store_secret"

The kind of resource that the binding provides.

WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
algorithm: unknown

Algorithm-specific key parameters. Learn more.

format: "raw" | "pkcs8" | "spki" | "jwk"

Data format of the key. Learn more.

One of the following:
"raw"
"pkcs8"
"spki"
"jwk"
name: string

A JavaScript variable name for the binding.

type: "secret_key"

The kind of resource that the binding provides.

usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>

Allowed operations with the key. Learn more.

One of the following:
"encrypt"
"decrypt"
"sign"
"verify"
"deriveKey"
"deriveBits"
"wrapKey"
"unwrapKey"
key_base64?: string

Base64-encoded key data. Required if format is "raw", "pkcs8", or "spki".

key_jwk?: unknown

Key data in JSON Web Key format. Required if format is "jwk".

WorkersBindingKindWorkflow { name, type, workflow_name, 2 more }
name: string

A JavaScript variable name for the binding.

type: "workflow"

The kind of resource that the binding provides.

workflow_name: string

Name of the Workflow to bind to.

class_name?: string

Class name of the Workflow. Should only be provided if the Workflow belongs to this script.

script_name?: string

Script name that contains the Workflow. If not provided, defaults to this script name.

WorkersBindingKindWasmModule { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the WebAssembly module content. Only accepted for service worker syntax Workers.

Deprecatedtype: "wasm_module"

The kind of resource that the binding provides.

WorkersBindingKindVPCService { name, service_id, type }
name: string

A JavaScript variable name for the binding.

service_id: string

Identifier of the VPC service to bind to.

type: "vpc_service"

The kind of resource that the binding provides.

WorkersBindingKindVPCNetwork { name, type, network_id, tunnel_id }
name: string

A JavaScript variable name for the binding.

type: "vpc_network"

The kind of resource that the binding provides.

network_id?: string

Identifier of the network to bind to. Only "cf1:network" is currently supported. Mutually exclusive with tunnel_id.

tunnel_id?: string

UUID of the Cloudflare Tunnel to bind to. Mutually exclusive with network_id.

compatibility_date?: string

Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.

compatibility_flags?: Array<string>

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.

limits?: Limits { cpu_ms }

Resource limits enforced at runtime.

cpu_ms: number

CPU time limit in milliseconds.

main_module?: string

The name of the main module in the modules array (e.g. the name of the module that exports a fetch handler).

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.

One of the following:
SingleStepMigration { deleted_classes, new_classes, new_sqlite_classes, 4 more }

A single set of migrations to apply.

deleted_classes?: Array<string>

A list of classes to delete Durable Object namespaces from.

new_classes?: Array<string>

A list of classes to create Durable Object namespaces from.

new_sqlite_classes?: Array<string>

A list of classes to create Durable Object namespaces with SQLite from.

new_tag?: string

Tag to set as the latest migration tag.

old_tag?: string

Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected.

renamed_classes?: Array<RenamedClass>

A list of classes with Durable Object namespaces that were renamed.

from?: string
to?: string
transferred_classes?: Array<TransferredClass>

A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker.

from?: string
from_script?: string
to?: string
WorkersMultipleStepMigrations { new_tag, old_tag, steps }
new_tag?: string

Tag to set as the latest migration tag.

old_tag?: string

Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected.

steps?: Array<MigrationStep { deleted_classes, new_classes, new_sqlite_classes, 2 more } >

Migrations to apply in order.

deleted_classes?: Array<string>

A list of classes to delete Durable Object namespaces from.

new_classes?: Array<string>

A list of classes to create Durable Object namespaces from.

new_sqlite_classes?: Array<string>

A list of classes to create Durable Object namespaces with SQLite from.

renamed_classes?: Array<RenamedClass>

A list of classes with Durable Object namespaces that were renamed.

from?: string
to?: string
transferred_classes?: Array<TransferredClass>

A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker.

from?: string
from_script?: string
to?: string
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.

content_base64: string

The base64-encoded module content.

formatbyte
content_type: string

The content type of the module.

name: string

The name of the module.

placement?: Mode { mode } | Region { region } | Hostname { hostname } | 5 more

Configuration for Smart Placement. Specify mode='smart' for Smart Placement, or one of region/hostname/host.

One of the following:
Mode { mode }
mode: "smart"

Enables Smart Placement.

Region { region }
region: string

Cloud region for targeted placement in format 'provider:region'.

Hostname { hostname }
hostname: string

HTTP hostname for targeted placement.

Host { host }
host: string

TCP host and port for targeted placement.

UnionMember4 { mode, region }
mode: "targeted"

Targeted placement mode.

region: string

Cloud region for targeted placement in format 'provider:region'.

UnionMember5 { hostname, mode }
hostname: string

HTTP hostname for targeted placement.

mode: "targeted"

Targeted placement mode.

UnionMember6 { host, mode }
host: string

TCP host and port for targeted placement.

mode: "targeted"

Targeted placement mode.

UnionMember7 { mode, target }
mode: "targeted"

Targeted placement mode.

target: Array<Region { region } | Hostname { hostname } | Host { host } >

Array of placement targets (currently limited to single target).

One of the following:
Region { region }
region: string

Cloud region in format 'provider:region'.

Hostname { hostname }
hostname: string

HTTP hostname for targeted placement.

Host { host }
host: string

TCP host:port for targeted placement.

source?: string

The client used to create the version.

startup_time_ms?: number

Time in milliseconds spent on Worker startup.

Deprecatedusage_model?: "standard" | "bundled" | "unbound"

Usage model for the version.

One of the following:
"standard"
"bundled"
"unbound"
VersionDeleteResponse { errors, messages, success }
errors: Array<Error>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
messages: Array<Message>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
success: true

Whether the API call was successful.

WorkersRoutes

List Routes
client.workers.routes.list(RouteListParams { zone_id } params, RequestOptionsoptions?): SinglePage<RouteListResponse { id, pattern, script } >
GET/zones/{zone_id}/workers/routes
Get Route
client.workers.routes.get(stringrouteId, RouteGetParams { zone_id } params, RequestOptionsoptions?): RouteGetResponse { id, pattern, script }
GET/zones/{zone_id}/workers/routes/{route_id}
Create Route
client.workers.routes.create(RouteCreateParams { zone_id, pattern, script } params, RequestOptionsoptions?): RouteCreateResponse { id, pattern, script }
POST/zones/{zone_id}/workers/routes
Update Route
client.workers.routes.update(stringrouteId, RouteUpdateParams { zone_id, pattern, script } params, RequestOptionsoptions?): RouteUpdateResponse { id, pattern, script }
PUT/zones/{zone_id}/workers/routes/{route_id}
Delete Route
client.workers.routes.delete(stringrouteId, RouteDeleteParams { zone_id } params, RequestOptionsoptions?): RouteDeleteResponse { id }
DELETE/zones/{zone_id}/workers/routes/{route_id}
ModelsExpand Collapse
RouteListResponse { id, pattern, script }
id: string

Identifier.

maxLength32
pattern: string

Pattern to match incoming requests against. Learn more.

script?: string

Name of the script to run if the route matches.

RouteGetResponse { id, pattern, script }
id: string

Identifier.

maxLength32
pattern: string

Pattern to match incoming requests against. Learn more.

script?: string

Name of the script to run if the route matches.

RouteCreateResponse { id, pattern, script }
id: string

Identifier.

maxLength32
pattern: string

Pattern to match incoming requests against. Learn more.

script?: string

Name of the script to run if the route matches.

RouteUpdateResponse { id, pattern, script }
id: string

Identifier.

maxLength32
pattern: string

Pattern to match incoming requests against. Learn more.

script?: string

Name of the script to run if the route matches.

RouteDeleteResponse { id }
id?: string

Identifier.

maxLength32

WorkersAssets

WorkersAssetsUpload

Upload Assets
client.workers.assets.upload.create(UploadCreateParams { account_id, base64, body } params, RequestOptionsoptions?): UploadCreateResponse { jwt }
POST/accounts/{account_id}/workers/assets/upload
ModelsExpand Collapse
UploadCreateResponse { jwt }
jwt?: string

A "completion" JWT which can be redeemed when creating a Worker version.

WorkersScripts

List Workers
client.workers.scripts.list(ScriptListParams { account_id, tags } params, RequestOptionsoptions?): SinglePage<ScriptListResponse { id, compatibility_date, compatibility_flags, 19 more } >
GET/accounts/{account_id}/workers/scripts
Search Workers
client.workers.scripts.search(ScriptSearchParams { account_id, id, name, 3 more } params, RequestOptionsoptions?): ScriptSearchResponse { id, created_on, modified_on, 4 more }
GET/accounts/{account_id}/workers/scripts-search
Download Worker
client.workers.scripts.get(stringscriptName, ScriptGetParams { account_id } params, RequestOptionsoptions?): ScriptGetResponse
GET/accounts/{account_id}/workers/scripts/{script_name}
Upload Worker Module
client.workers.scripts.update(stringscriptName, ScriptUpdateParams { account_id, metadata, bindings_inherit, files } params, RequestOptionsoptions?): ScriptUpdateResponse { startup_time_ms, id, compatibility_date, 20 more }
PUT/accounts/{account_id}/workers/scripts/{script_name}
Delete Worker
client.workers.scripts.delete(stringscriptName, ScriptDeleteParams { account_id, force } params, RequestOptionsoptions?): ScriptDeleteResponse | null
DELETE/accounts/{account_id}/workers/scripts/{script_name}
ModelsExpand Collapse
Script { id, compatibility_date, compatibility_flags, 18 more }
id?: string

The name used to identify the script.

compatibility_date?: string

Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.

compatibility_flags?: Array<string>

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.

created_on?: string

When the script was created.

formatdate-time
etag?: string

Hashed script content, can be used in a If-None-Match header when updating.

handlers?: Array<string>

The names of handlers exported as part of the default export.

has_assets?: boolean

Whether a Worker contains assets.

has_modules?: boolean

Whether a Worker contains modules.

last_deployed_from?: string

The client most recently used to deploy this Worker.

logpush?: boolean

Whether Logpush is turned on for the Worker.

migration_tag?: string

The tag of the Durable Object migration that was most recently applied for this Worker.

modified_on?: string

When the script was last modified.

formatdate-time
named_handlers?: Array<NamedHandler>

Named exports, such as Durable Object class implementations and named entrypoints.

handlers?: Array<string>

The names of handlers exported as part of the named export.

name?: string

The name of the export.

observability?: Observability { enabled, head_sampling_rate, logs, traces }

Observability settings for the Worker.

enabled: boolean

Whether observability is enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

logs?: Logs | null

Log settings for the Worker.

enabled: boolean

Whether logs are enabled for the Worker.

invocation_logs: boolean

Whether invocation logs are enabled for the Worker.

destinations?: Array<string>

A list of destinations where logs will be exported to.

head_sampling_rate?: number | null

The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether log persistence is enabled for the Worker.

traces?: Traces | null

Trace settings for the Worker.

destinations?: Array<string>

A list of destinations where traces will be exported to.

enabled?: boolean

Whether traces are enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether trace persistence is enabled for the Worker.

placement?: UnionMember0 { mode, last_analyzed_at, status } | UnionMember1 { region, last_analyzed_at, status } | UnionMember2 { hostname, last_analyzed_at, status } | 5 more

Configuration for Smart Placement. Specify mode='smart' for Smart Placement, or one of region/hostname/host.

One of the following:
UnionMember0 { mode, last_analyzed_at, status }
mode: "smart"

Enables Smart Placement.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember1 { region, last_analyzed_at, status }
region: string

Cloud region for targeted placement in format 'provider:region'.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember2 { hostname, last_analyzed_at, status }
hostname: string

HTTP hostname for targeted placement.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember3 { host, last_analyzed_at, status }
host: string

TCP host and port for targeted placement.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember4 { mode, region, last_analyzed_at, status }
mode: "targeted"

Targeted placement mode.

region: string

Cloud region for targeted placement in format 'provider:region'.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember5 { hostname, mode, last_analyzed_at, status }
hostname: string

HTTP hostname for targeted placement.

mode: "targeted"

Targeted placement mode.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember6 { host, mode, last_analyzed_at, status }
host: string

TCP host and port for targeted placement.

mode: "targeted"

Targeted placement mode.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember7 { mode, target, last_analyzed_at, status }
mode: "targeted"

Targeted placement mode.

target: Array<Region { region } | Hostname { hostname } | Host { host } >

Array of placement targets (currently limited to single target).

One of the following:
Region { region }
region: string

Cloud region in format 'provider:region'.

Hostname { hostname }
hostname: string

HTTP hostname for targeted placement.

Host { host }
host: string

TCP host:port for targeted placement.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
Deprecatedplacement_mode?: "smart" | "targeted"

Configuration for Smart Placement. Specify mode='smart' for Smart Placement, or one of region/hostname/host.

One of the following:
"smart"
"targeted"
Deprecatedplacement_status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
tag?: string

The immutable ID of the script.

tags?: Array<string> | null

Tags associated with the Worker.

tail_consumers?: Array<ConsumerScript { service, environment, namespace } > | null

List of Workers that will consume logs from the attached Worker.

service: string

Name of Worker that is to be the consumer.

environment?: string

Optional environment if the Worker utilizes one.

namespace?: string

Optional dispatch namespace the script belongs to.

usage_model?: "standard" | "bundled" | "unbound"

Usage model for the Worker invocations.

One of the following:
"standard"
"bundled"
"unbound"
ScriptSetting { logpush, observability, tags, tail_consumers }
logpush?: boolean

Whether Logpush is turned on for the Worker.

observability?: Observability | null

Observability settings for the Worker.

enabled: boolean

Whether observability is enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

logs?: Logs | null

Log settings for the Worker.

enabled: boolean

Whether logs are enabled for the Worker.

invocation_logs: boolean

Whether invocation logs are enabled for the Worker.

destinations?: Array<string>

A list of destinations where logs will be exported to.

head_sampling_rate?: number | null

The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether log persistence is enabled for the Worker.

traces?: Traces | null

Trace settings for the Worker.

destinations?: Array<string>

A list of destinations where traces will be exported to.

enabled?: boolean

Whether traces are enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether trace persistence is enabled for the Worker.

tags?: Array<string> | null

Tags associated with the Worker.

tail_consumers?: Array<ConsumerScript { service, environment, namespace } > | null

List of Workers that will consume logs from the attached Worker.

service: string

Name of Worker that is to be the consumer.

environment?: string

Optional environment if the Worker utilizes one.

namespace?: string

Optional dispatch namespace the script belongs to.

ScriptListResponse { id, compatibility_date, compatibility_flags, 19 more }
id?: string

The name used to identify the script.

compatibility_date?: string

Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.

compatibility_flags?: Array<string>

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.

created_on?: string

When the script was created.

formatdate-time
etag?: string

Hashed script content, can be used in a If-None-Match header when updating.

handlers?: Array<string>

The names of handlers exported as part of the default export.

has_assets?: boolean

Whether a Worker contains assets.

has_modules?: boolean

Whether a Worker contains modules.

last_deployed_from?: string

The client most recently used to deploy this Worker.

logpush?: boolean

Whether Logpush is turned on for the Worker.

migration_tag?: string

The tag of the Durable Object migration that was most recently applied for this Worker.

modified_on?: string

When the script was last modified.

formatdate-time
named_handlers?: Array<NamedHandler>

Named exports, such as Durable Object class implementations and named entrypoints.

handlers?: Array<string>

The names of handlers exported as part of the named export.

name?: string

The name of the export.

observability?: Observability { enabled, head_sampling_rate, logs, traces }

Observability settings for the Worker.

enabled: boolean

Whether observability is enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

logs?: Logs | null

Log settings for the Worker.

enabled: boolean

Whether logs are enabled for the Worker.

invocation_logs: boolean

Whether invocation logs are enabled for the Worker.

destinations?: Array<string>

A list of destinations where logs will be exported to.

head_sampling_rate?: number | null

The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether log persistence is enabled for the Worker.

traces?: Traces | null

Trace settings for the Worker.

destinations?: Array<string>

A list of destinations where traces will be exported to.

enabled?: boolean

Whether traces are enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether trace persistence is enabled for the Worker.

placement?: UnionMember0 { mode, last_analyzed_at, status } | UnionMember1 { region, last_analyzed_at, status } | UnionMember2 { hostname, last_analyzed_at, status } | 5 more

Configuration for Smart Placement. Specify mode='smart' for Smart Placement, or one of region/hostname/host.

One of the following:
UnionMember0 { mode, last_analyzed_at, status }
mode: "smart"

Enables Smart Placement.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember1 { region, last_analyzed_at, status }
region: string

Cloud region for targeted placement in format 'provider:region'.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember2 { hostname, last_analyzed_at, status }
hostname: string

HTTP hostname for targeted placement.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember3 { host, last_analyzed_at, status }
host: string

TCP host and port for targeted placement.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember4 { mode, region, last_analyzed_at, status }
mode: "targeted"

Targeted placement mode.

region: string

Cloud region for targeted placement in format 'provider:region'.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember5 { hostname, mode, last_analyzed_at, status }
hostname: string

HTTP hostname for targeted placement.

mode: "targeted"

Targeted placement mode.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember6 { host, mode, last_analyzed_at, status }
host: string

TCP host and port for targeted placement.

mode: "targeted"

Targeted placement mode.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember7 { mode, target, last_analyzed_at, status }
mode: "targeted"

Targeted placement mode.

target: Array<Region { region } | Hostname { hostname } | Host { host } >

Array of placement targets (currently limited to single target).

One of the following:
Region { region }
region: string

Cloud region in format 'provider:region'.

Hostname { hostname }
hostname: string

HTTP hostname for targeted placement.

Host { host }
host: string

TCP host:port for targeted placement.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
Deprecatedplacement_mode?: "smart" | "targeted"
One of the following:
"smart"
"targeted"
Deprecatedplacement_status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"
One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
routes?: Array<Route> | null

Routes associated with the Worker.

id: string

Identifier.

maxLength32
pattern: string

Pattern to match incoming requests against. Learn more.

script?: string

Name of the script to run if the route matches.

tag?: string

The immutable ID of the script.

tags?: Array<string> | null

Tags associated with the Worker.

tail_consumers?: Array<ConsumerScript { service, environment, namespace } > | null

List of Workers that will consume logs from the attached Worker.

service: string

Name of Worker that is to be the consumer.

environment?: string

Optional environment if the Worker utilizes one.

namespace?: string

Optional dispatch namespace the script belongs to.

usage_model?: "standard" | "bundled" | "unbound"

Usage model for the Worker invocations.

One of the following:
"standard"
"bundled"
"unbound"
ScriptSearchResponse = Array<ScriptSearchResponseItem>
id: string

Identifier.

maxLength32
created_on: string

When the script was created.

formatdate-time
modified_on: string

When the script was last modified.

formatdate-time
script_name: string

Name of the script, used in URLs and route configuration.

environment_is_default?: boolean

Whether the environment is the default environment.

environment_name?: string

Name of the environment.

service_name?: string

Name of the service.

ScriptGetResponse = string
ScriptUpdateResponse { startup_time_ms, id, compatibility_date, 20 more }
startup_time_ms: number
id?: string

The name used to identify the script.

compatibility_date?: string

Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.

compatibility_flags?: Array<string>

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.

created_on?: string

When the script was created.

formatdate-time
entry_point?: string

The entry point for the script.

etag?: string

Hashed script content, can be used in a If-None-Match header when updating.

handlers?: Array<string>

The names of handlers exported as part of the default export.

has_assets?: boolean

Whether a Worker contains assets.

has_modules?: boolean

Whether a Worker contains modules.

last_deployed_from?: string

The client most recently used to deploy this Worker.

logpush?: boolean

Whether Logpush is turned on for the Worker.

migration_tag?: string

The tag of the Durable Object migration that was most recently applied for this Worker.

modified_on?: string

When the script was last modified.

formatdate-time
named_handlers?: Array<NamedHandler>

Named exports, such as Durable Object class implementations and named entrypoints.

handlers?: Array<string>

The names of handlers exported as part of the named export.

name?: string

The name of the export.

observability?: Observability { enabled, head_sampling_rate, logs, traces }

Observability settings for the Worker.

enabled: boolean

Whether observability is enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

logs?: Logs | null

Log settings for the Worker.

enabled: boolean

Whether logs are enabled for the Worker.

invocation_logs: boolean

Whether invocation logs are enabled for the Worker.

destinations?: Array<string>

A list of destinations where logs will be exported to.

head_sampling_rate?: number | null

The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether log persistence is enabled for the Worker.

traces?: Traces | null

Trace settings for the Worker.

destinations?: Array<string>

A list of destinations where traces will be exported to.

enabled?: boolean

Whether traces are enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether trace persistence is enabled for the Worker.

placement?: UnionMember0 { mode, last_analyzed_at, status } | UnionMember1 { region, last_analyzed_at, status } | UnionMember2 { hostname, last_analyzed_at, status } | 5 more

Configuration for Smart Placement. Specify mode='smart' for Smart Placement, or one of region/hostname/host.

One of the following:
UnionMember0 { mode, last_analyzed_at, status }
mode: "smart"

Enables Smart Placement.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember1 { region, last_analyzed_at, status }
region: string

Cloud region for targeted placement in format 'provider:region'.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember2 { hostname, last_analyzed_at, status }
hostname: string

HTTP hostname for targeted placement.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember3 { host, last_analyzed_at, status }
host: string

TCP host and port for targeted placement.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember4 { mode, region, last_analyzed_at, status }
mode: "targeted"

Targeted placement mode.

region: string

Cloud region for targeted placement in format 'provider:region'.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember5 { hostname, mode, last_analyzed_at, status }
hostname: string

HTTP hostname for targeted placement.

mode: "targeted"

Targeted placement mode.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember6 { host, mode, last_analyzed_at, status }
host: string

TCP host and port for targeted placement.

mode: "targeted"

Targeted placement mode.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
UnionMember7 { mode, target, last_analyzed_at, status }
mode: "targeted"

Targeted placement mode.

target: Array<Region { region } | Hostname { hostname } | Host { host } >

Array of placement targets (currently limited to single target).

One of the following:
Region { region }
region: string

Cloud region in format 'provider:region'.

Hostname { hostname }
hostname: string

HTTP hostname for targeted placement.

Host { host }
host: string

TCP host:port for targeted placement.

last_analyzed_at?: string

The last time the script was analyzed for Smart Placement.

formatdate-time
status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"

Status of Smart Placement.

One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
Deprecatedplacement_mode?: "smart" | "targeted"
One of the following:
"smart"
"targeted"
Deprecatedplacement_status?: "SUCCESS" | "UNSUPPORTED_APPLICATION" | "INSUFFICIENT_INVOCATIONS"
One of the following:
"SUCCESS"
"UNSUPPORTED_APPLICATION"
"INSUFFICIENT_INVOCATIONS"
tag?: string

The immutable ID of the script.

tags?: Array<string> | null

Tags associated with the Worker.

tail_consumers?: Array<ConsumerScript { service, environment, namespace } > | null

List of Workers that will consume logs from the attached Worker.

service: string

Name of Worker that is to be the consumer.

environment?: string

Optional environment if the Worker utilizes one.

namespace?: string

Optional dispatch namespace the script belongs to.

usage_model?: "standard" | "bundled" | "unbound"

Usage model for the Worker invocations.

One of the following:
"standard"
"bundled"
"unbound"
ScriptDeleteResponse = unknown

WorkersScriptsAssets

WorkersScriptsAssetsUpload

Create Assets Upload Session
client.workers.scripts.assets.upload.create(stringscriptName, UploadCreateParams { account_id, manifest } params, RequestOptionsoptions?): UploadCreateResponse { buckets, jwt }
POST/accounts/{account_id}/workers/scripts/{script_name}/assets-upload-session
ModelsExpand Collapse
UploadCreateResponse { buckets, jwt }
buckets?: Array<Array<string>>

The requests to make to upload assets.

jwt?: string

A JWT to use as authentication for uploading assets.

WorkersScriptsSubdomain

Get Worker subdomain
client.workers.scripts.subdomain.get(stringscriptName, SubdomainGetParams { account_id } params, RequestOptionsoptions?): SubdomainGetResponse { enabled, previews_enabled }
GET/accounts/{account_id}/workers/scripts/{script_name}/subdomain
Post Worker subdomain
client.workers.scripts.subdomain.create(stringscriptName, SubdomainCreateParams { account_id, enabled, previews_enabled } params, RequestOptionsoptions?): SubdomainCreateResponse { enabled, previews_enabled }
POST/accounts/{account_id}/workers/scripts/{script_name}/subdomain
Delete Worker subdomain
client.workers.scripts.subdomain.delete(stringscriptName, SubdomainDeleteParams { account_id } params, RequestOptionsoptions?): SubdomainDeleteResponse { enabled, previews_enabled }
DELETE/accounts/{account_id}/workers/scripts/{script_name}/subdomain
ModelsExpand Collapse
SubdomainGetResponse { enabled, previews_enabled }
enabled: boolean

Whether the Worker is available on the workers.dev subdomain.

previews_enabled: boolean

Whether the Worker's Preview URLs are available on the workers.dev subdomain.

SubdomainCreateResponse { enabled, previews_enabled }
enabled: boolean

Whether the Worker is available on the workers.dev subdomain.

previews_enabled: boolean

Whether the Worker's Preview URLs are available on the workers.dev subdomain.

SubdomainDeleteResponse { enabled, previews_enabled }
enabled: boolean

Whether the Worker is available on the workers.dev subdomain.

previews_enabled: boolean

Whether the Worker's Preview URLs are available on the workers.dev subdomain.

WorkersScriptsSchedules

Get Cron Triggers
client.workers.scripts.schedules.get(stringscriptName, ScheduleGetParams { account_id } params, RequestOptionsoptions?): ScheduleGetResponse { schedules }
GET/accounts/{account_id}/workers/scripts/{script_name}/schedules
Update Cron Triggers
client.workers.scripts.schedules.update(stringscriptName, ScheduleUpdateParams { account_id, body } params, RequestOptionsoptions?): ScheduleUpdateResponse { schedules }
PUT/accounts/{account_id}/workers/scripts/{script_name}/schedules
ModelsExpand Collapse
ScheduleGetResponse { schedules }
schedules: Array<Schedule>
cron: string
created_on?: string
modified_on?: string
ScheduleUpdateResponse { schedules }
schedules: Array<Schedule>
cron: string
created_on?: string
modified_on?: string

WorkersScriptsTail

List Tails
client.workers.scripts.tail.get(stringscriptName, TailGetParams { account_id } params, RequestOptionsoptions?): TailGetResponse { id, expires_at, url }
GET/accounts/{account_id}/workers/scripts/{script_name}/tails
Start Tail
client.workers.scripts.tail.create(stringscriptName, TailCreateParams { account_id, body } params, RequestOptionsoptions?): TailCreateResponse { id, expires_at, url }
POST/accounts/{account_id}/workers/scripts/{script_name}/tails
Delete Tail
client.workers.scripts.tail.delete(stringscriptName, stringid, TailDeleteParams { account_id } params, RequestOptionsoptions?): TailDeleteResponse { errors, messages, success }
DELETE/accounts/{account_id}/workers/scripts/{script_name}/tails/{id}
ModelsExpand Collapse
ConsumerScript { service, environment, namespace }

A reference to a script that will consume logs from the attached Worker.

service: string

Name of Worker that is to be the consumer.

environment?: string

Optional environment if the Worker utilizes one.

namespace?: string

Optional dispatch namespace the script belongs to.

TailGetResponse { id, expires_at, url }
id: string

Identifier.

maxLength32
expires_at: string
url: string
TailCreateResponse { id, expires_at, url }
id: string

Identifier.

maxLength32
expires_at: string
url: string
TailDeleteResponse { errors, messages, success }
errors: Array<Error>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
messages: Array<Message>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
success: true

Whether the API call was successful.

WorkersScriptsContent

Get script content
client.workers.scripts.content.get(stringscriptName, ContentGetParams { account_id } params, RequestOptionsoptions?): Response
GET/accounts/{account_id}/workers/scripts/{script_name}/content/v2
Put script content
client.workers.scripts.content.update(stringscriptName, ContentUpdateParams { account_id, metadata, files, 2 more } params, RequestOptionsoptions?): Script { id, compatibility_date, compatibility_flags, 18 more }
PUT/accounts/{account_id}/workers/scripts/{script_name}/content

WorkersScriptsSettings

Get Script Settings
client.workers.scripts.settings.get(stringscriptName, SettingGetParams { account_id } params, RequestOptionsoptions?): ScriptSetting { logpush, observability, tags, tail_consumers }
GET/accounts/{account_id}/workers/scripts/{script_name}/script-settings
Patch Script Settings
client.workers.scripts.settings.edit(stringscriptName, SettingEditParams { account_id, logpush, observability, 2 more } params, RequestOptionsoptions?): ScriptSetting { logpush, observability, tags, tail_consumers }
PATCH/accounts/{account_id}/workers/scripts/{script_name}/script-settings

WorkersScriptsDeployments

List Deployments
client.workers.scripts.deployments.list(stringscriptName, DeploymentListParams { account_id } params, RequestOptionsoptions?): DeploymentListResponse { deployments }
GET/accounts/{account_id}/workers/scripts/{script_name}/deployments
Create Deployment
client.workers.scripts.deployments.create(stringscriptName, DeploymentCreateParams { account_id, strategy, versions, 2 more } params, RequestOptionsoptions?): Deployment { id, created_on, source, 4 more }
POST/accounts/{account_id}/workers/scripts/{script_name}/deployments
Get Deployment
client.workers.scripts.deployments.get(stringscriptName, stringdeploymentId, DeploymentGetParams { account_id } params, RequestOptionsoptions?): Deployment { id, created_on, source, 4 more }
GET/accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}
Delete Deployment
client.workers.scripts.deployments.delete(stringscriptName, stringdeploymentId, DeploymentDeleteParams { account_id } params, RequestOptionsoptions?): DeploymentDeleteResponse { errors, messages, success }
DELETE/accounts/{account_id}/workers/scripts/{script_name}/deployments/{deployment_id}
ModelsExpand Collapse
Deployment { id, created_on, source, 4 more }
id: string
formatuuid
created_on: string
formatdate-time
source: string
strategy: "percentage"
versions: Array<Version>
percentage: number
maximum100
minimum0.01
version_id: string
formatuuid
annotations?: Annotations { workers/message, workers/triggered_by }
"workers/message"?: string

Human-readable message about the deployment. Truncated to 100 bytes.

maxLength100
"workers/triggered_by"?: string

Operation that triggered the creation of the deployment.

author_email?: string
formatemail
DeploymentListResponse { deployments }
deployments: Array<Deployment { id, created_on, source, 4 more } >
id: string
formatuuid
created_on: string
formatdate-time
source: string
strategy: "percentage"
versions: Array<Version>
percentage: number
maximum100
minimum0.01
version_id: string
formatuuid
annotations?: Annotations { workers/message, workers/triggered_by }
"workers/message"?: string

Human-readable message about the deployment. Truncated to 100 bytes.

maxLength100
"workers/triggered_by"?: string

Operation that triggered the creation of the deployment.

author_email?: string
formatemail
DeploymentDeleteResponse { errors, messages, success }
errors: Array<Error>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
messages: Array<Message>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
success: true

Whether the API call was successful.

WorkersScriptsVersions

List Versions
client.workers.scripts.versions.list(stringscriptName, VersionListParams { account_id, deployable, page, per_page } params, RequestOptionsoptions?): V4PagePagination<VersionListResponse { id, metadata, number } >
GET/accounts/{account_id}/workers/scripts/{script_name}/versions
Get Version Detail
client.workers.scripts.versions.get(stringscriptName, stringversionId, VersionGetParams { account_id } params, RequestOptionsoptions?): VersionGetResponse { resources, id, metadata, number }
GET/accounts/{account_id}/workers/scripts/{script_name}/versions/{version_id}
Upload Version
client.workers.scripts.versions.create(stringscriptName, VersionCreateParams { account_id, metadata, bindings_inherit, files } params, RequestOptionsoptions?): VersionCreateResponse { resources, id, metadata, 2 more }
POST/accounts/{account_id}/workers/scripts/{script_name}/versions
ModelsExpand Collapse
VersionListResponse { id, metadata, number }
id?: string

Unique identifier for the version.

metadata?: Metadata { author_email, author_id, created_on, 3 more }
author_email?: string

Email of the user who created the version.

author_id?: string

Identifier of the user who created the version.

created_on?: string

When the version was created.

hasPreview?: boolean

Whether the version can be previewed.

modified_on?: string

When the version was last modified.

source?: "unknown" | "api" | "wrangler" | 7 more

The source of the version upload.

One of the following:
"unknown"
"api"
"wrangler"
"terraform"
"dash"
"dash_template"
"integration"
"quick_editor"
"playground"
"workersci"
number?: number

Sequential version number.

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 } | 31 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.

One of the following:
WorkersBindingKindAI { name, type }
name: string

A JavaScript variable name for the binding.

type: "ai"

The kind of resource that the binding provides.

WorkersBindingKindAISearch { instance_name, name, type, namespace }
instance_name: string

The user-chosen instance name. Must exist at deploy time. The worker can search, chat, update, and manage items/jobs on this instance.

name: string

A JavaScript variable name for the binding.

type: "ai_search"

The kind of resource that the binding provides.

namespace?: string

The namespace the instance belongs to. Defaults to "default" if omitted. Customers who don't use namespaces can simply omit this field.

WorkersBindingKindAISearchNamespace { name, namespace, type }
name: string

A JavaScript variable name for the binding.

namespace: string

The user-chosen namespace name. Must exist before deploy -- Wrangler handles auto-creation on deploy failure (R2 bucket pattern). The "default" namespace is auto-created by config-api for new accounts. Grants full access (CRUD + search + chat) to all instances within the namespace.

type: "ai_search_namespace"

The kind of resource that the binding provides.

WorkersBindingKindAnalyticsEngine { dataset, name, type }
dataset: string

The name of the dataset to bind to.

name: string

A JavaScript variable name for the binding.

type: "analytics_engine"

The kind of resource that the binding provides.

WorkersBindingKindAssets { name, type }
name: string

A JavaScript variable name for the binding.

type: "assets"

The kind of resource that the binding provides.

WorkersBindingKindBrowser { name, type }
name: string

A JavaScript variable name for the binding.

type: "browser"

The kind of resource that the binding provides.

WorkersBindingKindD1 { id, name, type }
id: string

Identifier of the D1 database to bind to.

name: string

A JavaScript variable name for the binding.

type: "d1"

The kind of resource that the binding provides.

WorkersBindingKindDataBlob { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the data content. Only accepted for service worker syntax Workers.

Deprecatedtype: "data_blob"

The kind of resource that the binding provides.

WorkersBindingKindDispatchNamespace { name, namespace, type, outbound }
name: string

A JavaScript variable name for the binding.

namespace: string

The name of the dispatch namespace.

type: "dispatch_namespace"

The kind of resource that the binding provides.

outbound?: Outbound { params, worker }

Outbound worker.

params?: Array<Param>

Pass information from the Dispatch Worker to the Outbound Worker through the parameters.

name: string

Name of the parameter.

worker?: Worker { entrypoint, environment, service }

Outbound worker.

entrypoint?: string

Entrypoint to invoke on the outbound worker.

environment?: string

Environment of the outbound worker.

service?: string

Name of the outbound worker.

WorkersBindingKindDurableObjectNamespace { name, type, class_name, 4 more }
name: string

A JavaScript variable name for the binding.

type: "durable_object_namespace"

The kind of resource that the binding provides.

class_name?: string

The exported class name of the Durable Object.

dispatch_namespace?: string

The dispatch namespace the Durable Object script belongs to.

environment?: string

The environment of the script_name to bind to.

namespace_id?: string

Namespace identifier tag.

maxLength32
script_name?: string

The script where the Durable Object is defined, if it is external to this Worker.

WorkersBindingKindHyperdrive { id, name, type }
id: string

Identifier of the Hyperdrive connection to bind to.

name: string

A JavaScript variable name for the binding.

type: "hyperdrive"

The kind of resource that the binding provides.

WorkersBindingKindInherit { name, type, old_name, version_id }
name: string

The name of the inherited binding.

type: "inherit"

The kind of resource that the binding provides.

old_name?: string

The old name of the inherited binding. If set, the binding will be renamed from old_name to name in the new version. If not set, the binding will keep the same name between versions.

version_id?: string

Identifier for the version to inherit the binding from, which can be the version ID or the literal "latest" to inherit from the latest version. Defaults to inheriting the binding from the latest version.

WorkersBindingKindImages { name, type }
name: string

A JavaScript variable name for the binding.

type: "images"

The kind of resource that the binding provides.

WorkersBindingKindJson { json, name, type }
json: unknown

JSON data to use.

name: string

A JavaScript variable name for the binding.

type: "json"

The kind of resource that the binding provides.

WorkersBindingKindKVNamespace { name, namespace_id, type }
name: string

A JavaScript variable name for the binding.

namespace_id: string

Namespace identifier tag.

maxLength32
type: "kv_namespace"

The kind of resource that the binding provides.

WorkersBindingKindMedia { name, type }
name: string

A JavaScript variable name for the binding.

type: "media"

The kind of resource that the binding provides.

WorkersBindingKindMTLSCertificate { certificate_id, name, type }
certificate_id: string

Identifier of the certificate to bind to.

name: string

A JavaScript variable name for the binding.

type: "mtls_certificate"

The kind of resource that the binding provides.

WorkersBindingKindPlainText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The text value to use.

type: "plain_text"

The kind of resource that the binding provides.

WorkersBindingKindPipelines { name, pipeline, type }
name: string

A JavaScript variable name for the binding.

pipeline: string

Name of the Pipeline to bind to.

type: "pipelines"

The kind of resource that the binding provides.

WorkersBindingKindQueue { name, queue_name, type }
name: string

A JavaScript variable name for the binding.

queue_name: string

Name of the Queue to bind to.

type: "queue"

The kind of resource that the binding provides.

WorkersBindingKindRatelimit { name, namespace_id, simple, type }
name: string

A JavaScript variable name for the binding.

namespace_id: string

Identifier of the rate limit namespace to bind to.

simple: Simple { limit, period }

The rate limit configuration.

limit: number

The limit (requests per period).

period: number

The period in seconds.

type: "ratelimit"

The kind of resource that the binding provides.

WorkersBindingKindR2Bucket { bucket_name, name, type, jurisdiction }
bucket_name: string

R2 bucket to bind to.

name: string

A JavaScript variable name for the binding.

type: "r2_bucket"

The kind of resource that the binding provides.

jurisdiction?: "eu" | "fedramp" | "fedramp-high"

The jurisdiction of the R2 bucket.

One of the following:
"eu"
"fedramp"
"fedramp-high"
WorkersBindingKindSecretText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The secret value to use.

type: "secret_text"

The kind of resource that the binding provides.

WorkersBindingKindSendEmail { name, type, allowed_destination_addresses, 2 more }
name: string

A JavaScript variable name for the binding.

type: "send_email"

The kind of resource that the binding provides.

allowed_destination_addresses?: Array<string>

List of allowed destination addresses.

allowed_sender_addresses?: Array<string>

List of allowed sender addresses.

destination_address?: string

Destination address for the email.

formatemail
WorkersBindingKindService { name, service, type, 2 more }
name: string

A JavaScript variable name for the binding.

service: string

Name of Worker to bind to.

type: "service"

The kind of resource that the binding provides.

entrypoint?: string

Entrypoint to invoke on the target Worker.

environment?: string

Optional environment if the Worker utilizes one.

WorkersBindingKindTextBlob { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the text content. Only accepted for service worker syntax Workers.

Deprecatedtype: "text_blob"

The kind of resource that the binding provides.

WorkersBindingKindVectorize { index_name, name, type }
index_name: string

Name of the Vectorize index to bind to.

name: string

A JavaScript variable name for the binding.

type: "vectorize"

The kind of resource that the binding provides.

WorkersBindingKindVersionMetadata { name, type }
name: string

A JavaScript variable name for the binding.

type: "version_metadata"

The kind of resource that the binding provides.

WorkersBindingKindSecretsStoreSecret { name, secret_name, store_id, type }
name: string

A JavaScript variable name for the binding.

secret_name: string

Name of the secret in the store.

store_id: string

ID of the store containing the secret.

type: "secrets_store_secret"

The kind of resource that the binding provides.

WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
algorithm: unknown

Algorithm-specific key parameters. Learn more.

format: "raw" | "pkcs8" | "spki" | "jwk"

Data format of the key. Learn more.

One of the following:
"raw"
"pkcs8"
"spki"
"jwk"
name: string

A JavaScript variable name for the binding.

type: "secret_key"

The kind of resource that the binding provides.

usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>

Allowed operations with the key. Learn more.

One of the following:
"encrypt"
"decrypt"
"sign"
"verify"
"deriveKey"
"deriveBits"
"wrapKey"
"unwrapKey"
key_base64?: string

Base64-encoded key data. Required if format is "raw", "pkcs8", or "spki".

key_jwk?: unknown

Key data in JSON Web Key format. Required if format is "jwk".

WorkersBindingKindWorkflow { name, type, workflow_name, 2 more }
name: string

A JavaScript variable name for the binding.

type: "workflow"

The kind of resource that the binding provides.

workflow_name: string

Name of the Workflow to bind to.

class_name?: string

Class name of the Workflow. Should only be provided if the Workflow belongs to this script.

script_name?: string

Script name that contains the Workflow. If not provided, defaults to this script name.

WorkersBindingKindWasmModule { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the WebAssembly module content. Only accepted for service worker syntax Workers.

Deprecatedtype: "wasm_module"

The kind of resource that the binding provides.

WorkersBindingKindVPCService { name, service_id, type }
name: string

A JavaScript variable name for the binding.

service_id: string

Identifier of the VPC service to bind to.

type: "vpc_service"

The kind of resource that the binding provides.

WorkersBindingKindVPCNetwork { name, type, network_id, tunnel_id }
name: string

A JavaScript variable name for the binding.

type: "vpc_network"

The kind of resource that the binding provides.

network_id?: string

Identifier of the network to bind to. Only "cf1:network" is currently supported. Mutually exclusive with tunnel_id.

tunnel_id?: string

UUID of the Cloudflare Tunnel to bind to. Mutually exclusive with network_id.

script?: Script { etag, handlers, last_deployed_from, named_handlers }
etag?: string

Hashed script content

handlers?: Array<string>

The names of handlers exported as part of the default export.

last_deployed_from?: string

The client most recently used to deploy this Worker.

named_handlers?: Array<NamedHandler>

Named exports, such as Durable Object class implementations and named entrypoints.

handlers?: Array<string>

The names of handlers exported as part of the named export.

name?: string

The name of the exported class or entrypoint.

script_runtime?: ScriptRuntime { compatibility_date, compatibility_flags, limits, 2 more }

Runtime configuration for the Worker.

compatibility_date?: string

Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.

compatibility_flags?: Array<string>

Flags that enable or disable certain features in the Workers runtime.

limits?: Limits { cpu_ms }

Resource limits for the Worker.

cpu_ms?: number

The amount of CPU time this Worker can use in milliseconds.

migration_tag?: string

The tag of the Durable Object migration that was most recently applied for this Worker.

usage_model?: "bundled" | "unbound" | "standard"

Usage model for the Worker invocations.

One of the following:
"bundled"
"unbound"
"standard"
id?: string

Unique identifier for the version.

metadata?: Metadata { author_email, author_id, created_on, 3 more }
author_email?: string

Email of the user who created the version.

author_id?: string

Identifier of the user who created the version.

created_on?: string

When the version was created.

hasPreview?: boolean

Whether the version can be previewed.

modified_on?: string

When the version was last modified.

source?: "unknown" | "api" | "wrangler" | 7 more

The source of the version upload.

One of the following:
"unknown"
"api"
"wrangler"
"terraform"
"dash"
"dash_template"
"integration"
"quick_editor"
"playground"
"workersci"
number?: number

Sequential version number.

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 } | 31 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.

One of the following:
WorkersBindingKindAI { name, type }
name: string

A JavaScript variable name for the binding.

type: "ai"

The kind of resource that the binding provides.

WorkersBindingKindAISearch { instance_name, name, type, namespace }
instance_name: string

The user-chosen instance name. Must exist at deploy time. The worker can search, chat, update, and manage items/jobs on this instance.

name: string

A JavaScript variable name for the binding.

type: "ai_search"

The kind of resource that the binding provides.

namespace?: string

The namespace the instance belongs to. Defaults to "default" if omitted. Customers who don't use namespaces can simply omit this field.

WorkersBindingKindAISearchNamespace { name, namespace, type }
name: string

A JavaScript variable name for the binding.

namespace: string

The user-chosen namespace name. Must exist before deploy -- Wrangler handles auto-creation on deploy failure (R2 bucket pattern). The "default" namespace is auto-created by config-api for new accounts. Grants full access (CRUD + search + chat) to all instances within the namespace.

type: "ai_search_namespace"

The kind of resource that the binding provides.

WorkersBindingKindAnalyticsEngine { dataset, name, type }
dataset: string

The name of the dataset to bind to.

name: string

A JavaScript variable name for the binding.

type: "analytics_engine"

The kind of resource that the binding provides.

WorkersBindingKindAssets { name, type }
name: string

A JavaScript variable name for the binding.

type: "assets"

The kind of resource that the binding provides.

WorkersBindingKindBrowser { name, type }
name: string

A JavaScript variable name for the binding.

type: "browser"

The kind of resource that the binding provides.

WorkersBindingKindD1 { id, name, type }
id: string

Identifier of the D1 database to bind to.

name: string

A JavaScript variable name for the binding.

type: "d1"

The kind of resource that the binding provides.

WorkersBindingKindDataBlob { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the data content. Only accepted for service worker syntax Workers.

Deprecatedtype: "data_blob"

The kind of resource that the binding provides.

WorkersBindingKindDispatchNamespace { name, namespace, type, outbound }
name: string

A JavaScript variable name for the binding.

namespace: string

The name of the dispatch namespace.

type: "dispatch_namespace"

The kind of resource that the binding provides.

outbound?: Outbound { params, worker }

Outbound worker.

params?: Array<Param>

Pass information from the Dispatch Worker to the Outbound Worker through the parameters.

name: string

Name of the parameter.

worker?: Worker { entrypoint, environment, service }

Outbound worker.

entrypoint?: string

Entrypoint to invoke on the outbound worker.

environment?: string

Environment of the outbound worker.

service?: string

Name of the outbound worker.

WorkersBindingKindDurableObjectNamespace { name, type, class_name, 4 more }
name: string

A JavaScript variable name for the binding.

type: "durable_object_namespace"

The kind of resource that the binding provides.

class_name?: string

The exported class name of the Durable Object.

dispatch_namespace?: string

The dispatch namespace the Durable Object script belongs to.

environment?: string

The environment of the script_name to bind to.

namespace_id?: string

Namespace identifier tag.

maxLength32
script_name?: string

The script where the Durable Object is defined, if it is external to this Worker.

WorkersBindingKindHyperdrive { id, name, type }
id: string

Identifier of the Hyperdrive connection to bind to.

name: string

A JavaScript variable name for the binding.

type: "hyperdrive"

The kind of resource that the binding provides.

WorkersBindingKindInherit { name, type, old_name, version_id }
name: string

The name of the inherited binding.

type: "inherit"

The kind of resource that the binding provides.

old_name?: string

The old name of the inherited binding. If set, the binding will be renamed from old_name to name in the new version. If not set, the binding will keep the same name between versions.

version_id?: string

Identifier for the version to inherit the binding from, which can be the version ID or the literal "latest" to inherit from the latest version. Defaults to inheriting the binding from the latest version.

WorkersBindingKindImages { name, type }
name: string

A JavaScript variable name for the binding.

type: "images"

The kind of resource that the binding provides.

WorkersBindingKindJson { json, name, type }
json: unknown

JSON data to use.

name: string

A JavaScript variable name for the binding.

type: "json"

The kind of resource that the binding provides.

WorkersBindingKindKVNamespace { name, namespace_id, type }
name: string

A JavaScript variable name for the binding.

namespace_id: string

Namespace identifier tag.

maxLength32
type: "kv_namespace"

The kind of resource that the binding provides.

WorkersBindingKindMedia { name, type }
name: string

A JavaScript variable name for the binding.

type: "media"

The kind of resource that the binding provides.

WorkersBindingKindMTLSCertificate { certificate_id, name, type }
certificate_id: string

Identifier of the certificate to bind to.

name: string

A JavaScript variable name for the binding.

type: "mtls_certificate"

The kind of resource that the binding provides.

WorkersBindingKindPlainText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The text value to use.

type: "plain_text"

The kind of resource that the binding provides.

WorkersBindingKindPipelines { name, pipeline, type }
name: string

A JavaScript variable name for the binding.

pipeline: string

Name of the Pipeline to bind to.

type: "pipelines"

The kind of resource that the binding provides.

WorkersBindingKindQueue { name, queue_name, type }
name: string

A JavaScript variable name for the binding.

queue_name: string

Name of the Queue to bind to.

type: "queue"

The kind of resource that the binding provides.

WorkersBindingKindRatelimit { name, namespace_id, simple, type }
name: string

A JavaScript variable name for the binding.

namespace_id: string

Identifier of the rate limit namespace to bind to.

simple: Simple { limit, period }

The rate limit configuration.

limit: number

The limit (requests per period).

period: number

The period in seconds.

type: "ratelimit"

The kind of resource that the binding provides.

WorkersBindingKindR2Bucket { bucket_name, name, type, jurisdiction }
bucket_name: string

R2 bucket to bind to.

name: string

A JavaScript variable name for the binding.

type: "r2_bucket"

The kind of resource that the binding provides.

jurisdiction?: "eu" | "fedramp" | "fedramp-high"

The jurisdiction of the R2 bucket.

One of the following:
"eu"
"fedramp"
"fedramp-high"
WorkersBindingKindSecretText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The secret value to use.

type: "secret_text"

The kind of resource that the binding provides.

WorkersBindingKindSendEmail { name, type, allowed_destination_addresses, 2 more }
name: string

A JavaScript variable name for the binding.

type: "send_email"

The kind of resource that the binding provides.

allowed_destination_addresses?: Array<string>

List of allowed destination addresses.

allowed_sender_addresses?: Array<string>

List of allowed sender addresses.

destination_address?: string

Destination address for the email.

formatemail
WorkersBindingKindService { name, service, type, 2 more }
name: string

A JavaScript variable name for the binding.

service: string

Name of Worker to bind to.

type: "service"

The kind of resource that the binding provides.

entrypoint?: string

Entrypoint to invoke on the target Worker.

environment?: string

Optional environment if the Worker utilizes one.

WorkersBindingKindTextBlob { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the text content. Only accepted for service worker syntax Workers.

Deprecatedtype: "text_blob"

The kind of resource that the binding provides.

WorkersBindingKindVectorize { index_name, name, type }
index_name: string

Name of the Vectorize index to bind to.

name: string

A JavaScript variable name for the binding.

type: "vectorize"

The kind of resource that the binding provides.

WorkersBindingKindVersionMetadata { name, type }
name: string

A JavaScript variable name for the binding.

type: "version_metadata"

The kind of resource that the binding provides.

WorkersBindingKindSecretsStoreSecret { name, secret_name, store_id, type }
name: string

A JavaScript variable name for the binding.

secret_name: string

Name of the secret in the store.

store_id: string

ID of the store containing the secret.

type: "secrets_store_secret"

The kind of resource that the binding provides.

WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
algorithm: unknown

Algorithm-specific key parameters. Learn more.

format: "raw" | "pkcs8" | "spki" | "jwk"

Data format of the key. Learn more.

One of the following:
"raw"
"pkcs8"
"spki"
"jwk"
name: string

A JavaScript variable name for the binding.

type: "secret_key"

The kind of resource that the binding provides.

usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>

Allowed operations with the key. Learn more.

One of the following:
"encrypt"
"decrypt"
"sign"
"verify"
"deriveKey"
"deriveBits"
"wrapKey"
"unwrapKey"
key_base64?: string

Base64-encoded key data. Required if format is "raw", "pkcs8", or "spki".

key_jwk?: unknown

Key data in JSON Web Key format. Required if format is "jwk".

WorkersBindingKindWorkflow { name, type, workflow_name, 2 more }
name: string

A JavaScript variable name for the binding.

type: "workflow"

The kind of resource that the binding provides.

workflow_name: string

Name of the Workflow to bind to.

class_name?: string

Class name of the Workflow. Should only be provided if the Workflow belongs to this script.

script_name?: string

Script name that contains the Workflow. If not provided, defaults to this script name.

WorkersBindingKindWasmModule { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the WebAssembly module content. Only accepted for service worker syntax Workers.

Deprecatedtype: "wasm_module"

The kind of resource that the binding provides.

WorkersBindingKindVPCService { name, service_id, type }
name: string

A JavaScript variable name for the binding.

service_id: string

Identifier of the VPC service to bind to.

type: "vpc_service"

The kind of resource that the binding provides.

WorkersBindingKindVPCNetwork { name, type, network_id, tunnel_id }
name: string

A JavaScript variable name for the binding.

type: "vpc_network"

The kind of resource that the binding provides.

network_id?: string

Identifier of the network to bind to. Only "cf1:network" is currently supported. Mutually exclusive with tunnel_id.

tunnel_id?: string

UUID of the Cloudflare Tunnel to bind to. Mutually exclusive with network_id.

script?: Script { etag, handlers, last_deployed_from, named_handlers }
etag?: string

Hashed script content

handlers?: Array<string>

The names of handlers exported as part of the default export.

last_deployed_from?: string

The client most recently used to deploy this Worker.

named_handlers?: Array<NamedHandler>

Named exports, such as Durable Object class implementations and named entrypoints.

handlers?: Array<string>

The names of handlers exported as part of the named export.

name?: string

The name of the exported class or entrypoint.

script_runtime?: ScriptRuntime { compatibility_date, compatibility_flags, limits, 2 more }

Runtime configuration for the Worker.

compatibility_date?: string

Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.

compatibility_flags?: Array<string>

Flags that enable or disable certain features in the Workers runtime.

limits?: Limits { cpu_ms }

Resource limits for the Worker.

cpu_ms?: number

The amount of CPU time this Worker can use in milliseconds.

migration_tag?: string

The tag of the Durable Object migration that was most recently applied for this Worker.

usage_model?: "bundled" | "unbound" | "standard"

Usage model for the Worker invocations.

One of the following:
"bundled"
"unbound"
"standard"
id?: string

Unique identifier for the version.

metadata?: Metadata { author_email, author_id, created_on, 3 more }
author_email?: string

Email of the user who created the version.

author_id?: string

Identifier of the user who created the version.

created_on?: string

When the version was created.

hasPreview?: boolean

Whether the version can be previewed.

modified_on?: string

When the version was last modified.

source?: "unknown" | "api" | "wrangler" | 7 more

The source of the version upload.

One of the following:
"unknown"
"api"
"wrangler"
"terraform"
"dash"
"dash_template"
"integration"
"quick_editor"
"playground"
"workersci"
number?: number

Sequential version number.

startup_time_ms?: number

Time in milliseconds spent on Worker startup.

WorkersScriptsSecrets

List script secrets
client.workers.scripts.secrets.list(stringscriptName, SecretListParams { account_id } params, RequestOptionsoptions?): SinglePage<SecretListResponse>
GET/accounts/{account_id}/workers/scripts/{script_name}/secrets
Get secret binding
client.workers.scripts.secrets.get(stringscriptName, stringsecretName, SecretGetParams { account_id, url_encoded } params, RequestOptionsoptions?): SecretGetResponse
GET/accounts/{account_id}/workers/scripts/{script_name}/secrets/{secret_name}
Add script secret
client.workers.scripts.secrets.update(stringscriptName, SecretUpdateParamsparams, RequestOptionsoptions?): SecretUpdateResponse
PUT/accounts/{account_id}/workers/scripts/{script_name}/secrets
Delete script secret
client.workers.scripts.secrets.delete(stringscriptName, stringsecretName, SecretDeleteParams { account_id, url_encoded } params, RequestOptionsoptions?): SecretDeleteResponse | null
DELETE/accounts/{account_id}/workers/scripts/{script_name}/secrets/{secret_name}
ModelsExpand Collapse
SecretListResponse = WorkersBindingKindSecretText { name, text, type } | WorkersBindingKindSecretKey { algorithm, format, name, 4 more }

A secret value accessible through a binding.

One of the following:
WorkersBindingKindSecretText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The secret value to use.

type: "secret_text"

The kind of resource that the binding provides.

WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
algorithm: unknown

Algorithm-specific key parameters. Learn more.

format: "raw" | "pkcs8" | "spki" | "jwk"

Data format of the key. Learn more.

One of the following:
"raw"
"pkcs8"
"spki"
"jwk"
name: string

A JavaScript variable name for the binding.

type: "secret_key"

The kind of resource that the binding provides.

usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>

Allowed operations with the key. Learn more.

One of the following:
"encrypt"
"decrypt"
"sign"
"verify"
"deriveKey"
"deriveBits"
"wrapKey"
"unwrapKey"
key_base64?: string

Base64-encoded key data. Required if format is "raw", "pkcs8", or "spki".

key_jwk?: unknown

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.

One of the following:
WorkersBindingKindSecretText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The secret value to use.

type: "secret_text"

The kind of resource that the binding provides.

WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
algorithm: unknown

Algorithm-specific key parameters. Learn more.

format: "raw" | "pkcs8" | "spki" | "jwk"

Data format of the key. Learn more.

One of the following:
"raw"
"pkcs8"
"spki"
"jwk"
name: string

A JavaScript variable name for the binding.

type: "secret_key"

The kind of resource that the binding provides.

usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>

Allowed operations with the key. Learn more.

One of the following:
"encrypt"
"decrypt"
"sign"
"verify"
"deriveKey"
"deriveBits"
"wrapKey"
"unwrapKey"
key_base64?: string

Base64-encoded key data. Required if format is "raw", "pkcs8", or "spki".

key_jwk?: unknown

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.

One of the following:
WorkersBindingKindSecretText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The secret value to use.

type: "secret_text"

The kind of resource that the binding provides.

WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
algorithm: unknown

Algorithm-specific key parameters. Learn more.

format: "raw" | "pkcs8" | "spki" | "jwk"

Data format of the key. Learn more.

One of the following:
"raw"
"pkcs8"
"spki"
"jwk"
name: string

A JavaScript variable name for the binding.

type: "secret_key"

The kind of resource that the binding provides.

usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>

Allowed operations with the key. Learn more.

One of the following:
"encrypt"
"decrypt"
"sign"
"verify"
"deriveKey"
"deriveBits"
"wrapKey"
"unwrapKey"
key_base64?: string

Base64-encoded key data. Required if format is "raw", "pkcs8", or "spki".

key_jwk?: unknown

Key data in JSON Web Key format. Required if format is "jwk".

SecretDeleteResponse = unknown

WorkersScriptsScript And Version Settings

Get Settings
client.workers.scripts.scriptAndVersionSettings.get(stringscriptName, ScriptAndVersionSettingGetParams { account_id } params, RequestOptionsoptions?): ScriptAndVersionSettingGetResponse { annotations, bindings, compatibility_date, 9 more }
GET/accounts/{account_id}/workers/scripts/{script_name}/settings
Patch Settings
client.workers.scripts.scriptAndVersionSettings.edit(stringscriptName, ScriptAndVersionSettingEditParams { account_id, settings } params, RequestOptionsoptions?): ScriptAndVersionSettingEditResponse { annotations, bindings, compatibility_date, 9 more }
PATCH/accounts/{account_id}/workers/scripts/{script_name}/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.

"workers/message"?: string

Human-readable message about the version.

maxLength100
"workers/tag"?: string

User-provided identifier for the version.

maxLength25
"workers/triggered_by"?: string

Operation that triggered the creation of the version. This is read-only and set by the server.

bindings?: Array<WorkersBindingKindAI { name, type } | WorkersBindingKindAISearch { instance_name, name, type, namespace } | WorkersBindingKindAISearchNamespace { name, namespace, type } | 31 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.

One of the following:
WorkersBindingKindAI { name, type }
name: string

A JavaScript variable name for the binding.

type: "ai"

The kind of resource that the binding provides.

WorkersBindingKindAISearch { instance_name, name, type, namespace }
instance_name: string

The user-chosen instance name. Must exist at deploy time. The worker can search, chat, update, and manage items/jobs on this instance.

name: string

A JavaScript variable name for the binding.

type: "ai_search"

The kind of resource that the binding provides.

namespace?: string

The namespace the instance belongs to. Defaults to "default" if omitted. Customers who don't use namespaces can simply omit this field.

WorkersBindingKindAISearchNamespace { name, namespace, type }
name: string

A JavaScript variable name for the binding.

namespace: string

The user-chosen namespace name. Must exist before deploy -- Wrangler handles auto-creation on deploy failure (R2 bucket pattern). The "default" namespace is auto-created by config-api for new accounts. Grants full access (CRUD + search + chat) to all instances within the namespace.

type: "ai_search_namespace"

The kind of resource that the binding provides.

WorkersBindingKindAnalyticsEngine { dataset, name, type }
dataset: string

The name of the dataset to bind to.

name: string

A JavaScript variable name for the binding.

type: "analytics_engine"

The kind of resource that the binding provides.

WorkersBindingKindAssets { name, type }
name: string

A JavaScript variable name for the binding.

type: "assets"

The kind of resource that the binding provides.

WorkersBindingKindBrowser { name, type }
name: string

A JavaScript variable name for the binding.

type: "browser"

The kind of resource that the binding provides.

WorkersBindingKindD1 { id, name, type }
id: string

Identifier of the D1 database to bind to.

name: string

A JavaScript variable name for the binding.

type: "d1"

The kind of resource that the binding provides.

WorkersBindingKindDataBlob { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the data content. Only accepted for service worker syntax Workers.

Deprecatedtype: "data_blob"

The kind of resource that the binding provides.

WorkersBindingKindDispatchNamespace { name, namespace, type, outbound }
name: string

A JavaScript variable name for the binding.

namespace: string

The name of the dispatch namespace.

type: "dispatch_namespace"

The kind of resource that the binding provides.

outbound?: Outbound { params, worker }

Outbound worker.

params?: Array<Param>

Pass information from the Dispatch Worker to the Outbound Worker through the parameters.

name: string

Name of the parameter.

worker?: Worker { entrypoint, environment, service }

Outbound worker.

entrypoint?: string

Entrypoint to invoke on the outbound worker.

environment?: string

Environment of the outbound worker.

service?: string

Name of the outbound worker.

WorkersBindingKindDurableObjectNamespace { name, type, class_name, 4 more }
name: string

A JavaScript variable name for the binding.

type: "durable_object_namespace"

The kind of resource that the binding provides.

class_name?: string

The exported class name of the Durable Object.

dispatch_namespace?: string

The dispatch namespace the Durable Object script belongs to.

environment?: string

The environment of the script_name to bind to.

namespace_id?: string

Namespace identifier tag.

maxLength32
script_name?: string

The script where the Durable Object is defined, if it is external to this Worker.

WorkersBindingKindHyperdrive { id, name, type }
id: string

Identifier of the Hyperdrive connection to bind to.

name: string

A JavaScript variable name for the binding.

type: "hyperdrive"

The kind of resource that the binding provides.

WorkersBindingKindInherit { name, type, old_name, version_id }
name: string

The name of the inherited binding.

type: "inherit"

The kind of resource that the binding provides.

old_name?: string

The old name of the inherited binding. If set, the binding will be renamed from old_name to name in the new version. If not set, the binding will keep the same name between versions.

version_id?: string

Identifier for the version to inherit the binding from, which can be the version ID or the literal "latest" to inherit from the latest version. Defaults to inheriting the binding from the latest version.

WorkersBindingKindImages { name, type }
name: string

A JavaScript variable name for the binding.

type: "images"

The kind of resource that the binding provides.

WorkersBindingKindJson { json, name, type }
json: unknown

JSON data to use.

name: string

A JavaScript variable name for the binding.

type: "json"

The kind of resource that the binding provides.

WorkersBindingKindKVNamespace { name, namespace_id, type }
name: string

A JavaScript variable name for the binding.

namespace_id: string

Namespace identifier tag.

maxLength32
type: "kv_namespace"

The kind of resource that the binding provides.

WorkersBindingKindMedia { name, type }
name: string

A JavaScript variable name for the binding.

type: "media"

The kind of resource that the binding provides.

WorkersBindingKindMTLSCertificate { certificate_id, name, type }
certificate_id: string

Identifier of the certificate to bind to.

name: string

A JavaScript variable name for the binding.

type: "mtls_certificate"

The kind of resource that the binding provides.

WorkersBindingKindPlainText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The text value to use.

type: "plain_text"

The kind of resource that the binding provides.

WorkersBindingKindPipelines { name, pipeline, type }
name: string

A JavaScript variable name for the binding.

pipeline: string

Name of the Pipeline to bind to.

type: "pipelines"

The kind of resource that the binding provides.

WorkersBindingKindQueue { name, queue_name, type }
name: string

A JavaScript variable name for the binding.

queue_name: string

Name of the Queue to bind to.

type: "queue"

The kind of resource that the binding provides.

WorkersBindingKindRatelimit { name, namespace_id, simple, type }
name: string

A JavaScript variable name for the binding.

namespace_id: string

Identifier of the rate limit namespace to bind to.

simple: Simple { limit, period }

The rate limit configuration.

limit: number

The limit (requests per period).

period: number

The period in seconds.

type: "ratelimit"

The kind of resource that the binding provides.

WorkersBindingKindR2Bucket { bucket_name, name, type, jurisdiction }
bucket_name: string

R2 bucket to bind to.

name: string

A JavaScript variable name for the binding.

type: "r2_bucket"

The kind of resource that the binding provides.

jurisdiction?: "eu" | "fedramp" | "fedramp-high"

The jurisdiction of the R2 bucket.

One of the following:
"eu"
"fedramp"
"fedramp-high"
WorkersBindingKindSecretText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The secret value to use.

type: "secret_text"

The kind of resource that the binding provides.

WorkersBindingKindSendEmail { name, type, allowed_destination_addresses, 2 more }
name: string

A JavaScript variable name for the binding.

type: "send_email"

The kind of resource that the binding provides.

allowed_destination_addresses?: Array<string>

List of allowed destination addresses.

allowed_sender_addresses?: Array<string>

List of allowed sender addresses.

destination_address?: string

Destination address for the email.

formatemail
WorkersBindingKindService { name, service, type, 2 more }
name: string

A JavaScript variable name for the binding.

service: string

Name of Worker to bind to.

type: "service"

The kind of resource that the binding provides.

entrypoint?: string

Entrypoint to invoke on the target Worker.

environment?: string

Optional environment if the Worker utilizes one.

WorkersBindingKindTextBlob { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the text content. Only accepted for service worker syntax Workers.

Deprecatedtype: "text_blob"

The kind of resource that the binding provides.

WorkersBindingKindVectorize { index_name, name, type }
index_name: string

Name of the Vectorize index to bind to.

name: string

A JavaScript variable name for the binding.

type: "vectorize"

The kind of resource that the binding provides.

WorkersBindingKindVersionMetadata { name, type }
name: string

A JavaScript variable name for the binding.

type: "version_metadata"

The kind of resource that the binding provides.

WorkersBindingKindSecretsStoreSecret { name, secret_name, store_id, type }
name: string

A JavaScript variable name for the binding.

secret_name: string

Name of the secret in the store.

store_id: string

ID of the store containing the secret.

type: "secrets_store_secret"

The kind of resource that the binding provides.

WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
algorithm: unknown

Algorithm-specific key parameters. Learn more.

format: "raw" | "pkcs8" | "spki" | "jwk"

Data format of the key. Learn more.

One of the following:
"raw"
"pkcs8"
"spki"
"jwk"
name: string

A JavaScript variable name for the binding.

type: "secret_key"

The kind of resource that the binding provides.

usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>

Allowed operations with the key. Learn more.

One of the following:
"encrypt"
"decrypt"
"sign"
"verify"
"deriveKey"
"deriveBits"
"wrapKey"
"unwrapKey"
key_base64?: string

Base64-encoded key data. Required if format is "raw", "pkcs8", or "spki".

key_jwk?: unknown

Key data in JSON Web Key format. Required if format is "jwk".

WorkersBindingKindWorkflow { name, type, workflow_name, 2 more }
name: string

A JavaScript variable name for the binding.

type: "workflow"

The kind of resource that the binding provides.

workflow_name: string

Name of the Workflow to bind to.

class_name?: string

Class name of the Workflow. Should only be provided if the Workflow belongs to this script.

script_name?: string

Script name that contains the Workflow. If not provided, defaults to this script name.

WorkersBindingKindWasmModule { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the WebAssembly module content. Only accepted for service worker syntax Workers.

Deprecatedtype: "wasm_module"

The kind of resource that the binding provides.

WorkersBindingKindVPCService { name, service_id, type }
name: string

A JavaScript variable name for the binding.

service_id: string

Identifier of the VPC service to bind to.

type: "vpc_service"

The kind of resource that the binding provides.

WorkersBindingKindVPCNetwork { name, type, network_id, tunnel_id }
name: string

A JavaScript variable name for the binding.

type: "vpc_network"

The kind of resource that the binding provides.

network_id?: string

Identifier of the network to bind to. Only "cf1:network" is currently supported. Mutually exclusive with tunnel_id.

tunnel_id?: string

UUID of the Cloudflare Tunnel to bind to. Mutually exclusive with network_id.

compatibility_date?: string

Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.

compatibility_flags?: Array<string>

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.

limits?: Limits { cpu_ms }

Limits to apply for this Worker.

cpu_ms?: number

The amount of CPU time this Worker can use in milliseconds.

logpush?: boolean

Whether Logpush is turned on for the Worker.

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.

One of the following:
SingleStepMigration { deleted_classes, new_classes, new_sqlite_classes, 4 more }

A single set of migrations to apply.

deleted_classes?: Array<string>

A list of classes to delete Durable Object namespaces from.

new_classes?: Array<string>

A list of classes to create Durable Object namespaces from.

new_sqlite_classes?: Array<string>

A list of classes to create Durable Object namespaces with SQLite from.

new_tag?: string

Tag to set as the latest migration tag.

old_tag?: string

Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected.

renamed_classes?: Array<RenamedClass>

A list of classes with Durable Object namespaces that were renamed.

from?: string
to?: string
transferred_classes?: Array<TransferredClass>

A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker.

from?: string
from_script?: string
to?: string
WorkersMultipleStepMigrations { new_tag, old_tag, steps }
new_tag?: string

Tag to set as the latest migration tag.

old_tag?: string

Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected.

steps?: Array<MigrationStep { deleted_classes, new_classes, new_sqlite_classes, 2 more } >

Migrations to apply in order.

deleted_classes?: Array<string>

A list of classes to delete Durable Object namespaces from.

new_classes?: Array<string>

A list of classes to create Durable Object namespaces from.

new_sqlite_classes?: Array<string>

A list of classes to create Durable Object namespaces with SQLite from.

renamed_classes?: Array<RenamedClass>

A list of classes with Durable Object namespaces that were renamed.

from?: string
to?: string
transferred_classes?: Array<TransferredClass>

A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker.

from?: string
from_script?: string
to?: string
observability?: Observability { enabled, head_sampling_rate, logs, traces }

Observability settings for the Worker.

enabled: boolean

Whether observability is enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

logs?: Logs | null

Log settings for the Worker.

enabled: boolean

Whether logs are enabled for the Worker.

invocation_logs: boolean

Whether invocation logs are enabled for the Worker.

destinations?: Array<string>

A list of destinations where logs will be exported to.

head_sampling_rate?: number | null

The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether log persistence is enabled for the Worker.

traces?: Traces | null

Trace settings for the Worker.

destinations?: Array<string>

A list of destinations where traces will be exported to.

enabled?: boolean

Whether traces are enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether trace persistence is enabled for the Worker.

placement?: Mode { mode } | Region { region } | Hostname { hostname } | 5 more

Configuration for Smart Placement. Specify mode='smart' for Smart Placement, or one of region/hostname/host.

One of the following:
Mode { mode }
mode: "smart"

Enables Smart Placement.

Region { region }
region: string

Cloud region for targeted placement in format 'provider:region'.

Hostname { hostname }
hostname: string

HTTP hostname for targeted placement.

Host { host }
host: string

TCP host and port for targeted placement.

UnionMember4 { mode, region }
mode: "targeted"

Targeted placement mode.

region: string

Cloud region for targeted placement in format 'provider:region'.

UnionMember5 { hostname, mode }
hostname: string

HTTP hostname for targeted placement.

mode: "targeted"

Targeted placement mode.

UnionMember6 { host, mode }
host: string

TCP host and port for targeted placement.

mode: "targeted"

Targeted placement mode.

UnionMember7 { mode, target }
mode: "targeted"

Targeted placement mode.

target: Array<Region { region } | Hostname { hostname } | Host { host } >

Array of placement targets (currently limited to single target).

One of the following:
Region { region }
region: string

Cloud region in format 'provider:region'.

Hostname { hostname }
hostname: string

HTTP hostname for targeted placement.

Host { host }
host: string

TCP host:port for targeted placement.

tags?: Array<string> | null

Tags associated with the Worker.

tail_consumers?: Array<ConsumerScript { service, environment, namespace } > | null

List of Workers that will consume logs from the attached Worker.

service: string

Name of Worker that is to be the consumer.

environment?: string

Optional environment if the Worker utilizes one.

namespace?: string

Optional dispatch namespace the script belongs to.

usage_model?: "standard" | "bundled" | "unbound"

Usage model for the Worker invocations.

One of the following:
"standard"
"bundled"
"unbound"
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.

"workers/message"?: string

Human-readable message about the version.

maxLength100
"workers/tag"?: string

User-provided identifier for the version.

maxLength25
"workers/triggered_by"?: string

Operation that triggered the creation of the version. This is read-only and set by the server.

bindings?: Array<WorkersBindingKindAI { name, type } | WorkersBindingKindAISearch { instance_name, name, type, namespace } | WorkersBindingKindAISearchNamespace { name, namespace, type } | 31 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.

One of the following:
WorkersBindingKindAI { name, type }
name: string

A JavaScript variable name for the binding.

type: "ai"

The kind of resource that the binding provides.

WorkersBindingKindAISearch { instance_name, name, type, namespace }
instance_name: string

The user-chosen instance name. Must exist at deploy time. The worker can search, chat, update, and manage items/jobs on this instance.

name: string

A JavaScript variable name for the binding.

type: "ai_search"

The kind of resource that the binding provides.

namespace?: string

The namespace the instance belongs to. Defaults to "default" if omitted. Customers who don't use namespaces can simply omit this field.

WorkersBindingKindAISearchNamespace { name, namespace, type }
name: string

A JavaScript variable name for the binding.

namespace: string

The user-chosen namespace name. Must exist before deploy -- Wrangler handles auto-creation on deploy failure (R2 bucket pattern). The "default" namespace is auto-created by config-api for new accounts. Grants full access (CRUD + search + chat) to all instances within the namespace.

type: "ai_search_namespace"

The kind of resource that the binding provides.

WorkersBindingKindAnalyticsEngine { dataset, name, type }
dataset: string

The name of the dataset to bind to.

name: string

A JavaScript variable name for the binding.

type: "analytics_engine"

The kind of resource that the binding provides.

WorkersBindingKindAssets { name, type }
name: string

A JavaScript variable name for the binding.

type: "assets"

The kind of resource that the binding provides.

WorkersBindingKindBrowser { name, type }
name: string

A JavaScript variable name for the binding.

type: "browser"

The kind of resource that the binding provides.

WorkersBindingKindD1 { id, name, type }
id: string

Identifier of the D1 database to bind to.

name: string

A JavaScript variable name for the binding.

type: "d1"

The kind of resource that the binding provides.

WorkersBindingKindDataBlob { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the data content. Only accepted for service worker syntax Workers.

Deprecatedtype: "data_blob"

The kind of resource that the binding provides.

WorkersBindingKindDispatchNamespace { name, namespace, type, outbound }
name: string

A JavaScript variable name for the binding.

namespace: string

The name of the dispatch namespace.

type: "dispatch_namespace"

The kind of resource that the binding provides.

outbound?: Outbound { params, worker }

Outbound worker.

params?: Array<Param>

Pass information from the Dispatch Worker to the Outbound Worker through the parameters.

name: string

Name of the parameter.

worker?: Worker { entrypoint, environment, service }

Outbound worker.

entrypoint?: string

Entrypoint to invoke on the outbound worker.

environment?: string

Environment of the outbound worker.

service?: string

Name of the outbound worker.

WorkersBindingKindDurableObjectNamespace { name, type, class_name, 4 more }
name: string

A JavaScript variable name for the binding.

type: "durable_object_namespace"

The kind of resource that the binding provides.

class_name?: string

The exported class name of the Durable Object.

dispatch_namespace?: string

The dispatch namespace the Durable Object script belongs to.

environment?: string

The environment of the script_name to bind to.

namespace_id?: string

Namespace identifier tag.

maxLength32
script_name?: string

The script where the Durable Object is defined, if it is external to this Worker.

WorkersBindingKindHyperdrive { id, name, type }
id: string

Identifier of the Hyperdrive connection to bind to.

name: string

A JavaScript variable name for the binding.

type: "hyperdrive"

The kind of resource that the binding provides.

WorkersBindingKindInherit { name, type, old_name, version_id }
name: string

The name of the inherited binding.

type: "inherit"

The kind of resource that the binding provides.

old_name?: string

The old name of the inherited binding. If set, the binding will be renamed from old_name to name in the new version. If not set, the binding will keep the same name between versions.

version_id?: string

Identifier for the version to inherit the binding from, which can be the version ID or the literal "latest" to inherit from the latest version. Defaults to inheriting the binding from the latest version.

WorkersBindingKindImages { name, type }
name: string

A JavaScript variable name for the binding.

type: "images"

The kind of resource that the binding provides.

WorkersBindingKindJson { json, name, type }
json: unknown

JSON data to use.

name: string

A JavaScript variable name for the binding.

type: "json"

The kind of resource that the binding provides.

WorkersBindingKindKVNamespace { name, namespace_id, type }
name: string

A JavaScript variable name for the binding.

namespace_id: string

Namespace identifier tag.

maxLength32
type: "kv_namespace"

The kind of resource that the binding provides.

WorkersBindingKindMedia { name, type }
name: string

A JavaScript variable name for the binding.

type: "media"

The kind of resource that the binding provides.

WorkersBindingKindMTLSCertificate { certificate_id, name, type }
certificate_id: string

Identifier of the certificate to bind to.

name: string

A JavaScript variable name for the binding.

type: "mtls_certificate"

The kind of resource that the binding provides.

WorkersBindingKindPlainText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The text value to use.

type: "plain_text"

The kind of resource that the binding provides.

WorkersBindingKindPipelines { name, pipeline, type }
name: string

A JavaScript variable name for the binding.

pipeline: string

Name of the Pipeline to bind to.

type: "pipelines"

The kind of resource that the binding provides.

WorkersBindingKindQueue { name, queue_name, type }
name: string

A JavaScript variable name for the binding.

queue_name: string

Name of the Queue to bind to.

type: "queue"

The kind of resource that the binding provides.

WorkersBindingKindRatelimit { name, namespace_id, simple, type }
name: string

A JavaScript variable name for the binding.

namespace_id: string

Identifier of the rate limit namespace to bind to.

simple: Simple { limit, period }

The rate limit configuration.

limit: number

The limit (requests per period).

period: number

The period in seconds.

type: "ratelimit"

The kind of resource that the binding provides.

WorkersBindingKindR2Bucket { bucket_name, name, type, jurisdiction }
bucket_name: string

R2 bucket to bind to.

name: string

A JavaScript variable name for the binding.

type: "r2_bucket"

The kind of resource that the binding provides.

jurisdiction?: "eu" | "fedramp" | "fedramp-high"

The jurisdiction of the R2 bucket.

One of the following:
"eu"
"fedramp"
"fedramp-high"
WorkersBindingKindSecretText { name, text, type }
name: string

A JavaScript variable name for the binding.

text: string

The secret value to use.

type: "secret_text"

The kind of resource that the binding provides.

WorkersBindingKindSendEmail { name, type, allowed_destination_addresses, 2 more }
name: string

A JavaScript variable name for the binding.

type: "send_email"

The kind of resource that the binding provides.

allowed_destination_addresses?: Array<string>

List of allowed destination addresses.

allowed_sender_addresses?: Array<string>

List of allowed sender addresses.

destination_address?: string

Destination address for the email.

formatemail
WorkersBindingKindService { name, service, type, 2 more }
name: string

A JavaScript variable name for the binding.

service: string

Name of Worker to bind to.

type: "service"

The kind of resource that the binding provides.

entrypoint?: string

Entrypoint to invoke on the target Worker.

environment?: string

Optional environment if the Worker utilizes one.

WorkersBindingKindTextBlob { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the text content. Only accepted for service worker syntax Workers.

Deprecatedtype: "text_blob"

The kind of resource that the binding provides.

WorkersBindingKindVectorize { index_name, name, type }
index_name: string

Name of the Vectorize index to bind to.

name: string

A JavaScript variable name for the binding.

type: "vectorize"

The kind of resource that the binding provides.

WorkersBindingKindVersionMetadata { name, type }
name: string

A JavaScript variable name for the binding.

type: "version_metadata"

The kind of resource that the binding provides.

WorkersBindingKindSecretsStoreSecret { name, secret_name, store_id, type }
name: string

A JavaScript variable name for the binding.

secret_name: string

Name of the secret in the store.

store_id: string

ID of the store containing the secret.

type: "secrets_store_secret"

The kind of resource that the binding provides.

WorkersBindingKindSecretKey { algorithm, format, name, 4 more }
algorithm: unknown

Algorithm-specific key parameters. Learn more.

format: "raw" | "pkcs8" | "spki" | "jwk"

Data format of the key. Learn more.

One of the following:
"raw"
"pkcs8"
"spki"
"jwk"
name: string

A JavaScript variable name for the binding.

type: "secret_key"

The kind of resource that the binding provides.

usages: Array<"encrypt" | "decrypt" | "sign" | 5 more>

Allowed operations with the key. Learn more.

One of the following:
"encrypt"
"decrypt"
"sign"
"verify"
"deriveKey"
"deriveBits"
"wrapKey"
"unwrapKey"
key_base64?: string

Base64-encoded key data. Required if format is "raw", "pkcs8", or "spki".

key_jwk?: unknown

Key data in JSON Web Key format. Required if format is "jwk".

WorkersBindingKindWorkflow { name, type, workflow_name, 2 more }
name: string

A JavaScript variable name for the binding.

type: "workflow"

The kind of resource that the binding provides.

workflow_name: string

Name of the Workflow to bind to.

class_name?: string

Class name of the Workflow. Should only be provided if the Workflow belongs to this script.

script_name?: string

Script name that contains the Workflow. If not provided, defaults to this script name.

WorkersBindingKindWasmModule { name, part, type }
name: string

A JavaScript variable name for the binding.

part: string

The name of the file containing the WebAssembly module content. Only accepted for service worker syntax Workers.

Deprecatedtype: "wasm_module"

The kind of resource that the binding provides.

WorkersBindingKindVPCService { name, service_id, type }
name: string

A JavaScript variable name for the binding.

service_id: string

Identifier of the VPC service to bind to.

type: "vpc_service"

The kind of resource that the binding provides.

WorkersBindingKindVPCNetwork { name, type, network_id, tunnel_id }
name: string

A JavaScript variable name for the binding.

type: "vpc_network"

The kind of resource that the binding provides.

network_id?: string

Identifier of the network to bind to. Only "cf1:network" is currently supported. Mutually exclusive with tunnel_id.

tunnel_id?: string

UUID of the Cloudflare Tunnel to bind to. Mutually exclusive with network_id.

compatibility_date?: string

Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker.

compatibility_flags?: Array<string>

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.

limits?: Limits { cpu_ms }

Limits to apply for this Worker.

cpu_ms?: number

The amount of CPU time this Worker can use in milliseconds.

logpush?: boolean

Whether Logpush is turned on for the Worker.

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.

One of the following:
SingleStepMigration { deleted_classes, new_classes, new_sqlite_classes, 4 more }

A single set of migrations to apply.

deleted_classes?: Array<string>

A list of classes to delete Durable Object namespaces from.

new_classes?: Array<string>

A list of classes to create Durable Object namespaces from.

new_sqlite_classes?: Array<string>

A list of classes to create Durable Object namespaces with SQLite from.

new_tag?: string

Tag to set as the latest migration tag.

old_tag?: string

Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected.

renamed_classes?: Array<RenamedClass>

A list of classes with Durable Object namespaces that were renamed.

from?: string
to?: string
transferred_classes?: Array<TransferredClass>

A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker.

from?: string
from_script?: string
to?: string
WorkersMultipleStepMigrations { new_tag, old_tag, steps }
new_tag?: string

Tag to set as the latest migration tag.

old_tag?: string

Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected.

steps?: Array<MigrationStep { deleted_classes, new_classes, new_sqlite_classes, 2 more } >

Migrations to apply in order.

deleted_classes?: Array<string>

A list of classes to delete Durable Object namespaces from.

new_classes?: Array<string>

A list of classes to create Durable Object namespaces from.

new_sqlite_classes?: Array<string>

A list of classes to create Durable Object namespaces with SQLite from.

renamed_classes?: Array<RenamedClass>

A list of classes with Durable Object namespaces that were renamed.

from?: string
to?: string
transferred_classes?: Array<TransferredClass>

A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker.

from?: string
from_script?: string
to?: string
observability?: Observability { enabled, head_sampling_rate, logs, traces }

Observability settings for the Worker.

enabled: boolean

Whether observability is enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for incoming requests. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

logs?: Logs | null

Log settings for the Worker.

enabled: boolean

Whether logs are enabled for the Worker.

invocation_logs: boolean

Whether invocation logs are enabled for the Worker.

destinations?: Array<string>

A list of destinations where logs will be exported to.

head_sampling_rate?: number | null

The sampling rate for logs. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether log persistence is enabled for the Worker.

traces?: Traces | null

Trace settings for the Worker.

destinations?: Array<string>

A list of destinations where traces will be exported to.

enabled?: boolean

Whether traces are enabled for the Worker.

head_sampling_rate?: number | null

The sampling rate for traces. From 0 to 1 (1 = 100%, 0.1 = 10%). Default is 1.

persist?: boolean

Whether trace persistence is enabled for the Worker.

placement?: Mode { mode } | Region { region } | Hostname { hostname } | 5 more

Configuration for Smart Placement. Specify mode='smart' for Smart Placement, or one of region/hostname/host.

One of the following:
Mode { mode }
mode: "smart"

Enables Smart Placement.

Region { region }
region: string

Cloud region for targeted placement in format 'provider:region'.

Hostname { hostname }
hostname: string

HTTP hostname for targeted placement.

Host { host }
host: string

TCP host and port for targeted placement.

UnionMember4 { mode, region }
mode: "targeted"

Targeted placement mode.

region: string

Cloud region for targeted placement in format 'provider:region'.

UnionMember5 { hostname, mode }
hostname: string

HTTP hostname for targeted placement.

mode: "targeted"

Targeted placement mode.

UnionMember6 { host, mode }
host: string

TCP host and port for targeted placement.

mode: "targeted"

Targeted placement mode.

UnionMember7 { mode, target }
mode: "targeted"

Targeted placement mode.

target: Array<Region { region } | Hostname { hostname } | Host { host } >

Array of placement targets (currently limited to single target).

One of the following:
Region { region }
region: string

Cloud region in format 'provider:region'.

Hostname { hostname }
hostname: string

HTTP hostname for targeted placement.

Host { host }
host: string

TCP host:port for targeted placement.

tags?: Array<string> | null

Tags associated with the Worker.

tail_consumers?: Array<ConsumerScript { service, environment, namespace } > | null

List of Workers that will consume logs from the attached Worker.

service: string

Name of Worker that is to be the consumer.

environment?: string

Optional environment if the Worker utilizes one.

namespace?: string

Optional dispatch namespace the script belongs to.

usage_model?: "standard" | "bundled" | "unbound"

Usage model for the Worker invocations.

One of the following:
"standard"
"bundled"
"unbound"

WorkersAccount Settings

Fetch Worker Account Settings
client.workers.accountSettings.get(AccountSettingGetParams { account_id } params, RequestOptionsoptions?): AccountSettingGetResponse { default_usage_model, green_compute }
GET/accounts/{account_id}/workers/account-settings
Create Worker Account Settings
client.workers.accountSettings.update(AccountSettingUpdateParams { account_id, default_usage_model, green_compute } params, RequestOptionsoptions?): AccountSettingUpdateResponse { default_usage_model, green_compute }
PUT/accounts/{account_id}/workers/account-settings
ModelsExpand Collapse
AccountSettingGetResponse { default_usage_model, green_compute }
default_usage_model?: string
green_compute?: boolean
AccountSettingUpdateResponse { default_usage_model, green_compute }
default_usage_model?: string
green_compute?: boolean

WorkersDomains

List Domains
client.workers.domains.list(DomainListParams { account_id, environment, hostname, 3 more } params, RequestOptionsoptions?): SinglePage<DomainListResponse { id, cert_id, environment, 4 more } >
GET/accounts/{account_id}/workers/domains
Get Domain
client.workers.domains.get(stringdomainId, DomainGetParams { account_id } params, RequestOptionsoptions?): DomainGetResponse { id, cert_id, environment, 4 more }
GET/accounts/{account_id}/workers/domains/{domain_id}
Attach Domain
client.workers.domains.update(DomainUpdateParams { account_id, hostname, service, 3 more } params, RequestOptionsoptions?): DomainUpdateResponse { id, cert_id, environment, 4 more }
PUT/accounts/{account_id}/workers/domains
Detach Domain
client.workers.domains.delete(stringdomainId, DomainDeleteParams { account_id } params, RequestOptionsoptions?): DomainDeleteResponse { errors, messages, success }
DELETE/accounts/{account_id}/workers/domains/{domain_id}
ModelsExpand Collapse
DomainListResponse { id, cert_id, environment, 4 more }
id: string

Immutable ID of the domain.

cert_id: string

ID of the TLS certificate issued for the domain.

formatuuid
Deprecatedenvironment: string

Worker environment associated with the domain.

hostname: string

Hostname of the domain. Can be either the zone apex or a subdomain of the zone. Requests to this hostname will be routed to the configured Worker.

service: string

Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.

zone_id: string

ID of the zone containing the domain hostname.

zone_name: string

Name of the zone containing the domain hostname.

DomainGetResponse { id, cert_id, environment, 4 more }
id: string

Immutable ID of the domain.

cert_id: string

ID of the TLS certificate issued for the domain.

formatuuid
Deprecatedenvironment: string

Worker environment associated with the domain.

hostname: string

Hostname of the domain. Can be either the zone apex or a subdomain of the zone. Requests to this hostname will be routed to the configured Worker.

service: string

Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.

zone_id: string

ID of the zone containing the domain hostname.

zone_name: string

Name of the zone containing the domain hostname.

DomainUpdateResponse { id, cert_id, environment, 4 more }
id: string

Immutable ID of the domain.

cert_id: string

ID of the TLS certificate issued for the domain.

formatuuid
Deprecatedenvironment: string

Worker environment associated with the domain.

hostname: string

Hostname of the domain. Can be either the zone apex or a subdomain of the zone. Requests to this hostname will be routed to the configured Worker.

service: string

Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.

zone_id: string

ID of the zone containing the domain hostname.

zone_name: string

Name of the zone containing the domain hostname.

DomainDeleteResponse { errors, messages, success }
errors: Array<Error>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
messages: Array<Message>
code: number
minimum1000
message: string
documentation_url?: string
source?: Source { pointer }
pointer?: string
success: true

Whether the API call was successful.

WorkersSubdomains

Get Subdomain
client.workers.subdomains.get(SubdomainGetParams { account_id } params, RequestOptionsoptions?): SubdomainGetResponse { subdomain }
GET/accounts/{account_id}/workers/subdomain
Create Subdomain
client.workers.subdomains.update(SubdomainUpdateParams { account_id, subdomain } params, RequestOptionsoptions?): SubdomainUpdateResponse { subdomain }
PUT/accounts/{account_id}/workers/subdomain
Delete Subdomain
client.workers.subdomains.delete(SubdomainDeleteParams { account_id } params, RequestOptionsoptions?): void
DELETE/accounts/{account_id}/workers/subdomain
ModelsExpand Collapse
SubdomainGetResponse { subdomain }
subdomain: string
SubdomainUpdateResponse { subdomain }
subdomain: string

WorkersObservability

WorkersObservabilityTelemetry

List keys
client.workers.observability.telemetry.keys(TelemetryKeysParams { account_id, datasets, filters, 5 more } params, RequestOptionsoptions?): SinglePage<TelemetryKeysResponse { key, lastSeenAt, type } >
POST/accounts/{account_id}/workers/observability/telemetry/keys
Run a query
client.workers.observability.telemetry.query(TelemetryQueryParams { account_id, queryId, timeframe, 11 more } params, RequestOptionsoptions?): TelemetryQueryResponse { run, statistics, agents, 5 more }
POST/accounts/{account_id}/workers/observability/telemetry/query
List values
client.workers.observability.telemetry.values(TelemetryValuesParams { account_id, datasets, key, 5 more } params, RequestOptionsoptions?): SinglePage<TelemetryValuesResponse { dataset, key, type, value } >
POST/accounts/{account_id}/workers/observability/telemetry/values
ModelsExpand Collapse
TelemetryKeysResponse { key, lastSeenAt, type }
key: string
lastSeenAt: number
type: "string" | "boolean" | "number"
One of the following:
"string"
"boolean"
"number"
TelemetryQueryResponse { run, statistics, agents, 5 more }
run: Run { id, accountId, dry, 8 more }

A Workers Observability Query Object

id: string
accountId: string
dry: boolean
granularity: number
query: Query { id, adhoc, created, 6 more }
id: string
adhoc: boolean

If the query wasn't explcitly saved

created: string
createdBy: string
description: string | null
maxLength1000
name: string

Query name

maxLength250
minLength1
parameters: Parameters { calculations, datasets, filterCombination, 6 more }
calculations?: Array<Calculation>

Create Calculations to compute as part of the query.

operator: "uniq" | "count" | "max" | 35 more
One of the following:
"uniq"
"count"
"max"
"min"
"sum"
"avg"
"median"
"p001"
"p01"
"p05"
"p10"
"p25"
"p75"
"p90"
"p95"
"p99"
"p999"
"stddev"
"variance"
"COUNT_DISTINCT"
"COUNT"
"MAX"
"MIN"
"SUM"
"AVG"
"MEDIAN"
"P001"
"P01"
"P05"
"P10"
"P25"
"P75"
"P90"
"P95"
"P99"
"P999"
"STDDEV"
"VARIANCE"
alias?: string
key?: string
keyType?: "string" | "number" | "boolean"
One of the following:
"string"
"number"
"boolean"
datasets?: Array<string>

Set the Datasets to query. Leave it empty to query all the datasets.

filterCombination?: "and" | "or" | "AND" | "OR"

Set a Flag to describe how to combine the filters on the query.

One of the following:
"and"
"or"
"AND"
"OR"
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'.

One of the following:
UnionMember0 { filterCombination, filters, kind }
filterCombination: "and" | "or" | "AND" | "OR"
One of the following:
"and"
"or"
"AND"
"OR"
filters: Array<unknown>
kind: "group"
WorkersObservabilityFilterLeaf { key, operation, type, 2 more }

Filtering best practices: use observability_keys and observability_values to confirm available fields and values. If searching for errors, filter for $metadata.error exists.

key: string

Filter field name. IMPORTANT: do not guess keys. Always use verified keys from previous query results or the observability_keys response. Preferred keys: $metadata.service, $metadata.origin, $metadata.trigger, $metadata.message, $metadata.error.

operation: "includes" | "not_includes" | "starts_with" | 25 more
One of the following:
"includes"
"not_includes"
"starts_with"
"regex"
"exists"
"is_null"
"in"
"not_in"
"eq"
"neq"
"gt"
"gte"
"lt"
"lte"
"="
"!="
">"
">="
"<"
"<="
"INCLUDES"
"DOES_NOT_INCLUDE"
"MATCH_REGEX"
"EXISTS"
"DOES_NOT_EXIST"
"IN"
"NOT_IN"
"STARTS_WITH"
type: "string" | "number" | "boolean"
One of the following:
"string"
"number"
"boolean"
kind?: "filter"
value?: string | number | boolean

Filter comparison value. IMPORTANT: must match actual values in your logs. Verify using previous query results or the /values endpoint. Ensure value type matches the field type. String comparisons are case-sensitive unless using specific operations. Regex uses ClickHouse RE2 syntax (no lookaheads/lookbehinds); examples: ^5\d{2}$ for HTTP 5xx, \bERROR\b for word boundary.

One of the following:
string
number
boolean
groupBys?: Array<GroupBy>

Define how to group the results of the query.

type: "string" | "number" | "boolean"
One of the following:
"string"
"number"
"boolean"
value: string
havings?: Array<Having>

Configure the Having clauses that filter on calculations in the query result.

key: string
operation: "eq" | "neq" | "gt" | 3 more
One of the following:
"eq"
"neq"
"gt"
"gte"
"lt"
"lte"
value: number
limit?: number

Set a limit on the number of results / records returned by the query

maximum100
minimum0
needle?: Needle { value, isRegex, matchCase }

Define an expression to search using full-text search.

value: Value
isRegex?: boolean
matchCase?: boolean
orderBy?: OrderBy { value, order }

Configure the order of the results returned by the query.

value: string

Configure which Calculation to order the results by.

order?: "asc" | "desc"

Set the order of the results

One of the following:
"asc"
"desc"
updated: string
updatedBy: string
status: "STARTED" | "COMPLETED"
One of the following:
"STARTED"
"COMPLETED"
timeframe: Timeframe { from, to }

Time range for the query execution

from: number

Start timestamp for the query timeframe (Unix timestamp in milliseconds)

to: number

End timestamp for the query timeframe (Unix timestamp in milliseconds)

userId: string
created?: string
statistics?: Statistics { bytes_read, elapsed, rows_read, abr_level }
bytes_read: number

Number of uncompressed bytes read from the table.

elapsed: number

Time in seconds for the query to run.

rows_read: number

Number of rows scanned from the table.

abr_level?: number

The level of Adaptive Bit Rate (ABR) sampling used for the query. If empty the ABR level is 1

updated?: string
statistics: Statistics { bytes_read, elapsed, rows_read, abr_level }

The statistics object contains information about query performance from the database, it does not include any network latency

bytes_read: number

Number of uncompressed bytes read from the table.

elapsed: number

Time in seconds for the query to run.

rows_read: number

Number of rows scanned from the table.

abr_level?: number

The level of Adaptive Bit Rate (ABR) sampling used for the query. If empty the ABR level is 1

agents?: Array<Agent>
agentClass: string
eventTypeCounts: Record<string, number>
firstEventMs: number
hasErrors: boolean
lastEventMs: number
namespace: string
service: string
totalEvents: number
calculations?: Array<Calculation>
aggregates: Array<Aggregate>
count: number
interval: number
sampleInterval: number
value: number
groups?: Array<Group>
key: string
value: string | number | boolean
One of the following:
string
number
boolean
calculation: string
series: Array<Series>
data: Array<Data>
count: number
interval: number
sampleInterval: number
value: number
firstSeen?: string
groups?: Array<Group>
key: string
value: string | number | boolean
One of the following:
string
number
boolean
lastSeen?: string
time: string
alias?: string
compare?: Array<Compare>
aggregates: Array<Aggregate>
count: number
interval: number
sampleInterval: number
value: number
groups?: Array<Group>
key: string
value: string | number | boolean
One of the following:
string
number
boolean
calculation: string
series: Array<Series>
data: Array<Data>
count: number
interval: number
sampleInterval: number
value: number
firstSeen?: string
groups?: Array<Group>
key: string
value: string | number | boolean
One of the following:
string
number
boolean
lastSeen?: string
time: string
alias?: string
events?: Events { count, events, fields, series }
count?: number
events?: Array<Event>
"$metadata": Metadata { id, account, cloudService, 28 more }
id: string

Unique event ID. Use as the cursor for offset-based pagination.

account?: string
cloudService?: string
coldStart?: number
exclusiveMinimum
minimum0
cost?: number
exclusiveMinimum
minimum0
duration?: number
exclusiveMinimum
minimum0
endTime?: number
minimum0
error?: string
errorTemplate?: string
fingerprint?: string
level?: string
message?: string
messageTemplate?: string
metricName?: string
origin?: string
parentSpanId?: string
provider?: string
region?: string
requestId?: string
service?: string
spanId?: string
spanName?: string
stackId?: string
startTime?: number
minimum0
statusCode?: number
exclusiveMinimum
minimum0
traceDuration?: number
exclusiveMinimum
minimum0
traceId?: string
transactionName?: string
trigger?: string
type?: string
url?: string
dataset: string
source: string | unknown
One of the following:
string
unknown
timestamp: number
minimum0
"$containers"?: unknown

Cloudflare Containers event information enriches your logs so you can easily identify and debug issues.

"$workers"?: UnionMember0 { eventType, requestId, scriptName, 7 more } | UnionMember1 { cpuTimeMs, eventType, outcome, 11 more }

Cloudflare Workers event information enriches your logs so you can easily identify and debug issues.

One of the following:
UnionMember0 { eventType, requestId, scriptName, 7 more }
eventType: "fetch" | "scheduled" | "alarm" | 8 more
One of the following:
"fetch"
"scheduled"
"alarm"
"cron"
"queue"
"email"
"tail"
"rpc"
"websocket"
"workflow"
"unknown"
requestId: string
scriptName: string
durableObjectId?: string
entrypoint?: string
event?: Record<string, unknown>
executionModel?: "durableObject" | "stateless"
One of the following:
"durableObject"
"stateless"
outcome?: string
scriptVersion?: ScriptVersion { id, message, tag }
id?: string
message?: string
tag?: string
truncated?: boolean
UnionMember1 { cpuTimeMs, eventType, outcome, 11 more }
cpuTimeMs: number
eventType: "fetch" | "scheduled" | "alarm" | 8 more
One of the following:
"fetch"
"scheduled"
"alarm"
"cron"
"queue"
"email"
"tail"
"rpc"
"websocket"
"workflow"
"unknown"
outcome: string
requestId: string
scriptName: string
wallTimeMs: number
diagnosticsChannelEvents?: Array<DiagnosticsChannelEvent>
channel: string
message: string
timestamp: number
dispatchNamespace?: string
durableObjectId?: string
entrypoint?: string
event?: Record<string, unknown>
executionModel?: "durableObject" | "stateless"
One of the following:
"durableObject"
"stateless"
scriptVersion?: ScriptVersion { id, message, tag }
id?: string
message?: string
tag?: string
truncated?: boolean
fields?: Array<Field>
key: string
type: string
series?: Array<Series>
data: Array<Data>
aggregates: Aggregates { _count, _interval, _firstSeen, 2 more }
Deprecated_count: number
exclusiveMinimum
minimum0
Deprecated_interval: number
exclusiveMinimum
minimum0
Deprecated_firstSeen?: string
Deprecated_lastSeen?: string
Deprecatedbin?: unknown
count: number
interval: number
sampleInterval: number
errors?: number
groups?: Record<string, string | number | boolean>

Groups in the query results.

One of the following:
string
number
boolean
time: string
invocations?: Record<string, Array<Invocation>>
"$metadata": Metadata { id, account, cloudService, 28 more }
id: string

Unique event ID. Use as the cursor for offset-based pagination.

account?: string
cloudService?: string
coldStart?: number
exclusiveMinimum
minimum0
cost?: number
exclusiveMinimum
minimum0
duration?: number
exclusiveMinimum
minimum0
endTime?: number
minimum0
error?: string
errorTemplate?: string
fingerprint?: string
level?: string
message?: string
messageTemplate?: string
metricName?: string
origin?: string
parentSpanId?: string
provider?: string
region?: string
requestId?: string
service?: string
spanId?: string
spanName?: string
stackId?: string
startTime?: number
minimum0
statusCode?: number
exclusiveMinimum
minimum0
traceDuration?: number
exclusiveMinimum
minimum0
traceId?: string
transactionName?: string
trigger?: string
type?: string
url?: string
dataset: string
source: string | unknown
One of the following:
string
unknown
timestamp: number
minimum0
"$containers"?: unknown

Cloudflare Containers event information enriches your logs so you can easily identify and debug issues.

"$workers"?: UnionMember0 { eventType, requestId, scriptName, 7 more } | UnionMember1 { cpuTimeMs, eventType, outcome, 11 more }

Cloudflare Workers event information enriches your logs so you can easily identify and debug issues.

One of the following:
UnionMember0 { eventType, requestId, scriptName, 7 more }
eventType: "fetch" | "scheduled" | "alarm" | 8 more
One of the following:
"fetch"
"scheduled"
"alarm"
"cron"
"queue"
"email"
"tail"
"rpc"
"websocket"
"workflow"
"unknown"
requestId: string
scriptName: string
durableObjectId?: string
entrypoint?: string
event?: Record<string, unknown>
executionModel?: "durableObject" | "stateless"
One of the following:
"durableObject"
"stateless"
outcome?: string
scriptVersion?: ScriptVersion { id, message, tag }
id?: string
message?: string
tag?: string
truncated?: boolean
UnionMember1 { cpuTimeMs, eventType, outcome, 11 more }
cpuTimeMs: number
eventType: "fetch" | "scheduled" | "alarm" | 8 more
One of the following:
"fetch"
"scheduled"
"alarm"
"cron"
"queue"
"email"
"tail"
"rpc"
"websocket"
"workflow"
"unknown"
outcome: string
requestId: string
scriptName: string
wallTimeMs: number
diagnosticsChannelEvents?: Array<DiagnosticsChannelEvent>
channel: string
message: string
timestamp: number
dispatchNamespace?: string
durableObjectId?: string
entrypoint?: string
event?: Record<string, unknown>
executionModel?: "durableObject" | "stateless"
One of the following:
"durableObject"
"stateless"
scriptVersion?: ScriptVersion { id, message, tag }
id?: string
message?: string
tag?: string
truncated?: boolean
traces?: Array<Trace>
rootSpanName: string
rootTransactionName: string
service: Array<string>
spans: number
traceDurationMs: number
traceEndMs: number
traceId: string
traceStartMs: number
errors?: Array<string>
TelemetryValuesResponse { dataset, key, type, value }
dataset: string
key: string
type: "string" | "boolean" | "number"
One of the following:
"string"
"boolean"
"number"
value: string | number | boolean
One of the following:
string
number
boolean

WorkersObservabilityDestinations

Get Destinations
client.workers.observability.destinations.list(DestinationListParams { account_id, order, orderBy, 2 more } params, RequestOptionsoptions?): SinglePage<DestinationListResponse { configuration, enabled, name, 2 more } >
GET/accounts/{account_id}/workers/observability/destinations
Create Destination
client.workers.observability.destinations.create(DestinationCreateParams { account_id, configuration, enabled, 2 more } params, RequestOptionsoptions?): DestinationCreateResponse { configuration, enabled, name, 2 more }
POST/accounts/{account_id}/workers/observability/destinations
Update Destination
client.workers.observability.destinations.update(stringslug, DestinationUpdateParams { account_id, configuration, enabled } params, RequestOptionsoptions?): DestinationUpdateResponse { configuration, enabled, name, 2 more }
PATCH/accounts/{account_id}/workers/observability/destinations/{slug}
Delete Destination
client.workers.observability.destinations.delete(stringslug, DestinationDeleteParams { account_id } params, RequestOptionsoptions?): DestinationDeleteResponse { configuration, enabled, name, 2 more }
DELETE/accounts/{account_id}/workers/observability/destinations/{slug}
ModelsExpand Collapse
DestinationListResponse { configuration, enabled, name, 2 more }
configuration: Configuration { destination_conf, headers, jobStatus, 3 more }
destination_conf: string
headers: Record<string, string>
jobStatus: JobStatus { error_message, last_complete, last_error }
error_message: string
last_complete: string
last_error: string
logpushDataset: "opentelemetry-traces" | "opentelemetry-logs"
One of the following:
"opentelemetry-traces"
"opentelemetry-logs"
type: "logpush"
url: string
enabled: boolean
name: string
scripts: Array<string>
slug: string
DestinationCreateResponse { configuration, enabled, name, 2 more }
configuration: Configuration { destination_conf, logpushDataset, logpushJob, 2 more }
destination_conf: string
logpushDataset: "opentelemetry-traces" | "opentelemetry-logs"
One of the following:
"opentelemetry-traces"
"opentelemetry-logs"
logpushJob: number
type: "logpush"
url: string
enabled: boolean
name: string
scripts: Array<string>
slug: string
DestinationUpdateResponse { configuration, enabled, name, 2 more }
configuration: Configuration { destination_conf, logpushDataset, logpushJob, 2 more }
destination_conf: string
logpushDataset: "opentelemetry-traces" | "opentelemetry-logs"
One of the following:
"opentelemetry-traces"
"opentelemetry-logs"
logpushJob: number
type: "logpush"
url: string
enabled: boolean
name: string
scripts: Array<string>
slug: string
DestinationDeleteResponse { configuration, enabled, name, 2 more }
configuration: Configuration { destination_conf, logpushDataset, logpushJob, 2 more }
destination_conf: string
logpushDataset: "opentelemetry-traces" | "opentelemetry-logs"
One of the following:
"opentelemetry-traces"
"opentelemetry-logs"
logpushJob: number
type: "logpush"
url: string
enabled: boolean
name: string
scripts: Array<string>
slug: string