List Workers for Platforms Dispatch Namespaces

GET/accounts/{account_id}/workers/dispatch/namespaces

Fetch a list of Workers for Platforms dispatch namespaces.

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

P ath ParametersExpand Collapse

account_id: string

Identifier.

maxLength32

Link to this property

ReturnsExpand Collapse

<details>

<summary>

errors: array of object {code, message, documentation_url, source }

</summary>

code: number

minimum1000

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation_url: optional string

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source: optional object {pointer }

</summary>

pointer: optional string

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

Link to this property

<details>

<summary>

messages: array of object {code, message, documentation_url, source }

</summary>

code: number

minimum1000

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

message: string

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

documentation_url: optional string

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20documentation_url">Link to this property</a>

<details>

<summary>

source: optional object {pointer }

</summary>

pointer: optional string

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

Link to this property

success: true

Whether the API call was successful.

Link to this property

<details>

<summary>

result: optional array of object {created_by, created_on, modified_by, 5 more }

</summary>

created_by: optional string

Identifier.

maxLength32

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(model)%20namespace_list_response%20%3E%20(schema)%20%3E%20(property)%20created_by">Link to this property</a>

created_on: optional string

When the script was created.

formatdate-time

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(model)%20namespace_list_response%20%3E%20(schema)%20%3E%20(property)%20created_on">Link to this property</a>

modified_by: optional string

Identifier.

maxLength32

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(model)%20namespace_list_response%20%3E%20(schema)%20%3E%20(property)%20modified_by">Link to this property</a>

modified_on: optional string

When the script was last modified.

formatdate-time

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(model)%20namespace_list_response%20%3E%20(schema)%20%3E%20(property)%20modified_on">Link to this property</a>

namespace_id: optional string

API Resource UUID tag.

maxLength36

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(model)%20namespace_list_response%20%3E%20(schema)%20%3E%20(property)%20namespace_id">Link to this property</a>

namespace_name: optional string

Name of the Workers for Platforms dispatch namespace.

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(model)%20namespace_list_response%20%3E%20(schema)%20%3E%20(property)%20namespace_name">Link to this property</a>

script_count: optional number

The current number of scripts in this Dispatch Namespace.

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(model)%20namespace_list_response%20%3E%20(schema)%20%3E%20(property)%20script_count">Link to this property</a>

trusted_workers: optional boolean

Whether the Workers in the namespace are executed in a “trusted” manner. When a Worker is trusted, it has access to the shared caches for the zone in the Cache API, and has access to the <code>request.cf</code> object on incoming Requests. When a Worker is untrusted, caches are not shared across the zone, and <code>request.cf</code> is undefined. By default, Workers in a namespace are “untrusted”.

<a href="#(resource)%20workers_for_platforms.dispatch.namespaces%20%3E%20(model)%20namespace_list_response%20%3E%20(schema)%20%3E%20(property)%20trusted_workers">Link to this property</a>

</details>

Link to this property

List Workers for Platforms Dispatch Namespaces

HTTP

HTTPTypeScriptPythonGoTerraform

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/workers/dispatch/namespaces \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"

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"
      }
    }
  ],
  "success": true,
  "result": [
    {
      "created_by": "023e105f4ecef8ad9ca31a8372d0c353",
      "created_on": "2017-01-01T00:00:00Z",
      "modified_by": "023e105f4ecef8ad9ca31a8372d0c353",
      "modified_on": "2017-01-01T00:00:00Z",
      "namespace_id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
      "namespace_name": "my-dispatch-namespace",
      "script_count": 800,
      "trusted_workers": false
    }
  ]
}
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"
      }
    }
  ],
  "success": true,
  "result": [
    {
      "created_by": "023e105f4ecef8ad9ca31a8372d0c353",
      "created_on": "2017-01-01T00:00:00Z",
      "modified_by": "023e105f4ecef8ad9ca31a8372d0c353",
      "modified_on": "2017-01-01T00:00:00Z",
      "namespace_id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
      "namespace_name": "my-dispatch-namespace",
      "script_count": 800,
      "trusted_workers": false
    }
  ]
}


description: Extend Cloudflare security and performance to your customers' custom hostnames. title: Cloudflare for SaaS image: https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/og.png?v=1cae88690936ca7d


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/cloudflare-for-platforms/llms.txt
Use this file to discover all available pages before exploring further.