openapi: 3.0.0 info: version: 2015-07-09 x-release: v4 title: APIs.io Engineering Platform Amazon API Gateway 2014 11 13 Workers for Platforms API description: Amazon API Gateway

Amazon API Gateway helps developers deliver robust, secure, and scalable mobile and web application back ends. API Gateway allows developers to securely connect mobile and web applications to APIs that run on AWS Lambda, Amazon EC2, or other publicly addressable web services that are hosted outside of AWS.

x-logo: url: https://api.apis.guru/v2/cache/logo/https_twitter.com_awscloud_profile_image.png backgroundColor: '#FFFFFF' termsOfService: https://aws.amazon.com/service-terms/ contact: name: Mike Ralphson email: mike.ralphson@gmail.com url: https://github.com/mermade/aws2openapi x-twitter: PermittedSoc license: name: Apache 2.0 License url: http://www.apache.org/licenses/ x-providerName: amazonaws.com x-serviceName: apigateway x-origin: - contentType: application/json url: https://raw.githubusercontent.com/aws/aws-sdk-js/master/apis/apigateway-2015-07-09.normal.json converter: url: https://github.com/mermade/aws2openapi version: 1.0.0 x-apisguru-driver: external x-apiClientRegistration: url: https://portal.aws.amazon.com/gp/aws/developer/registration/index.html?nc2=h_ct x-apisguru-categories: - cloud x-preferred: true servers: - url: http://apigateway.{region}.amazonaws.com variables: region: description: The AWS region enum: - us-east-1 - us-east-2 - us-west-1 - us-west-2 - us-gov-west-1 - us-gov-east-1 - ca-central-1 - eu-north-1 - eu-west-1 - eu-west-2 - eu-west-3 - eu-central-1 - eu-south-1 - af-south-1 - ap-northeast-1 - ap-northeast-2 - ap-northeast-3 - ap-southeast-1 - ap-southeast-2 - ap-east-1 - ap-south-1 - sa-east-1 - me-south-1 default: us-east-1 description: The Amazon API Gateway multi-region endpoint - url: https://apigateway.{region}.amazonaws.com variables: region: description: The AWS region enum: - us-east-1 - us-east-2 - us-west-1 - us-west-2 - us-gov-west-1 - us-gov-east-1 - ca-central-1 - eu-north-1 - eu-west-1 - eu-west-2 - eu-west-3 - eu-central-1 - eu-south-1 - af-south-1 - ap-northeast-1 - ap-northeast-2 - ap-northeast-3 - ap-southeast-1 - ap-southeast-2 - ap-east-1 - ap-south-1 - sa-east-1 - me-south-1 default: us-east-1 description: The Amazon API Gateway multi-region endpoint - url: http://apigateway.{region}.amazonaws.com.cn variables: region: description: The AWS region enum: - cn-north-1 - cn-northwest-1 default: cn-north-1 description: The Amazon API Gateway endpoint for China (Beijing) and China (Ningxia) - url: https://apigateway.{region}.amazonaws.com.cn variables: region: description: The AWS region enum: - cn-north-1 - cn-northwest-1 default: cn-north-1 description: The Amazon API Gateway endpoint for China (Beijing) and China (Ningxia) security: - hmac: [] tags: - name: Workers for Platforms paths: /accounts/{account_id}/workers/dispatch/namespaces: get: description: Fetch a list of Workers for Platforms namespaces. operationId: namespace-worker-list parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: Failure to get list of Workers for Platforms namespaces. '200': content: application/json: schema: $ref: '#/components/schemas/workers_namespace-list-response' description: Fetch a list of Workers for Platforms namespaces. security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform List dispatch namespaces tags: - Workers for Platforms x-api-token-group: - Workers Tail Read - Workers Scripts Write - Workers Scripts Read x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.read post: description: Create a new Workers for Platforms namespace. operationId: namespace-worker-create parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' requestBody: content: application/json: schema: properties: name: description: The name of the dispatch namespace example: my-dispatch-namespace type: string type: object required: true responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: Failure to get list of Workers for Platforms namespaces. '200': content: application/json: schema: $ref: '#/components/schemas/workers_namespace-single-response' description: Fetch a list of Workers for Platforms namespaces. security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Create dispatch namespace tags: - Workers for Platforms x-api-token-group: - Workers Scripts Write x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.create /accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}: delete: description: Delete a Workers for Platforms namespace. operationId: namespace-worker-delete-namespace parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: Failure to delete Workers for Platforms namespace. '200': content: application/json: schema: $ref: '#/components/schemas/workers_namespace-delete-response' description: Delete a Workers for Platforms namespace. security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Delete dispatch namespace tags: - Workers for Platforms x-api-token-group: - Workers Scripts Write x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.delete get: description: Get a Workers for Platforms namespace. operationId: namespace-worker-get-namespace parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: Failure to get Workers for Platforms namespace. '200': content: application/json: schema: $ref: '#/components/schemas/workers_namespace-single-response' description: Get a Workers for Platforms namespace. security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Get dispatch namespace tags: - Workers for Platforms x-api-token-group: - Workers Tail Read - Workers Scripts Write - Workers Scripts Read x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.read /accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}: delete: description: Delete a worker from a Workers for Platforms namespace. This call has no response body on a successful delete. operationId: namespace-worker-script-delete-worker parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' - description: If set to true, delete will not be stopped by associated service binding, durable object, or other binding. Any of these associated bindings/durable objects will be deleted along with the script. in: query name: force schema: type: boolean requestBody: content: application/json: {} required: true responses: 4XX: content: application/json: {} description: Delete Worker response failure '200': content: application/json: {} description: Delete Worker response security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Delete Worker tags: - Workers for Platforms x-api-token-group: - Workers Scripts Write x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.delete get: description: Fetch information about a script uploaded to a Workers for Platforms namespace. operationId: namespace-worker-script-worker-details parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: Worker Details Failure (Workers for Platforms) '200': content: application/json: schema: $ref: '#/components/schemas/workers_namespace-script-response-single' description: Worker Details Response (Workers for Platforms) security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Worker Details tags: - Workers for Platforms x-api-token-group: - Workers Tail Read - Workers Scripts Write - Workers Scripts Read x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.read put: description: '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/.' operationId: namespace-worker-script-upload-worker-module parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' requestBody: $ref: '#/components/requestBodies/workers_script_upload' responses: 4XX: $ref: '#/components/responses/workers_4XX' '200': $ref: '#/components/responses/workers_200' security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Upload Worker Module tags: - Workers for Platforms x-api-token-group: - Workers Scripts Write x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.create /accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/bindings: get: description: Fetch script bindings from a script uploaded to a Workers for Platforms namespace. operationId: namespace-worker-get-script-bindings parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: Fetch script bindings failure (Workers for Platforms) '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: $ref: '#/components/schemas/workers_bindings' description: Fetch script bindings (Workers for Platforms) security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Get Script Bindings tags: - Workers for Platforms x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.read /accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content: get: description: Fetch script content from a script uploaded to a Workers for Platforms namespace. operationId: namespace-worker-get-script-content parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: Get script content failure '200': content: string: schema: example: "export default {\n fetch(req) {\n return new Response(\"Hello, World!\")\n }\n}\n" description: Get script content security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Get Script Content tags: - Workers for Platforms x-api-token-group: - Workers Tail Read - Workers Scripts Write - Workers Scripts Read x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.read put: description: Put script content for a script uploaded to a Workers for Platforms namespace. operationId: namespace-worker-put-script-content parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' - description: The multipart name of a script upload part containing script content in service worker format. Alternative to including in a metadata part. in: header name: CF-WORKER-BODY-PART schema: type: string - description: The multipart name of a script upload part containing script content in es module format. Alternative to including in a metadata part. in: header name: CF-WORKER-MAIN-MODULE-PART schema: type: string requestBody: content: multipart/form-data: encoding: : contentType: application/javascript+module, text/javascript+module, application/javascript, text/javascript, application/wasm, text/plain, application/octet-stream, application/source-map schema: properties: : description: A module comprising a Worker script, often a javascript file. Multiple modules may be provided as separate named parts, but at least one module must be present. This should be referenced either in the metadata as `main_module` (esm)/`body_part` (service worker) or as a header `CF-WORKER-MAIN-MODULE-PART` (esm) /`CF-WORKER-BODY-PART` (service worker) by part name. Source maps may also be included using the `application/source-map` content type. items: format: binary type: string type: array metadata: description: JSON encoded metadata about the uploaded parts and Worker configuration. properties: body_part: description: Name of the part in the multipart request that contains the script (e.g. the file adding a listener to the `fetch` event). Indicates a `service worker syntax` Worker. example: worker.js type: string main_module: description: Name of the part in the multipart request that contains the main module (e.g. the file exporting a `fetch` handler). Indicates a `module syntax` Worker. example: worker.js type: string type: object type: object required: true responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: Put script content failure (Workers for Platforms) '200': content: application/json: schema: $ref: '#/components/schemas/workers_script-response-single' description: Put script content (Workers for Platforms) security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Put Script Content tags: - Workers for Platforms x-api-token-group: - Workers Scripts Write x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.create /accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/secrets: get: description: List secrets from a script uploaded to a Workers for Platforms namespace. operationId: namespace-worker-list-script-secrets parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: List script secrets failure '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: items: $ref: '#/components/schemas/workers_secret-response' type: array description: List script secrets security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform List Script Secrets tags: - Workers for Platforms x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.read put: description: Put secrets to a script uploaded to a Workers for Platforms namespace. operationId: namespace-worker-put-script-secrets parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' requestBody: content: application/json: schema: $ref: '#/components/schemas/workers_secret' required: true responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: Fetch script bindings failure (Workers for Platforms) '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: $ref: '#/components/schemas/workers_secret-response' description: Fetch script bindings (Workers for Platforms) security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Put Script Secrets tags: - Workers for Platforms x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.edit /accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/secrets/{secret_name}: get: description: Get secret from a script uploaded to a Workers for Platforms namespace. operationId: namespace-worker-get-script-secrets parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' - in: path name: secret_name required: true schema: $ref: '#/components/schemas/workers_secret_name' responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: Get script secret failure '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: $ref: '#/components/schemas/workers_secret-response' description: Get script secret security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Get Script Secret tags: - Workers for Platforms x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.read /accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/settings: get: description: Get script settings from a script uploaded to a Workers for Platforms namespace. operationId: namespace-worker-get-script-settings parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: Fetch script settings failure '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: $ref: '#/components/schemas/workers_script-and-version-settings-item' description: Fetch script settings security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Get Script Settings tags: - Workers for Platforms x-api-token-group: - Workers Tail Read - Workers Scripts Write - Workers Scripts Read x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.read patch: description: Patch script metadata, such as bindings operationId: namespace-worker-patch-script-settings parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' requestBody: content: multipart/form-data: schema: properties: settings: $ref: '#/components/schemas/workers_script-and-version-settings-item' type: object required: true responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: Patch script settings failure '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: $ref: '#/components/schemas/workers_script-and-version-settings-item' description: Patch script settings security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Patch Script Settings tags: - Workers for Platforms x-api-token-group: - Workers Scripts Write x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.create /accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/tags: get: description: Fetch tags from a script uploaded to a Workers for Platforms namespace. operationId: namespace-worker-get-script-tags parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: Fetch script tags failure '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: example: - free - customer items: $ref: '#/components/schemas/workers_tag' type: array description: Fetch script tags security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Get Script Tags tags: - Workers for Platforms x-api-token-group: - Workers Tail Read - Workers Scripts Write - Workers Scripts Read x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.read put: description: Put script tags for a script uploaded to a Workers for Platforms namespace. operationId: namespace-worker-put-script-tags parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' requestBody: content: application/json: schema: $ref: '#/components/schemas/workers_tags' required: true responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: Fetch script tags failure '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: example: - my-tag items: $ref: '#/components/schemas/workers_tag' type: array description: Fetch script tags security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Put Script Tags tags: - Workers for Platforms x-api-token-group: - Workers Scripts Write x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.edit /accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/tags/{tag}: delete: description: Delete script tag for a script uploaded to a Workers for Platforms namespace. operationId: namespace-worker-delete-script-tag parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' - in: path name: tag required: true schema: $ref: '#/components/schemas/workers_tag' responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: Delete script tag failure '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: enum: - null nullable: true type: object description: Delete script tag security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Delete Script Tag tags: - Workers for Platforms x-api-token-group: - Workers Scripts Write x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.edit put: description: Put a single tag on a script uploaded to a Workers for Platforms namespace. operationId: namespace-worker-put-script-tag parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: dispatch_namespace required: true schema: $ref: '#/components/schemas/workers_dispatch_namespace_name' - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' - in: path name: tag required: true schema: $ref: '#/components/schemas/workers_tag' responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/workers_api-response-common' description: Put script tag failure '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: enum: - null nullable: true type: object description: Put script tag security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Put Script Tag tags: - Workers for Platforms x-api-token-group: - Workers Scripts Write x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.read components: schemas: workers_binding_name: description: A JavaScript variable name for the binding. example: myBinding readOnly: true type: string workers_namespace-script-response: description: Details about a worker uploaded to a Workers for Platforms namespace. properties: created_on: $ref: '#/components/schemas/workers_created_on' dispatch_namespace: $ref: '#/components/schemas/workers_dispatch_namespace_name' modified_on: $ref: '#/components/schemas/workers_modified_on' script: $ref: '#/components/schemas/workers_script-response' type: object workers_api-response-single: allOf: - $ref: '#/components/schemas/workers_api-response-common' type: object workers_script-response-upload-single: allOf: - $ref: '#/components/schemas/workers_api-response-single' - properties: result: $ref: '#/components/schemas/workers_script-response-upload' x-cfLinkErrors: '10001': Unsupported or unexpected Content Type '10002': Unexpected internal server error '10003': Missing required URL parameter '10004': Malformed URL parameter '10006': Unparseable script body '10007': Resource not found (similar to HTTP 404) '10014': Internal error while attempting authorization checks '10015': The current account is not authorized to use workers '10018': Attempted to update a script where the e-tag does not match '10021': Script content failed validation checks, but was otherwise parseable '10023': Unauthorized access attempt '10027': Script body was too large '10075': Requires a Workers Paid plan workers_script_count: description: The current number of scripts in this Dispatch Namespace example: 800 type: integer workers_namespace-list-response: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: items: $ref: '#/components/schemas/workers_namespace-response' type: array workers_secret: properties: name: description: The name of this secret, this is what will be used to access it inside the Worker. example: MY_SECRET type: string text: description: The value of the secret. example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 type: string type: description: The type of secret to put. enum: - secret_text example: secret_text type: string type: object workers_dispatch_namespace_binding: properties: name: $ref: '#/components/schemas/workers_binding_name' namespace: description: Namespace to bind to example: my-namespace type: string outbound: description: Outbound worker properties: params: description: Pass information from the Dispatch Worker to the Outbound Worker through the parameters items: example: url type: string type: array worker: description: Outbound worker properties: environment: description: Environment of the outbound worker type: string service: description: Name of the outbound worker type: string type: object type: object type: description: The class of resource that the binding provides. enum: - dispatch_namespace example: dispatch_namespace type: string required: - name - type - namespace type: object workers_modified_on: description: When the script was last modified. example: '2017-01-01T00:00:00Z' format: date-time readOnly: true type: string workers_placement_config: properties: mode: description: Enables [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Only `"smart"` is currently supported enum: - smart type: string type: object workers_namespace-single-response: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: $ref: '#/components/schemas/workers_namespace-response' workers_created_on: description: When the script was created. example: '2017-01-01T00:00:00Z' format: date-time readOnly: true type: string workers_namespace-response: properties: created_by: $ref: '#/components/schemas/workers_identifier' created_on: $ref: '#/components/schemas/workers_created_on' modified_by: $ref: '#/components/schemas/workers_identifier' modified_on: $ref: '#/components/schemas/workers_modified_on' namespace_id: $ref: '#/components/schemas/workers_uuid' namespace_name: $ref: '#/components/schemas/workers_dispatch_namespace_name' script_count: $ref: '#/components/schemas/workers_script_count' workers_compatibility_flags: description: Opt your Worker into specific changes items: $ref: '#/components/schemas/workers_compatibility_flag' type: array workers_binding: description: A binding to allow the Worker to communicate with resources oneOf: - $ref: '#/components/schemas/workers_kv_namespace_binding' - $ref: '#/components/schemas/workers_service_binding' - $ref: '#/components/schemas/workers_do_binding' - $ref: '#/components/schemas/workers_r2_binding' - $ref: '#/components/schemas/workers_queue_binding' - $ref: '#/components/schemas/workers_d1_binding' - $ref: '#/components/schemas/workers_dispatch_namespace_binding' - $ref: '#/components/schemas/workers_mtls_cert_binding' type: object workers_tag: description: Tag to help you manage your Worker example: my-tag type: string workers_bindings: description: List of bindings attached to this Worker items: $ref: '#/components/schemas/workers_binding' type: array workers_namespace-delete-response: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: enum: - null nullable: true type: object workers_namespace_identifier: description: Namespace identifier tag. example: 0f2ac74b498b48028cb68387c421e279 maxLength: 32 readOnly: true type: string workers_secret_name: description: A JavaScript variable name for the secret binding. example: mySecret readOnly: true type: string workers_api-response-common: properties: errors: $ref: '#/components/schemas/workers_messages' messages: $ref: '#/components/schemas/workers_messages' success: description: Whether the API call was successful enum: - true example: true type: boolean required: - success - errors - messages type: object workers_script-response-single: allOf: - $ref: '#/components/schemas/workers_api-response-single' - properties: result: $ref: '#/components/schemas/workers_script-response' x-cfLinkErrors: '10001': Unsupported or unexpected Content Type '10002': Unexpected internal server error '10003': Missing required URL parameter '10004': Malformed URL parameter '10006': Unparseable script body '10007': Resource not found (similar to HTTP 404) '10014': Internal error while attempting authorization checks '10015': The current account is not authorized to use workers '10018': Attempted to update a script where the e-tag does not match '10021': Script content failed validation checks, but was otherwise parseable '10023': Unauthorized access attempt '10027': Script body was too large '10075': Requires a Workers Paid plan workers_script-and-version-settings-item: properties: bindings: $ref: '#/components/schemas/workers_bindings' compatibility_date: $ref: '#/components/schemas/workers_compatibility_date' compatibility_flags: $ref: '#/components/schemas/workers_compatibility_flags' limits: $ref: '#/components/schemas/workers_limits' logpush: $ref: '#/components/schemas/workers_logpush' migrations: description: 'Migrations to apply for Durable Objects associated with this Worker. ' oneOf: - $ref: '#/components/schemas/workers_single_step_migrations' - $ref: '#/components/schemas/workers_stepped_migrations' placement: $ref: '#/components/schemas/workers_placement_config' tags: $ref: '#/components/schemas/workers_tags' tail_consumers: $ref: '#/components/schemas/workers_tail_consumers' usage_model: $ref: '#/components/schemas/workers_usage_model' type: object workers_api-response-common-failure: properties: errors: allOf: - $ref: '#/components/schemas/workers_messages' example: - code: 7003 message: No route for the URI minLength: 1 messages: allOf: - $ref: '#/components/schemas/workers_messages' example: [] result: enum: - null nullable: true type: object success: description: Whether the API call was successful enum: - false example: false type: boolean required: - success - errors - messages - result type: object workers_compatibility_date: description: Opt your Worker into changes after this date example: '2022-04-05' type: string workers_migration_tag_conditions: properties: new_tag: description: Tag to set as the latest migration tag. example: v2 type: string old_tag: description: Tag used to verify against the latest migration tag for this Worker. If they don't match, the upload is rejected. example: v1 type: string type: object workers_migration_step: properties: deleted_classes: description: A list of classes to delete Durable Object namespaces from. items: type: string type: array new_classes: description: A list of classes to create Durable Object namespaces from. items: type: string type: array new_sqlite_classes: description: A list of classes to create Durable Object namespaces with SQLite from. items: type: string type: array renamed_classes: description: A list of classes with Durable Object namespaces that were renamed. items: properties: from: type: string to: type: string type: object type: array transferred_classes: description: A list of transfers for Durable Object namespaces from a different Worker and class to a class defined in this Worker. items: properties: from: type: string from_script: type: string to: type: string type: object type: array type: object workers_dispatch_namespace_name: description: Name of the Workers for Platforms dispatch namespace. example: my-dispatch-namespace pattern: ^.+$ type: string workers_usage_model: description: Specifies the usage model for the Worker (e.g. 'bundled' or 'unbound'). example: unbound pattern: ^(bundled|unbound)$ type: string workers_etag: description: Hashed script content, can be used in a If-None-Match header when updating. example: ea95132c15732412d22c1476fa83f27a readOnly: true type: string workers_queue_binding: properties: name: $ref: '#/components/schemas/workers_binding_name' queue_name: description: Name of the Queue to bind to example: my-queue type: string type: description: The class of resource that the binding provides. enum: - queue example: queue type: string required: - name - type - queue_name type: object workers_tail_consumers: description: List of Workers that will consume logs from the attached Worker. items: $ref: '#/components/schemas/workers_tail_consumers_script' type: array workers_secret-response: properties: name: description: The name of this secret, this is what will be used to access it inside the Worker. example: MY_SECRET type: string type: description: The type of secret. enum: - secret_text example: secret_text type: string type: object workers_stepped_migrations: allOf: - $ref: '#/components/schemas/workers_migration_tag_conditions' - properties: steps: description: Migrations to apply in order. items: $ref: '#/components/schemas/workers_migration_step' type: array type: object workers_r2_binding: properties: bucket_name: description: R2 bucket to bind to example: my-r2-bucket type: string name: $ref: '#/components/schemas/workers_binding_name' type: description: The class of resource that the binding provides. enum: - r2_bucket example: r2_bucket type: string required: - name - type - bucket_name type: object workers_messages: example: [] items: properties: code: minimum: 1000 type: integer message: type: string required: - code - message type: object uniqueItems: true type: array workers_placement_mode: description: Specifies the placement mode for the Worker (e.g. 'smart'). example: smart type: string workers_do_binding: properties: class_name: description: The exported class name of the Durable Object example: MyDurableObject type: string environment: description: The environment of the script_name to bind to example: production type: string name: $ref: '#/components/schemas/workers_binding_name' namespace_id: $ref: '#/components/schemas/workers_namespace_identifier' script_name: description: The script where the Durable Object is defined, if it is external to this Worker example: my-other-worker type: string type: description: The class of resource that the binding provides. enum: - durable_object_namespace example: durable_object_namespace type: string required: - name - type - class_name type: object workers_limits: description: Limits to apply for this Worker. properties: cpu_ms: description: The amount of CPU time this Worker can use in milliseconds. example: 50 type: integer type: object workers_script-response-upload: allOf: - $ref: '#/components/schemas/workers_script-response' - properties: startup_time_ms: example: 10 type: integer workers_script-response: properties: created_on: $ref: '#/components/schemas/workers_created_on' etag: $ref: '#/components/schemas/workers_etag' id: description: The id of the script in the Workers system. Usually the script name. example: my-workers-script readOnly: true type: string logpush: $ref: '#/components/schemas/workers_logpush' modified_on: $ref: '#/components/schemas/workers_modified_on' placement_mode: $ref: '#/components/schemas/workers_placement_mode' tail_consumers: $ref: '#/components/schemas/workers_tail_consumers' usage_model: $ref: '#/components/schemas/workers_usage_model' workers_script_name: 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 workers_compatibility_flag: description: A flag to opt into a specific change example: formdata_parser_supports_files type: string workers_single_step_migrations: allOf: - $ref: '#/components/schemas/workers_migration_tag_conditions' - $ref: '#/components/schemas/workers_migration_step' description: A single set of migrations to apply. workers_service_binding: properties: environment: description: Optional environment if the Worker utilizes one. example: production type: string name: $ref: '#/components/schemas/workers_binding_name' service: description: Name of Worker to bind to example: my-worker type: string type: description: The class of resource that the binding provides. enum: - service example: service type: string required: - name - type - service - environment type: object workers_identifier: description: Identifier example: 023e105f4ecef8ad9ca31a8372d0c353 maxLength: 32 type: string workers_uuid: description: API Resource UUID tag. example: f174e90a-fafe-4643-bbbc-4a0ed4fc8415 maxLength: 36 type: string workers_tags: description: Tags to help you manage your Workers items: $ref: '#/components/schemas/workers_tag' type: array workers_mtls_cert_binding: properties: certificate_id: description: ID of the certificate to bind to example: efwu2n6s-q69d-2kr9-184j-4913e8h391k6 type: string name: $ref: '#/components/schemas/workers_binding_name' type: description: The class of resource that the binding provides. enum: - mtls_certificate example: mtls_certificate type: string required: - name - type - certificate type: object workers_tail_consumers_script: 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 workers_d1_binding: properties: binding: $ref: '#/components/schemas/workers_binding_name' id: description: ID of the D1 database to bind to example: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx type: string name: description: The name of the D1 database associated with the 'id' provided. example: prod-database-auth type: string type: description: The class of resource that the binding provides. enum: - d1 example: d1 type: string required: - id - name - type - binding type: object workers_kv_namespace_binding: properties: name: $ref: '#/components/schemas/workers_binding_name' namespace_id: $ref: '#/components/schemas/workers_namespace_identifier' type: description: The class of resource that the binding provides. enum: - kv_namespace example: kv_namespace type: string required: - name - type - namespace_id type: object workers_logpush: description: Whether Logpush is turned on for the Worker. example: false type: boolean workers_namespace-script-response-single: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: $ref: '#/components/schemas/workers_namespace-script-response' responses: workers_4XX: content: application/json: schema: allOf: - example: errors: [] messages: [] result: created_on: '2022-05-05T05:15:11.602148Z' etag: 777f24a43bef5f69174aa69ceaf1dea67968d510a31d1vw3e49d34a0187c06d1 handlers: - fetch id: this-is_my_script-01 logpush: false modified_on: '2022-05-20T19:02:56.446492Z' tail_consumers: - environment: production service: my-log-consumer usage_model: bundled success: true - $ref: '#/components/schemas/workers_api-response-common-failure' description: Upload Worker Module response failure workers_200: content: application/json: schema: allOf: - $ref: '#/components/schemas/workers_script-response-upload-single' - example: errors: [] messages: [] result: created_on: '2022-05-05T05:15:11.602148Z' etag: 777f24a43bef5f69174aa69ceaf1dea67968d510a31d1vw3e49d34a0187c06d1 handlers: - fetch id: this-is_my_script-01 logpush: false modified_on: '2022-05-20T19:02:56.446492Z' placement_mode: smart startup_time_ms: 10 tail_consumers: - environment: production service: my-log-consumer usage_model: bundled success: true description: Upload Worker Module response requestBodies: workers_script_upload: content: application/javascript: schema: description: Raw javascript content comprising a Worker. Must be in service worker syntax. example: addEventListener('fetch', (event) => event.respondWith(new Response('OK'))) type: string multipart/form-data: encoding: : contentType: application/javascript+module, text/javascript+module, application/javascript, text/javascript, application/wasm, text/plain, application/octet-stream, application/source-map schema: oneOf: - properties: : description: A module comprising a Worker script, often a javascript file. Multiple modules may be provided as separate named parts, but at least one module must be present and referenced in the metadata as `main_module` or `body_part` by part name. Source maps may also be included using the `application/source-map` content type. items: format: binary type: string type: array metadata: description: JSON encoded metadata about the uploaded parts and Worker configuration. properties: bindings: description: List of bindings available to the worker. example: - name: MY_ENV_VAR text: my_data type: plain_text items: additionalProperties: x-stainless-any: true properties: name: description: Name of the binding variable. type: string type: description: 'Type of binding. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings.' type: string type: object type: array body_part: description: Name of the part in the multipart request that contains the script (e.g. the file adding a listener to the `fetch` event). Indicates a `service worker syntax` Worker. example: worker.js type: string compatibility_date: description: Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. example: '2023-07-25' type: string compatibility_flags: description: 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 `compatibility_date`. items: type: string type: array keep_bindings: description: List of binding types to keep from previous_upload. items: type: string type: array logpush: $ref: '#/components/schemas/workers_logpush' main_module: description: Name of the part in the multipart request that contains the main module (e.g. the file exporting a `fetch` handler). Indicates a `module syntax` Worker. example: worker.js type: string migrations: description: Migrations to apply for Durable Objects associated with this Worker. oneOf: - $ref: '#/components/schemas/workers_single_step_migrations' - $ref: '#/components/schemas/workers_stepped_migrations' placement: $ref: '#/components/schemas/workers_placement_config' tags: description: List of strings to use as tags for this Worker items: type: string type: array tail_consumers: $ref: '#/components/schemas/workers_tail_consumers' usage_model: description: Usage model to apply to invocations. enum: - bundled - unbound type: string version_tags: additionalProperties: type: string description: Key-value pairs to use as tags for this version of this Worker type: object type: object type: object - properties: message: description: Rollback message to be associated with this deployment. Only parsed when query param `"rollback_to"` is present. type: string type: object text/javascript: schema: description: Raw javascript content comprising a Worker. Must be in service worker syntax. example: addEventListener('fetch', (event) => event.respondWith(new Response('OK'))) type: string required: true securitySchemes: hmac: type: apiKey name: Authorization in: header description: Amazon Signature authorization v4 x-amazon-apigateway-authtype: awsSigv4 externalDocs: description: Amazon Web Services documentation url: https://docs.aws.amazon.com/apigateway/ x-hasEquivalentPaths: true