openapi: 3.0.0 info: version: 2015-07-09 x-release: v4 title: APIs.io Engineering Platform Amazon API Gateway 2014 11 13 Worker Script 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: Worker Script paths: /accounts/{account_id}/workers/scripts: get: description: Fetch a list of uploaded workers. operationId: worker-script-list-workers parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' responses: 4XX: content: application/json: schema: allOf: - $ref: '#/components/schemas/workers_script-response-collection' - $ref: '#/components/schemas/workers_api-response-common-failure' description: List Workers response failure '200': content: application/json: schema: $ref: '#/components/schemas/workers_script-response-collection' description: List Workers response security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform List Workers tags: - Worker Script x-api-token-group: - Workers Tail Read - Workers Scripts Write - Workers Scripts Read x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.list /accounts/{account_id}/workers/scripts/{script_name}: delete: description: Delete your worker. This call has no response body on a successful delete. operationId: worker-script-delete-worker parameters: - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - 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: - Worker Script x-api-token-group: - Workers Scripts Write x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.delete get: description: Fetch raw script content for your worker. Note this is the original script content, not JSON encoded. operationId: worker-script-download-worker parameters: - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' responses: 4XX: content: undefined: schema: example: addEventListener('fetch', event => { event.respondWith(fetch(event.request)) }) description: Download Worker response failure '200': content: undefined: schema: example: addEventListener('fetch', event => { event.respondWith(fetch(event.request)) }) description: Download Worker response security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Download Worker tags: - Worker Script 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. You can find more about the multipart metadata on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/.' operationId: worker-script-upload-worker-module parameters: - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - description: Rollback to provided deployment based on deployment ID. Request body will only parse a "message" part. You can learn more about deployments [here](https://developers.cloudflare.com/workers/platform/deployments/). in: query name: rollback_to schema: $ref: '#/components/schemas/workers_uuid' requestBody: $ref: '#/components/requestBodies/workers_script_upload' responses: 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 '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 security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Upload Worker Module tags: - Worker Script x-api-token-group: - Workers Scripts Write x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.create /accounts/{account_id}/workers/scripts/{script_name}/content: put: description: Put script content without touching config or metadata operationId: worker-script-put-content parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - 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-failure' description: Put script content failure '200': content: application/json: schema: $ref: '#/components/schemas/workers_script-response-single' description: Put script content security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Put script content tags: - Worker Script x-api-token-group: - Workers Scripts Write x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.create /accounts/{account_id}/workers/scripts/{script_name}/content/v2: get: description: Fetch script content only operationId: worker-script-get-content parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - 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 content failure '200': content: string: schema: example: addEventListener('fetch', event => { event.respondWith(fetch(event.request)) }) description: Fetch script content security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Get script content tags: - Worker Script x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.read /accounts/{account_id}/workers/scripts/{script_name}/script-settings: get: description: Get script-level settings when using [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions). Includes Logpush and Tail Consumers. operationId: worker-script-settings-get-settings parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - 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: $ref: '#/components/schemas/workers_script-settings-response' description: Fetch script settings security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Get Script Settings tags: - Worker Script 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-level settings when using [Worker Versions](https://developers.cloudflare.com/api/operations/worker-versions-list-versions). Includes Logpush and Tail Consumers. operationId: worker-script-settings-patch-settings parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' requestBody: content: application/json: schema: $ref: '#/components/schemas/workers_script-settings-item' 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: $ref: '#/components/schemas/workers_script-settings-response' description: Patch script settings security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Patch Script Settings tags: - Worker Script x-api-token-group: - Workers Scripts Write x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.create /accounts/{account_id}/workers/scripts/{script_name}/settings: get: description: Get metadata and config, such as bindings or usage model operationId: worker-script-get-settings parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - 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 settings failure '200': content: application/json: schema: $ref: '#/components/schemas/workers_script-and-version-settings-response' description: Fetch settings security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Get Settings tags: - Worker Script 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 metadata or config, such as bindings or usage model operationId: worker-script-patch-settings parameters: - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' - 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 settings failure '200': content: application/json: schema: $ref: '#/components/schemas/workers_script-and-version-settings-response' description: Patch settings security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Patch Settings tags: - Worker Script x-api-token-group: - Workers Scripts Write x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.create /accounts/{account_id}/workers/scripts/{script_name}/usage-model: get: description: Fetches the Usage Model for a given Worker. operationId: worker-script-fetch-usage-model parameters: - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' responses: 4XX: content: application/json: schema: allOf: - $ref: '#/components/schemas/workers_usage-model-response' - $ref: '#/components/schemas/workers_api-response-common-failure' description: Fetch Usage Model response failure '200': content: application/json: schema: $ref: '#/components/schemas/workers_usage-model-response' description: Fetch Usage Model response security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Fetch Usage Model tags: - Worker Script x-api-token-group: - Workers Tail Read - Workers Scripts Write - Workers Scripts Read x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.read put: description: Updates the Usage Model for a given Worker. Requires a Workers Paid subscription. operationId: worker-script-update-usage-model parameters: - in: path name: script_name required: true schema: $ref: '#/components/schemas/workers_script_name' - in: path name: account_id required: true schema: $ref: '#/components/schemas/workers_identifier' requestBody: content: application/json: schema: $ref: '#/components/schemas/workers_usage-model-object' required: true responses: 4XX: content: application/json: schema: allOf: - $ref: '#/components/schemas/workers_usage-model-response' - $ref: '#/components/schemas/workers_api-response-common-failure' description: Update Usage Model response failure '200': content: application/json: schema: $ref: '#/components/schemas/workers_usage-model-response' description: Update Usage Model response security: - api_token: [] - api_email: [] api_key: [] summary: APIs.io Engineering Platform Update Usage Model tags: - Worker Script x-api-token-group: - Workers Scripts Write x-cfPermissionsRequired: enum: - com.cloudflare.edge.worker.script.create components: schemas: workers_binding_name: description: A JavaScript variable name for the binding. example: myBinding readOnly: true type: string 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-settings-response: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: $ref: '#/components/schemas/workers_script-settings-item' 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_created_on: description: When the script was created. example: '2017-01-01T00:00:00Z' format: date-time readOnly: true type: string workers_compatibility_flags: description: Opt your Worker into specific changes items: $ref: '#/components/schemas/workers_compatibility_flag' type: array workers_script-response-collection: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: items: $ref: '#/components/schemas/workers_script-response' 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_namespace_identifier: description: Namespace identifier tag. example: 0f2ac74b498b48028cb68387c421e279 maxLength: 32 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_usage-model-response: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: $ref: '#/components/schemas/workers_usage-model-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_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_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_script-and-version-settings-response: allOf: - $ref: '#/components/schemas/workers_api-response-common' - properties: result: $ref: '#/components/schemas/workers_script-and-version-settings-item' 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_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_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_script-settings-item: properties: logpush: $ref: '#/components/schemas/workers_logpush' tail_consumers: $ref: '#/components/schemas/workers_tail_consumers' type: object 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_bindings: description: List of bindings attached to this Worker items: $ref: '#/components/schemas/workers_binding' type: array workers_usage-model-object: properties: usage_model: type: string type: object workers_logpush: description: Whether Logpush is turned on for the Worker. example: false type: boolean 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