---
title: List Worker Scripts
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[Workers](https://developers.cloudflare.com/api/python/resources/workers)

[Scripts](https://developers.cloudflare.com/api/python/resources/workers/subresources/scripts)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# List Worker Scripts

workers.scripts.list(ScriptListParams\*\*kwargs) -> SyncSinglePage\[[ScriptListResponse](<https://developers.cloudflare.com/api/python/resources/workers#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)>)]

GET/accounts/{account\_id}/workers/scripts

Fetch a list of uploaded Worker scripts.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Workers Tail Read``Workers Scripts Write``Workers Scripts Read`

##### ParametersExpand Collapse

account\_id: str

Identifier.

maxLength32

[Link to this property](<#(resource)%20workers.scripts%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

tags: Optional\[str]

Filter scripts by tags. Format: comma-separated list of tag:allowed pairs where allowed is ‘yes’ or ‘no’.

[Link to this property](<#(resource)%20workers.scripts%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20tags%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class ScriptListResponse: …

</summary>

id: Optional\[str]

The name used to identify the script.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

cache\_options: Optional\[CacheOptions]

Global CacheW configuration for the Worker. When caching is on, the platform provisions a <code>cloudflare.app</code> zone for the Worker. A <code>type: worker</code> entry in the <code>exports</code> map can override this value for a single entrypoint.

</summary>

enabled: bool

Whether caching is enabled for this Worker.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20cache_options%20%3E%20(property)%20enabled">Link to this property</a>

cross\_version\_cache: Optional\[bool]

Whether cached responses are shared across Worker version uploads. This is independent of <code>enabled</code>. It can stay true while caching is off, so the preference survives turning caching off and back on.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20cache_options%20%3E%20(property)%20cross_version_cache">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20cache_options">Link to this property</a>

compatibility\_date: Optional\[str]

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

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20compatibility_date">Link to this property</a>

compatibility\_flags: Optional\[List\[str]]

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 <code>compatibility_date</code>.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20compatibility_flags">Link to this property</a>

created\_on: Optional\[datetime]

When the script was created.

formatdate-time

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>

etag: Optional\[str]

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

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20etag">Link to this property</a>

<details>

<summary>

exports: Optional\[Dict\[str, Exports]]

Declarative exports for the Worker’s most recent version, including Durable Object classes (with their <code>storage</code> backend) and named Worker entrypoints. Tombstoned lifecycle entries are omitted, so only live exports (<code>created</code> and <code>expecting-transfer</code>) are returned.

</summary>

One of the following:

<details>

<summary>

class ExportsWorkersWorkerExport: …

A named Worker entrypoint export (<code>type: worker</code>). Worker entrypoints are always live (<code>state: created</code>) and carry no storage or lifecycle fields. The optional <code>cache</code> block overrides the Worker’s global <code>cache_options.enabled</code> for this entrypoint.

</summary>

type: Literal\["worker"]

Marks this entry as a Worker entrypoint export.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20type">Link to this property</a>

<details>

<summary>

cache: Optional\[ExportsWorkersWorkerExportCache]

Cache override for this entrypoint. Overrides the Worker’s global <code>cache_options.enabled</code> for this entrypoint only.

</summary>

enabled: bool

Whether caching is enabled for this entrypoint.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20cache%20%3E%20(property)%20enabled">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20cache">Link to this property</a>

state: Optional\[Literal\["created"]]

Live export. May be omitted; defaults to <code>created</code>.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20state">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

class ExportsWorkersDurableObjectExport: …

A live Durable Object export (<code>state: created</code>, the default). The platform auto-provisions the namespace on first deploy, matches it on subsequent deploys, and never mutates or deletes it as a side effect of a code-only change. <code>storage</code> is required; <code>renamed_to</code>, <code>transferred_to</code> and <code>transfer_from</code> are not allowed on a live entry.

</summary>

<details>

<summary>

storage: Literal\["sqlite", "legacy-kv"]

Durable Object storage backend. <code>sqlite</code> is the recommended (and only) backend for new namespaces. <code>legacy-kv</code> is accepted only for a class whose namespace already exists as KV-backed; the <code>exports</code> flow never provisions a new <code>legacy-kv</code> namespace.

</summary>

One of the following:

"sqlite"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20storage%20%3E%20(member)%200">Link to this property</a>

"legacy-kv"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20storage%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20storage">Link to this property</a>

type: Literal\["durable-object"]

Marks this entry as a Durable Object export.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20type">Link to this property</a>

container: Optional\[str]

Name of the container (declared in the upload’s <code>metadata.containers</code>) that backs this Durable Object. When set, the namespace is container-enabled. Valid only on live entries.

maxLength128

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20container">Link to this property</a>

state: Optional\[Literal\["created"]]

Live export. May be omitted; defaults to <code>created</code>.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20state">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%201">Link to this property</a>

<details>

<summary>

class ExportsWorkersDurableObjectDeletedExport: …

A <code>deleted</code> tombstone: retires the provisioned namespace for this class and all of its data. The class must be absent from the uploaded code and no other Worker in the account may bind to the namespace, otherwise the deploy is rejected. No other fields are allowed. Deletion is irreversible.

</summary>

state: Literal\["deleted"]

Tombstone that deletes the namespace.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%202%20%3E%20(property)%20state">Link to this property</a>

type: Literal\["durable-object"]

Marks this entry as a Durable Object export.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%202%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%202">Link to this property</a>

<details>

<summary>

class ExportsWorkersDurableObjectRenamedExport: …

A <code>renamed</code> tombstone: rewrites the provisioned namespace’s class name from this map key to <code>renamed_to</code>. The source class may stay in code during the rollout window (an info notice is emitted). <code>storage</code>, <code>transferred_to</code> and <code>transfer_from</code> are not allowed.

</summary>

renamed\_to: str

The destination class name. Must differ from the source class (the map key) and must be declared as a live (<code>created</code>) entry in the same <code>exports</code> map. Write-only: never present in GET responses.

maxLength128

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%203%20%3E%20(property)%20renamed_to">Link to this property</a>

state: Literal\["renamed"]

Tombstone that renames the namespace’s class.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%203%20%3E%20(property)%20state">Link to this property</a>

type: Literal\["durable-object"]

Marks this entry as a Durable Object export.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%203%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%203">Link to this property</a>

<details>

<summary>

class ExportsWorkersDurableObjectTransferredExport: …

A <code>transferred</code> tombstone (source side of a two-phase transfer): hands ownership of the provisioned namespace to another script in the same account, named by <code>transferred_to</code>. The target must have already deployed a matching <code>expecting-transfer</code> entry. The source class may stay in code during the rollout window (an info notice is emitted). <code>storage</code>, <code>renamed_to</code> and <code>transfer_from</code> are not allowed.

</summary>

state: Literal\["transferred"]

Tombstone that transfers the namespace to another script.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%204%20%3E%20(property)%20state">Link to this property</a>

transferred\_to: str

The destination script name. Must be in the same account and the same dispatch-namespace context (or both non-dispatch). Cross-dispatch-namespace transfers are rejected. Write-only: never present in GET responses.

maxLength128

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%204%20%3E%20(property)%20transferred_to">Link to this property</a>

type: Literal\["durable-object"]

Marks this entry as a Durable Object export.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%204%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%204">Link to this property</a>

<details>

<summary>

class ExportsWorkersDurableObjectExpectingTransferExport: …

The target side of a two-phase transfer (<code>state: expecting-transfer</code>). Declares that this script expects to receive a namespace for this class from the <code>transfer_from</code> script. This is a live entry, not a tombstone: bindings resolve through the source’s namespace until the source commits with a <code>transferred</code> tombstone. <code>storage</code> and <code>transfer_from</code> are required; <code>renamed_to</code> and <code>transferred_to</code> are not allowed.

</summary>

state: Literal\["expecting-transfer"]

Target side of a two-phase transfer.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%205%20%3E%20(property)%20state">Link to this property</a>

<details>

<summary>

storage: Literal\["sqlite", "legacy-kv"]

Durable Object storage backend. <code>sqlite</code> is the recommended (and only) backend for new namespaces. <code>legacy-kv</code> is accepted only for a class whose namespace already exists as KV-backed; the <code>exports</code> flow never provisions a new <code>legacy-kv</code> namespace.

</summary>

One of the following:

"sqlite"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%205%20%3E%20(property)%20storage%20%3E%20(member)%200">Link to this property</a>

"legacy-kv"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%205%20%3E%20(property)%20storage%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%205%20%3E%20(property)%20storage">Link to this property</a>

transfer\_from: str

The source script name to receive the namespace from. Must be in the same account and dispatch-namespace context. Present on reads for <code>expecting-transfer</code> entries.

maxLength128

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%205%20%3E%20(property)%20transfer_from">Link to this property</a>

type: Literal\["durable-object"]

Marks this entry as a Durable Object export.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%205%20%3E%20(property)%20type">Link to this property</a>

container: Optional\[str]

Name of the container (declared in the upload’s <code>metadata.containers</code>) that backs this Durable Object once the transfer settles. Valid only on live entries.

maxLength128

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%205%20%3E%20(property)%20container">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports%20%3E%20(items)%20%3E%20(variant)%205">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20exports">Link to this property</a>

handlers: Optional\[List\[str]]

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

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20handlers">Link to this property</a>

has\_assets: Optional\[bool]

Whether a Worker contains assets.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20has_assets">Link to this property</a>

has\_modules: Optional\[bool]

Whether a Worker contains modules.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20has_modules">Link to this property</a>

last\_deployed\_from: Optional\[str]

The client most recently used to deploy this Worker.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20last_deployed_from">Link to this property</a>

logpush: Optional\[bool]

Whether Logpush is turned on for the Worker.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20logpush">Link to this property</a>

migration\_tag: Optional\[str]

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

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20migration_tag">Link to this property</a>

modified\_on: Optional\[datetime]

When the script was last modified.

formatdate-time

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

<details>

<summary>

named\_handlers: Optional\[List\[NamedHandler]]

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

</summary>

handlers: Optional\[List\[str]]

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

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20named_handlers%20%3E%20(items)%20%3E%20(property)%20handlers">Link to this property</a>

name: Optional\[str]

The name of the export.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20named_handlers%20%3E%20(items)%20%3E%20(property)%20name">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20named_handlers">Link to this property</a>

<details>

<summary>

observability: Optional\[Observability]

Observability settings for the Worker.

</summary>

enabled: bool

Whether observability is enabled for the Worker.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20enabled">Link to this property</a>

head\_sampling\_rate: Optional\[float]

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

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20head_sampling_rate">Link to this property</a>

<details>

<summary>

issues: Optional\[ObservabilityIssues]

Real-time Issues settings for the Worker.

</summary>

enabled: Optional\[bool]

Whether real-time Issues are enabled for the Worker.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20issues%20%3E%20(property)%20enabled">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20issues">Link to this property</a>

<details>

<summary>

logs: Optional\[ObservabilityLogs]

Log settings for the Worker.

</summary>

enabled: bool

Whether logs are enabled for the Worker.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20logs%20%3E%20(property)%20enabled">Link to this property</a>

invocation\_logs: bool

Whether <a href="https://developers.cloudflare.com/workers/observability/logs/workers-logs/#invocation-logs">invocation logs</a> are enabled for the Worker.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20logs%20%3E%20(property)%20invocation_logs">Link to this property</a>

destinations: Optional\[List\[str]]

A list of destinations where logs will be exported to.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20logs%20%3E%20(property)%20destinations">Link to this property</a>

head\_sampling\_rate: Optional\[float]

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

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20logs%20%3E%20(property)%20head_sampling_rate">Link to this property</a>

persist: Optional\[bool]

Whether log persistence is enabled for the Worker.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20logs%20%3E%20(property)%20persist">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20logs">Link to this property</a>

redact\_query\_string: Optional\[bool]

Whether query strings are removed from request URLs in logs and traces.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20redact_query_string">Link to this property</a>

<details>

<summary>

traces: Optional\[ObservabilityTraces]

Trace settings for the Worker.

</summary>

destinations: Optional\[List\[str]]

A list of destinations where traces will be exported to.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20traces%20%3E%20(property)%20destinations">Link to this property</a>

enabled: Optional\[bool]

Whether traces are enabled for the Worker.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20traces%20%3E%20(property)%20enabled">Link to this property</a>

head\_sampling\_rate: Optional\[float]

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

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20traces%20%3E%20(property)%20head_sampling_rate">Link to this property</a>

persist: Optional\[bool]

Whether trace persistence is enabled for the Worker.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20traces%20%3E%20(property)%20persist">Link to this property</a>

<details>

<summary>

propagation\_policy: Optional\[Literal\["authenticated", "accept"]]

Controls how inbound trace context (traceparent/tracestate) headers on incoming requests are handled. “authenticated” honors inbound trace context only when accompanied by a valid trace auth token. “accept” unconditionally accepts inbound trace context. Requires the trace propagation feature to be enabled. Returns null when the trace propagation feature is not enabled for the account.

</summary>

One of the following:

"authenticated"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20traces%20%3E%20(property)%20propagation_policy%20%3E%20(member)%200">Link to this property</a>

"accept"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20traces%20%3E%20(property)%20propagation_policy%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20traces%20%3E%20(property)%20propagation_policy">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability%20%3E%20(property)%20traces">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20observability">Link to this property</a>

<details>

<summary>

placement: Optional\[Placement]

Configuration for <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>. Specify mode=‘smart’ for Smart Placement, or one of region/hostname/host.

</summary>

One of the following:

<details>

<summary>

class PlacementUnionMember0: …

</summary>

mode: Literal\["smart"]

Enables <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%200%20%3E%20(property)%20mode">Link to this property</a>

last\_analyzed\_at: Optional\[datetime]

The last time the script was analyzed for <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

formatdate-time

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%200%20%3E%20(property)%20last_analyzed_at">Link to this property</a>

<details>

<summary>

status: Optional\[Literal\["SUCCESS", "UNSUPPORTED\_APPLICATION", "INSUFFICIENT\_INVOCATIONS"]]

Status of <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

</summary>

One of the following:

"SUCCESS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%200%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"UNSUPPORTED\_APPLICATION"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%200%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"INSUFFICIENT\_INVOCATIONS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%200%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%200%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

class PlacementUnionMember1: …

</summary>

region: str

Cloud region for targeted placement in format ‘provider:region’.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%201%20%3E%20(property)%20region">Link to this property</a>

last\_analyzed\_at: Optional\[datetime]

The last time the script was analyzed for <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

formatdate-time

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%201%20%3E%20(property)%20last_analyzed_at">Link to this property</a>

<details>

<summary>

status: Optional\[Literal\["SUCCESS", "UNSUPPORTED\_APPLICATION", "INSUFFICIENT\_INVOCATIONS"]]

Status of <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

</summary>

One of the following:

"SUCCESS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%201%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"UNSUPPORTED\_APPLICATION"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%201%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"INSUFFICIENT\_INVOCATIONS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%201%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%201%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%201">Link to this property</a>

<details>

<summary>

class PlacementUnionMember2: …

</summary>

hostname: str

HTTP hostname for targeted placement.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%202%20%3E%20(property)%20hostname">Link to this property</a>

last\_analyzed\_at: Optional\[datetime]

The last time the script was analyzed for <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

formatdate-time

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%202%20%3E%20(property)%20last_analyzed_at">Link to this property</a>

<details>

<summary>

status: Optional\[Literal\["SUCCESS", "UNSUPPORTED\_APPLICATION", "INSUFFICIENT\_INVOCATIONS"]]

Status of <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

</summary>

One of the following:

"SUCCESS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%202%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"UNSUPPORTED\_APPLICATION"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%202%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"INSUFFICIENT\_INVOCATIONS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%202%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%202%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%202">Link to this property</a>

<details>

<summary>

class PlacementUnionMember3: …

</summary>

host: str

TCP host and port for targeted placement.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%203%20%3E%20(property)%20host">Link to this property</a>

last\_analyzed\_at: Optional\[datetime]

The last time the script was analyzed for <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

formatdate-time

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%203%20%3E%20(property)%20last_analyzed_at">Link to this property</a>

<details>

<summary>

status: Optional\[Literal\["SUCCESS", "UNSUPPORTED\_APPLICATION", "INSUFFICIENT\_INVOCATIONS"]]

Status of <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

</summary>

One of the following:

"SUCCESS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%203%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"UNSUPPORTED\_APPLICATION"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%203%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"INSUFFICIENT\_INVOCATIONS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%203%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%203%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%203">Link to this property</a>

<details>

<summary>

class PlacementUnionMember4: …

</summary>

mode: Literal\["targeted"]

Targeted placement mode.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%204%20%3E%20(property)%20mode">Link to this property</a>

region: str

Cloud region for targeted placement in format ‘provider:region’.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%204%20%3E%20(property)%20region">Link to this property</a>

last\_analyzed\_at: Optional\[datetime]

The last time the script was analyzed for <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

formatdate-time

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%204%20%3E%20(property)%20last_analyzed_at">Link to this property</a>

<details>

<summary>

status: Optional\[Literal\["SUCCESS", "UNSUPPORTED\_APPLICATION", "INSUFFICIENT\_INVOCATIONS"]]

Status of <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

</summary>

One of the following:

"SUCCESS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%204%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"UNSUPPORTED\_APPLICATION"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%204%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"INSUFFICIENT\_INVOCATIONS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%204%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%204%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%204">Link to this property</a>

<details>

<summary>

class PlacementUnionMember5: …

</summary>

hostname: str

HTTP hostname for targeted placement.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%205%20%3E%20(property)%20hostname">Link to this property</a>

mode: Literal\["targeted"]

Targeted placement mode.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%205%20%3E%20(property)%20mode">Link to this property</a>

last\_analyzed\_at: Optional\[datetime]

The last time the script was analyzed for <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

formatdate-time

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%205%20%3E%20(property)%20last_analyzed_at">Link to this property</a>

<details>

<summary>

status: Optional\[Literal\["SUCCESS", "UNSUPPORTED\_APPLICATION", "INSUFFICIENT\_INVOCATIONS"]]

Status of <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

</summary>

One of the following:

"SUCCESS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%205%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"UNSUPPORTED\_APPLICATION"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%205%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"INSUFFICIENT\_INVOCATIONS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%205%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%205%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%205">Link to this property</a>

<details>

<summary>

class PlacementUnionMember6: …

</summary>

host: str

TCP host and port for targeted placement.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%206%20%3E%20(property)%20host">Link to this property</a>

mode: Literal\["targeted"]

Targeted placement mode.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%206%20%3E%20(property)%20mode">Link to this property</a>

last\_analyzed\_at: Optional\[datetime]

The last time the script was analyzed for <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

formatdate-time

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%206%20%3E%20(property)%20last_analyzed_at">Link to this property</a>

<details>

<summary>

status: Optional\[Literal\["SUCCESS", "UNSUPPORTED\_APPLICATION", "INSUFFICIENT\_INVOCATIONS"]]

Status of <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

</summary>

One of the following:

"SUCCESS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%206%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"UNSUPPORTED\_APPLICATION"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%206%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"INSUFFICIENT\_INVOCATIONS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%206%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%206%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%206">Link to this property</a>

<details>

<summary>

class PlacementUnionMember7: …

</summary>

mode: Literal\["targeted"]

Targeted placement mode.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%207%20%3E%20(property)%20mode">Link to this property</a>

<details>

<summary>

target: List\[PlacementUnionMember7Target]

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

</summary>

One of the following:

<details>

<summary>

class PlacementUnionMember7TargetRegion: …

</summary>

region: str

Cloud region in format ‘provider:region’.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%207%20%3E%20(property)%20target%20%3E%20(items)%20%3E%20(variant)%200%20%3E%20(property)%20region">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%207%20%3E%20(property)%20target%20%3E%20(items)%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

class PlacementUnionMember7TargetHostname: …

</summary>

hostname: str

HTTP hostname for targeted placement.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%207%20%3E%20(property)%20target%20%3E%20(items)%20%3E%20(variant)%201%20%3E%20(property)%20hostname">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%207%20%3E%20(property)%20target%20%3E%20(items)%20%3E%20(variant)%201">Link to this property</a>

<details>

<summary>

class PlacementUnionMember7TargetHost: …

</summary>

host: str

TCP host:port for targeted placement.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%207%20%3E%20(property)%20target%20%3E%20(items)%20%3E%20(variant)%202%20%3E%20(property)%20host">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%207%20%3E%20(property)%20target%20%3E%20(items)%20%3E%20(variant)%202">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%207%20%3E%20(property)%20target">Link to this property</a>

last\_analyzed\_at: Optional\[datetime]

The last time the script was analyzed for <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

formatdate-time

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%207%20%3E%20(property)%20last_analyzed_at">Link to this property</a>

<details>

<summary>

status: Optional\[Literal\["SUCCESS", "UNSUPPORTED\_APPLICATION", "INSUFFICIENT\_INVOCATIONS"]]

Status of <a href="https://developers.cloudflare.com/workers/configuration/smart-placement">Smart Placement</a>.

</summary>

One of the following:

"SUCCESS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%207%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"UNSUPPORTED\_APPLICATION"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%207%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"INSUFFICIENT\_INVOCATIONS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%207%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%207%20%3E%20(property)%20status">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement%20%3E%20(variant)%207">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement">Link to this property</a>

<details>

<summary>

Deprecatedplacement\_mode: Optional\[Literal\["smart", "targeted"]]

</summary>

One of the following:

"smart"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement_mode%20%3E%20(member)%200">Link to this property</a>

"targeted"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement_mode%20%3E%20(member)%201">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement_mode">Link to this property</a>

<details>

<summary>

Deprecatedplacement\_status: Optional\[Literal\["SUCCESS", "UNSUPPORTED\_APPLICATION", "INSUFFICIENT\_INVOCATIONS"]]

</summary>

One of the following:

"SUCCESS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement_status%20%3E%20(member)%200">Link to this property</a>

"UNSUPPORTED\_APPLICATION"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement_status%20%3E%20(member)%201">Link to this property</a>

"INSUFFICIENT\_INVOCATIONS"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement_status%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20placement_status">Link to this property</a>

<details>

<summary>

routes: Optional\[List\[Route]]

Routes associated with the Worker.

</summary>

id: str

Identifier.

maxLength32

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20routes%20%3E%20(items)%20%3E%20(property)%20id">Link to this property</a>

pattern: str

Pattern to match incoming requests against. <a href="https://developers.cloudflare.com/workers/configuration/routing/routes/#matching-behavior">Learn more</a>.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20routes%20%3E%20(items)%20%3E%20(property)%20pattern">Link to this property</a>

script: Optional\[str]

Name of the script to run if the route matches.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20routes%20%3E%20(items)%20%3E%20(property)%20script">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20routes">Link to this property</a>

tag: Optional\[str]

The immutable ID of the script.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20tag">Link to this property</a>

tags: Optional\[List\[str]]

Tags associated with the Worker.

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20tags">Link to this property</a>

<details>

<summary>

tail\_consumers: Optional\[List\[<a href="https://developers.cloudflare.com/api/python/resources/workers#(resource)%20workers.scripts.tail%20%3E%20(model)%20consumer_script%20%3E%20(schema)">ConsumerScript</a>]]

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

</summary>

service: str

Name of Worker that is to be the consumer.

<a href="#(resource)%20workers.scripts.tail%20%3E%20(model)%20consumer_script%20%3E%20(schema)%20%3E%20(property)%20service">Link to this property</a>

environment: Optional\[str]

Optional environment if the Worker utilizes one.

<a href="#(resource)%20workers.scripts.tail%20%3E%20(model)%20consumer_script%20%3E%20(schema)%20%3E%20(property)%20environment">Link to this property</a>

namespace: Optional\[str]

Optional dispatch namespace the script belongs to.

<a href="#(resource)%20workers.scripts.tail%20%3E%20(model)%20consumer_script%20%3E%20(schema)%20%3E%20(property)%20namespace">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20tail_consumers">Link to this property</a>

<details>

<summary>

usage\_model: Optional\[Literal\["standard", "bundled", "unbound"]]

Usage model for the Worker invocations.

</summary>

One of the following:

"standard"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20usage_model%20%3E%20(member)%200">Link to this property</a>

"bundled"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20usage_model%20%3E%20(member)%201">Link to this property</a>

"unbound"

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20usage_model%20%3E%20(member)%202">Link to this property</a>

</details>

<a href="#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)%20%3E%20(property)%20usage_model">Link to this property</a>

</details>

[Link to this property](<#(resource)%20workers.scripts%20%3E%20(model)%20script_list_response%20%3E%20(schema)>)

### List Worker Scripts

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
page = client.workers.scripts.list(
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
page = page.result[0]
print(page.id)
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": "my-workers-script",
      "cache_options": {
        "enabled": true,
        "cross_version_cache": true
      },
      "compatibility_date": "2021-01-01T00:00:00Z",
      "compatibility_flags": [
        "nodejs_compat"
      ],
      "created_on": "2017-01-01T00:00:00Z",
      "etag": "ea95132c15732412d22c1476fa83f27a",
      "exports": {
        "Admin": {
          "type": "worker",
          "cache": {
            "enabled": true
          },
          "state": "created"
        },
        "Counter": {
          "storage": "sqlite",
          "type": "durable-object",
          "container": "my-container",
          "state": "created"
        },
        "OldCounter": {
          "state": "renamed",
          "type": "durable-object"
        },
        "default": {
          "type": "worker",
          "cache": {
            "enabled": false
          },
          "state": "created"
        }
      },
      "handlers": [
        "fetch",
        "scheduled"
      ],
      "has_assets": false,
      "has_modules": false,
      "last_deployed_from": "wrangler",
      "logpush": false,
      "migration_tag": "v1",
      "modified_on": "2017-01-01T00:00:00Z",
      "named_handlers": [
        {
          "handlers": [
            "class"
          ],
          "name": "MyDurableObject"
        }
      ],
      "observability": {
        "enabled": true,
        "head_sampling_rate": 0.1,
        "issues": {
          "enabled": true
        },
        "logs": {
          "enabled": true,
          "invocation_logs": true,
          "destinations": [
            "cloudflare"
          ],
          "head_sampling_rate": 0.1,
          "persist": true
        },
        "redact_query_string": false,
        "traces": {
          "destinations": [
            "cloudflare"
          ],
          "enabled": true,
          "head_sampling_rate": 0.1,
          "persist": true,
          "propagation_policy": "authenticated"
        }
      },
      "placement": {
        "mode": "smart",
        "last_analyzed_at": "2025-01-01T00:00:00Z",
        "status": "SUCCESS"
      },
      "placement_mode": "smart",
      "placement_status": "SUCCESS",
      "routes": [
        {
          "id": "023e105f4ecef8ad9ca31a8372d0c353",
          "pattern": "example.com/*",
          "script": "my-workers-script"
        }
      ],
      "tag": "e8f70fdbc8b1fb0b8ddb1af166186758",
      "tags": [
        "my-team",
        "my-public-api"
      ],
      "tail_consumers": [
        {
          "service": "my-log-consumer",
          "environment": "production",
          "namespace": "my-namespace"
        }
      ],
      "usage_model": "standard"
    }
  ],
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": "my-workers-script",
      "cache_options": {
        "enabled": true,
        "cross_version_cache": true
      },
      "compatibility_date": "2021-01-01T00:00:00Z",
      "compatibility_flags": [
        "nodejs_compat"
      ],
      "created_on": "2017-01-01T00:00:00Z",
      "etag": "ea95132c15732412d22c1476fa83f27a",
      "exports": {
        "Admin": {
          "type": "worker",
          "cache": {
            "enabled": true
          },
          "state": "created"
        },
        "Counter": {
          "storage": "sqlite",
          "type": "durable-object",
          "container": "my-container",
          "state": "created"
        },
        "OldCounter": {
          "state": "renamed",
          "type": "durable-object"
        },
        "default": {
          "type": "worker",
          "cache": {
            "enabled": false
          },
          "state": "created"
        }
      },
      "handlers": [
        "fetch",
        "scheduled"
      ],
      "has_assets": false,
      "has_modules": false,
      "last_deployed_from": "wrangler",
      "logpush": false,
      "migration_tag": "v1",
      "modified_on": "2017-01-01T00:00:00Z",
      "named_handlers": [
        {
          "handlers": [
            "class"
          ],
          "name": "MyDurableObject"
        }
      ],
      "observability": {
        "enabled": true,
        "head_sampling_rate": 0.1,
        "issues": {
          "enabled": true
        },
        "logs": {
          "enabled": true,
          "invocation_logs": true,
          "destinations": [
            "cloudflare"
          ],
          "head_sampling_rate": 0.1,
          "persist": true
        },
        "redact_query_string": false,
        "traces": {
          "destinations": [
            "cloudflare"
          ],
          "enabled": true,
          "head_sampling_rate": 0.1,
          "persist": true,
          "propagation_policy": "authenticated"
        }
      },
      "placement": {
        "mode": "smart",
        "last_analyzed_at": "2025-01-01T00:00:00Z",
        "status": "SUCCESS"
      },
      "placement_mode": "smart",
      "placement_status": "SUCCESS",
      "routes": [
        {
          "id": "023e105f4ecef8ad9ca31a8372d0c353",
          "pattern": "example.com/*",
          "script": "my-workers-script"
        }
      ],
      "tag": "e8f70fdbc8b1fb0b8ddb1af166186758",
      "tags": [
        "my-team",
        "my-public-api"
      ],
      "tail_consumers": [
        {
          "service": "my-log-consumer",
          "environment": "production",
          "namespace": "my-namespace"
        }
      ],
      "usage_model": "standard"
    }
  ],
  "success": true
}
```