Workers For Platforms

workers_for_platforms

workers_for_platforms.dispatch

workers_for_platforms.dispatch.namespaces

Methods

Create Dispatch Namespace -> Envelope<{ created_by, created_on, modified_by, 4 more... }>
post/accounts/{account_id}/workers/dispatch/namespaces

Create a new Workers for Platforms namespace.

Delete Dispatch Namespace -> Envelope<unknown>
delete/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}

Delete a Workers for Platforms namespace.

Get Dispatch Namespace -> Envelope<{ created_by, created_on, modified_by, 4 more... }>
get/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}

Get a Workers for Platforms namespace.

List Dispatch Namespaces -> SinglePage<{ created_by, created_on, modified_by, 4 more... }>
get/accounts/{account_id}/workers/dispatch/namespaces

Fetch a list of Workers for Platforms namespaces.

Security

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY

Accepted Permissions (at least one required)

Workers Tail Read Workers Scripts Write Workers Scripts Read

Parameters
account_id: string

Identifier

Response fields
errors: Array<>
messages: Array<>
success: true

Whether the API call was successful

result: Array<{ created_by, created_on, modified_by, 4 more... }>
Optional
Request example
200Example

workers_for_platforms.dispatch.namespaces.scripts

Methods

Delete Worker ->
delete/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}

Delete a worker from a Workers for Platforms namespace. This call has no response body on a successful delete.

Worker Details -> Envelope<>
get/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}

Fetch information about a script uploaded to a Workers for Platforms namespace.

Upload Worker Module -> Envelope<{ id, created_on, etag, 8 more... }>
put/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}

Upload a worker module to a Workers for Platforms namespace. You can find more about the multipart metadata on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/.

Domain types

Script = { created_on, dispatch_namespace, modified_on, 1 more... }

workers_for_platforms.dispatch.namespaces.scripts.asset_upload

Methods

Create Assets Upload Session -> Envelope<{ buckets, jwt }>
post/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/assets-upload-session

Start uploading a collection of assets for use in a Worker version.

workers_for_platforms.dispatch.namespaces.scripts.bindings

Methods

Get Script Bindings -> Envelope<Array<>>
get/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/bindings

Fetch script bindings from a script uploaded to a Workers for Platforms namespace.

workers_for_platforms.dispatch.namespaces.scripts.content

Methods

Get Script Content -> unknown
get/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content

Fetch script content from a script uploaded to a Workers for Platforms namespace.

Put Script Content -> Envelope<>
put/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content

Put script content for a script uploaded to a Workers for Platforms namespace.

workers_for_platforms.dispatch.namespaces.scripts.secrets

Methods

Get Script Secret -> Envelope<{ name, type }>
get/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/secrets/{secret_name}

Get secret from a script uploaded to a Workers for Platforms namespace.

List Script Secrets -> SinglePage<{ name, type }>
get/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/secrets

List secrets from a script uploaded to a Workers for Platforms namespace.

Put Script Secrets -> Envelope<{ name, type }>
put/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/secrets

Put secrets to a script uploaded to a Workers for Platforms namespace.

Domain types

WorkersSecretModel = { name, text, type }

workers_for_platforms.dispatch.namespaces.scripts.settings

Methods

Patch Script Settings -> Envelope<{ bindings, compatibility_date, compatibility_flags, 8 more... }>
patch/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/settings

Patch script metadata, such as bindings

Get Script Settings -> Envelope<{ bindings, compatibility_date, compatibility_flags, 8 more... }>
get/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/settings

Get script settings from a script uploaded to a Workers for Platforms namespace.

workers_for_platforms.dispatch.namespaces.scripts.tags

Methods

Delete Script Tag -> Envelope<unknown>
delete/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/tags/{tag}

Delete script tag for a script uploaded to a Workers for Platforms namespace.

Get Script Tags -> SinglePage<string>
get/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/tags

Fetch tags from a script uploaded to a Workers for Platforms namespace.

Put Script Tags -> Envelope<Array<string>>
put/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/tags

Put script tags for a script uploaded to a Workers for Platforms namespace.