Worker Details (Workers for Platforms)

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

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

get

Workers for Platforms

namespace-worker-script-worker-details

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": {
      "application/json": {
        "schema": {
          "description": "Details about a worker uploaded to a Workers for Platforms namespace.",
          "properties": {
            "created_on": {
              "description": "When the script was created.",
              "example": "2017-01-01T00:00:00Z",
              "format": "date-time",
              "readOnly": true,
              "type": "string"
            },
            "dispatch_namespace": {
              "description": "Name of the Workers for Platforms dispatch namespace.",
              "example": "my-dispatch-namespace",
              "pattern": "^.+$",
              "type": "string"
            },
            "modified_on": {
              "description": "When the script was last modified.",
              "example": "2017-01-01T00:00:00Z",
              "format": "date-time",
              "readOnly": true,
              "type": "string"
            },
            "script": {
              "properties": {
                "created_on": {
                  "description": "When the script was created.",
                  "example": "2017-01-01T00:00:00Z",
                  "format": "date-time",
                  "readOnly": true,
                  "type": "string"
                },
                "etag": {
                  "description": "Hashed script content, can be used in a If-None-Match header when updating.",
                  "example": "ea95132c15732412d22c1476fa83f27a",
                  "readOnly": true,
                  "type": "string"
                },
                "id": {
                  "description": "The id of the script in the Workers system. Usually the script name.",
                  "example": "my-workers-script",
                  "readOnly": true,
                  "type": "string"
                },
                "logpush": {
                  "description": "Whether Logpush is turned on for the Worker.",
                  "example": false,
                  "type": "boolean"
                },
                "modified_on": {
                  "description": "When the script was last modified.",
                  "example": "2017-01-01T00:00:00Z",
                  "format": "date-time",
                  "readOnly": true,
                  "type": "string"
                },
                "pipeline_hash": {
                  "description": "Deprecated. Deployment metadata for internal usage.",
                  "example": "ea95132c15732412d22c1476fa83f27a",
                  "readOnly": true,
                  "type": "string"
                },
                "placement_mode": {
                  "description": "Specifies the placement mode for the Worker (e.g. 'smart').",
                  "example": "smart",
                  "type": "string"
                },
                "tail_consumers": {
                  "description": "List of Workers that will consume logs from the attached Worker.",
                  "items": {
                    "description": "A reference to a script that will consume logs from the attached Worker.",
                    "properties": {
                      "environment": {
                        "description": "Optional environment if the Worker utilizes one.",
                        "example": "production",
                        "type": "string"
                      },
                      "namespace": {
                        "description": "Optional dispatch namespace the script belongs to.",
                        "example": "my-namespace",
                        "type": "string"
                      },
                      "service": {
                        "description": "Name of Worker that is to be the consumer.",
                        "example": "my-log-consumer",
                        "type": "string"
                      }
                    },
                    "required": [
                      "service"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "usage_model": {
                  "description": "Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound').",
                  "example": "unbound",
                  "pattern": "^(bundled|unbound)$",
                  "type": "string"
                }
              }
            }
          },
          "type": "object"
        }
      }
    },
    "description": "Worker Details Response (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": "Worker Details Failure (Workers for Platforms)"
  }
}

Debug "security"

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