Get Script Content (Workers for Platforms)

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

/accounts/{account_identifier}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content

get

Workers for Platforms

namespace-worker-get-script-content

Debug "planAvailability"

null

Debug "tokenPermissions"

{
  "enum": [
    "com.cloudflare.edge.worker.script.read"
  ]
}

Debug "parameters"

[
  {
    "in": "path",
    "name": "account_identifier",
    "required": true,
    "schema": {
      "description": "Identifier",
      "example": "023e105f4ecef8ad9ca31a8372d0c353",
      "maxLength": 32,
      "readOnly": true,
      "type": "string"
    }
  },
  {
    "in": "path",
    "name": "dispatch_namespace",
    "required": true,
    "schema": {
      "description": "Name of the Workers for Platforms dispatch namespace.",
      "example": "my-dispatch-namespace",
      "pattern": "^.+$",
      "type": "string"
    }
  },
  {
    "in": "path",
    "name": "script_name",
    "required": true,
    "schema": {
      "description": "Name of the script, used in URLs and route configuration.",
      "example": "this-is_my_script-01",
      "pattern": "^[a-z0-9_][a-z0-9-_]*$",
      "type": "string"
    }
  }
]

Debug "requestBody"

null

Debug "responses"

{
  "200": {
    "content": {
      "string": {
        "schema": {
          "example": "addEventListener('fetch', event => { event.respondWith(fetch(event.request)) })"
        }
      }
    },
    "description": "Fetch script content (Workers for Platforms)"
  },
  "4XX": {
    "content": {
      "application/json": {
        "schema": {
          "properties": {
            "errors": {
              "example": [],
              "items": {
                "properties": {
                  "code": {
                    "minimum": 1000,
                    "type": "integer"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "type": "object",
                "uniqueItems": true
              },
              "type": "array"
            },
            "messages": {
              "example": [],
              "items": {
                "properties": {
                  "code": {
                    "minimum": 1000,
                    "type": "integer"
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "type": "object",
                "uniqueItems": true
              },
              "type": "array"
            },
            "result": {
              "anyOf": [
                {
                  "type": "object"
                },
                {
                  "items": {},
                  "type": "array"
                },
                {
                  "type": "string"
                }
              ]
            },
            "success": {
              "description": "Whether the API call was successful",
              "enum": [
                true
              ],
              "example": true,
              "type": "boolean"
            }
          },
          "required": [
            "success",
            "errors",
            "messages",
            "result"
          ],
          "type": "object"
        }
      }
    },
    "description": "Fetch script content failure (Workers for Platforms)"
  }
}

Debug "security"

[
  {
    "api_token": []
  },
  {
    "api_email": [],
    "api_key": []
  }
]