{ "openapi": "3.0.3", "info": { "title": "Local Explorer API", "description": "A local subset of the Cloudflare API for inspecting and modifying resource state during local development. Supports D1, R2, KV, Durable Objects and Workflows.", "version": "0.0.1" }, "servers": [ { "description": "Local Explorer", "url": "/cdn-cgi/local/explorer/api" } ], "paths": { "/storage/kv/namespaces": { "get": { "operationId": "workers-kv-namespace-list-namespaces", "summary": "List Namespaces", "description": "Returns the namespaces owned by an account.", "parameters": [ { "name": "order", "in": "query", "schema": { "description": "Field to order results by.", "type": "string", "example": "id", "enum": ["id", "title"] } }, { "name": "direction", "in": "query", "schema": { "description": "Direction to order namespaces.", "type": "string", "example": "asc", "enum": ["asc", "desc"] } } ], "responses": { "200": { "description": "List Namespaces response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_api-response-collection" }, { "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/workers-kv_namespace" } } }, "type": "object" } ] } } } }, "4XX": { "description": "List Namespaces response failure.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_api-response-common-failure" } } } } }, "tags": ["Workers KV Namespace"] } }, "/storage/kv/namespaces/{namespace_id}/keys": { "get": { "operationId": "workers-kv-namespace-list-a-namespace'-s-keys", "summary": "List a Namespace's Keys", "description": "Lists a namespace's keys.", "parameters": [ { "name": "namespace_id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_namespace_identifier" } }, { "name": "limit", "in": "query", "schema": { "description": "Limits the number of keys returned in the response. The cursor attribute may be used to iterate over the next batch of keys if there are more than the limit.", "type": "number", "default": 1000, "maximum": 1000, "minimum": 10 } }, { "name": "prefix", "in": "query", "schema": { "description": "Filters returned keys by a name prefix. Exact matches and any key names that begin with the prefix will be returned.", "type": "string", "example": "My-Prefix" } }, { "name": "cursor", "in": "query", "schema": { "description": "Opaque token indicating the position from which to continue when requesting the next set of records if the amount of list results was limited by the limit parameter. A valid value for the cursor can be obtained from the `cursors` object in the `result_info` structure.", "type": "string", "example": "6Ck1la0VxJ0djhidm1MdX2FyDGxLKVeeHZZmORS_8XeSuhz9SjIJRaSa2lnsF01tQOHrfTGAP3R5X1Kv5iVUuMbNKhWNAXHOl6ePB0TUL8nw" } } ], "responses": { "200": { "description": "List a Namespace's Keys response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_api-response-common" }, { "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/workers-kv_key" } }, "result_info": { "$ref": "#/components/schemas/workers-kv_cursor_result_info" } }, "type": "object" } ] } } } }, "4XX": { "description": "List a Namespace's Keys response failure.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_api-response-common-failure" } } } } }, "tags": ["Workers KV Namespace"] } }, "/storage/kv/namespaces/{namespace_id}/values/{key_name}": { "get": { "operationId": "workers-kv-namespace-read-key-value-pair", "summary": "Read key-value pair", "description": "Returns the value associated with the given key in the given namespace. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name. If the KV-pair is set to expire at some point, the expiration time as measured in seconds since the UNIX epoch will be returned in the `expiration` response header.", "parameters": [ { "name": "key_name", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_key_name" } }, { "name": "namespace_id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_namespace_identifier" } } ], "responses": { "200": { "description": "Read key-value pair response.", "content": { "application/octet-stream": { "schema": { "$ref": "#/components/schemas/workers-kv_value" } } } }, "4XX": { "description": "Read key-value pair response failure.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_api-response-common-failure" } } } } }, "tags": ["Workers KV Namespace"] }, "put": { "operationId": "workers-kv-namespace-write-key-value-pair-with-metadata", "summary": "Write key-value pair with optional metadata", "description": "Write a value identified by a key. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name. Body should be the value to be stored. If JSON metadata to be associated with the key/value pair is needed, use `multipart/form-data` content type for your PUT request (see dropdown below in `REQUEST BODY SCHEMA`). Existing values, expirations, and metadata will be overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will never expire. If both are set, `expiration_ttl` is used and `expiration` is ignored.", "parameters": [ { "name": "key_name", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_key_name" } }, { "name": "namespace_id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_namespace_identifier" } } ], "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "$ref": "#/components/schemas/workers-kv_value" } }, "multipart/form-data": { "encoding": { "metadata": { "contentType": "application/json" } }, "schema": { "type": "object", "properties": { "metadata": { "$ref": "#/components/schemas/workers-kv_metadata" }, "value": { "$ref": "#/components/schemas/workers-kv_value" } }, "required": ["value"] } } } }, "responses": { "200": { "description": "Write key-value pair with metadata response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_api-response-common-no-result" } } } }, "4XX": { "description": "Write key-value pair with metadata response failure.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_api-response-common-failure" } } } } }, "tags": ["Workers KV Namespace"] }, "delete": { "operationId": "workers-kv-namespace-delete-key-value-pair", "summary": "Delete key-value pair", "description": "Remove a KV pair from the namespace. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name.", "parameters": [ { "name": "key_name", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_key_name" } }, { "name": "namespace_id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_namespace_identifier" } } ], "requestBody": { "required": true, "content": { "application/json": {} } }, "responses": { "200": { "description": "Delete key-value pair response.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_api-response-common-no-result" } } } }, "4XX": { "description": "Delete key-value pair response failure.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_api-response-common-failure" } } } } }, "tags": ["Workers KV Namespace"] } }, "/storage/kv/namespaces/{namespace_id}/bulk": { "put": { "operationId": "workers-kv-namespace-write-multiple-key-value-pairs", "summary": "Write multiple key-value pairs", "description": "Write multiple keys and values at once. Body should be an array of up to 10,000 key-value pairs to be stored, along with optional expiration information. Existing values and expirations will be overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will never expire. If both are set, `expiration_ttl` is used and `expiration` is ignored. The entire request size must be 100 megabytes or less.", "parameters": [ { "name": "namespace_id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_namespace_identifier" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_bulk_write" } } } }, "responses": { "200": { "description": "Write multiple key-value pairs response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_api-response-common-no-result" }, { "properties": { "result": { "$ref": "#/components/schemas/workers-kv_bulk-result" } }, "type": "object" } ] } } } }, "4XX": { "description": "Write multiple key-value pairs response failure.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_api-response-common-no-result" }, { "properties": { "result": { "$ref": "#/components/schemas/workers-kv_bulk-result" } }, "type": "object" } ] } } } } }, "tags": ["Workers KV Namespace"] } }, "/storage/kv/namespaces/{namespace_id}/bulk/delete": { "post": { "operationId": "workers-kv-namespace-delete-multiple-key-value-pairs", "summary": "Delete multiple key-value pairs", "description": "Remove multiple KV pairs from the namespace. Body should be an array of up to 10,000 keys to be removed.", "parameters": [ { "name": "namespace_id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_namespace_identifier" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_bulk_delete" } } } }, "responses": { "200": { "description": "Delete multiple key-value pairs response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_api-response-common-no-result" }, { "properties": { "result": { "$ref": "#/components/schemas/workers-kv_bulk-result" } }, "type": "object" } ] } } } }, "4XX": { "description": "Delete multiple key-value pairs response failure.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_api-response-common-no-result" }, { "properties": { "result": { "$ref": "#/components/schemas/workers-kv_bulk-result" } }, "type": "object" } ] } } } } }, "tags": ["Workers KV Namespace"] } }, "/storage/kv/namespaces/{namespace_id}/bulk/get": { "post": { "operationId": "workers-kv-namespace-get-multiple-key-value-pairs", "summary": "Get multiple key-value pairs", "description": "Retrieve up to 100 KV pairs from the namespace. Keys must contain text-based values. JSON values can optionally be parsed instead of being returned as a string value. Metadata can be included if `withMetadata` is true.", "parameters": [ { "name": "namespace_id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_namespace_identifier" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "keys": { "description": "Array of keys to retrieve (maximum of 100).", "type": "array", "items": { "$ref": "#/components/schemas/workers-kv_key_name_bulk" }, "maxItems": 100 } }, "required": ["keys"] } } } }, "responses": { "200": { "description": "Get multiple key-value pairs response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_api-response-common-no-result" }, { "properties": { "result": { "oneOf": [ { "$ref": "#/components/schemas/workers-kv_bulk-get-result" }, { "$ref": "#/components/schemas/workers-kv_bulk-get-result-with-metadata" } ] } }, "type": "object" } ] } } } }, "4XX": { "description": "Get multiple key-value pairs response failure.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_api-response-common-failure" } } } } }, "tags": ["Workers KV Namespace"] } }, "/d1/database": { "get": { "operationId": "d1-list-databases", "summary": "List D1 Databases", "description": "Returns a list of D1 databases.", "parameters": [ { "name": "name", "in": "query", "schema": { "description": "a database name to search for.", "type": "string" } } ], "responses": { "200": { "description": "List D1 databases response", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/d1_api-response-common" }, { "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/d1_database-response" } }, "result_info": { "type": "object", "properties": { "count": { "description": "Total number of results for the requested service", "type": "number", "example": 1 } } } } } ] } } } }, "4XX": { "description": "List D1 databases response failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/d1_api-response-common-failure" } } } } }, "tags": ["D1"] } }, "/d1/database/{database_id}/raw": { "post": { "operationId": "d1-raw-database-query", "summary": "Raw D1 Database query", "description": "Returns the query result rows as arrays rather than objects. This is a performance-optimized version of the /query endpoint.", "parameters": [ { "name": "database_id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/d1_database-identifier" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/d1_batch-query" } } } }, "responses": { "200": { "description": "Raw query response", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/d1_api-response-common" }, { "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/d1_raw-result-response" } } } } ] } } } }, "4XX": { "description": "Query response failure", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/d1_api-response-common-failure" } } } } }, "tags": ["D1"] } }, "/workflows/{workflow_name}/instances/{instance_id}/status": { "patch": { "operationId": "wor-change-status-workflow-instance", "summary": "Change status of instance", "description": "Changes the execution status of a workflow instance (e.g., pause, resume, terminate).", "parameters": [ { "name": "workflow_name", "in": "path", "required": true, "schema": { "type": "string", "maxLength": 64, "minLength": 1, "pattern": "^[a-zA-Z0-9_][a-zA-Z0-9-_]*$" } }, { "name": "instance_id", "in": "path", "description": "Instance identifier. User-created instances match `^[a-zA-Z0-9_][a-zA-Z0-9-_]*$` (max 100 characters); cron-triggered instances can use a longer, system-generated id derived from the cron expression.", "required": true, "schema": { "type": "string", "maxLength": 271, "minLength": 1 } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "oneOf": [ { "properties": { "status": { "type": "string", "enum": ["pause"] } }, "required": ["status"], "type": "object" }, { "properties": { "status": { "type": "string", "enum": ["resume"] } }, "required": ["status"], "type": "object" }, { "properties": { "rollback": { "description": "Run rollback before terminating.", "type": "boolean" }, "status": { "type": "string", "enum": ["terminate"] } }, "required": ["status"], "type": "object" }, { "properties": { "from": { "description": "Step to restart from.", "type": "object", "properties": { "count": { "type": "integer", "exclusiveMinimum": true, "maximum": 9007199254740991, "minimum": 0 }, "name": { "type": "string", "maxLength": 256, "minLength": 1 }, "type": { "type": "string", "enum": ["do", "sleep", "waitForEvent"] } }, "required": ["name"] }, "status": { "type": "string", "enum": ["restart"] } }, "required": ["status"], "type": "object" } ] } } } }, "responses": { "200": { "description": "Change status of instance - it can be paused, resumed or terminated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "properties": { "code": { "type": "number" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" }, "maxItems": 0 }, "messages": { "type": "array", "items": { "properties": { "code": { "type": "number" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" } }, "result": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "queued", "running", "paused", "errored", "terminated", "complete", "waitingForPause", "waiting", "rollingBack" ] }, "timestamp": { "description": "Accepts ISO 8601 with no timezone offsets and in UTC.", "type": "string", "format": "date-time" } }, "required": ["status", "timestamp"] }, "result_info": { "type": "object", "properties": { "count": { "type": "number" }, "cursor": { "type": "string" }, "page": { "type": "number" }, "per_page": { "type": "number" }, "total_count": { "type": "number" }, "total_pages": { "type": "number" } }, "required": ["per_page", "count", "total_count"] }, "success": { "type": "boolean", "enum": [true] } }, "required": ["success", "errors", "result", "messages"] } } } }, "400": { "description": "Bad Request.", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "properties": { "code": { "type": "number" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" } }, "messages": { "type": "array", "items": { "type": "string" } }, "result": { "type": "object", "enum": [null], "nullable": true }, "success": { "type": "boolean", "enum": [false] } }, "required": ["success", "messages", "errors", "result"] } } } }, "404": { "description": "Instance not found.", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "properties": { "code": { "type": "number" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" } }, "messages": { "type": "array", "items": { "type": "string" } }, "result": { "type": "object", "enum": [null], "nullable": true }, "success": { "type": "boolean", "enum": [false] } }, "required": ["success", "messages", "errors", "result"] } } } }, "409": { "description": "Instance not in a restartable state.", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "properties": { "code": { "type": "number" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" } }, "messages": { "type": "array", "items": { "type": "string" } }, "result": { "type": "object", "enum": [null], "nullable": true }, "success": { "type": "boolean", "enum": [false] } }, "required": ["success", "messages", "errors", "result"] } } } } }, "tags": ["Workflows"] } }, "/workers/durable_objects/namespaces": { "get": { "operationId": "durable-objects-namespace-list-namespaces", "summary": "List Namespaces", "description": "Returns the Durable Object namespaces owned by an account.", "parameters": [], "responses": { "200": { "description": "List Namespaces response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-collection" }, { "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/workers_namespace" } } }, "type": "object" } ] } } } }, "4XX": { "description": "List Namespaces response failure.", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-collection" }, { "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/workers_namespace" } } }, "type": "object" } ] }, { "$ref": "#/components/schemas/workers_api-response-common-failure" } ] } } } } }, "tags": ["Durable Objects Namespace"] } }, "/workers/durable_objects/namespaces/{id}/objects": { "get": { "operationId": "durable-objects-namespace-list-objects", "summary": "List Objects", "description": "Returns the Durable Objects in a given namespace.", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/workers_schemas-id" } }, { "name": "limit", "in": "query", "schema": { "description": "The number of objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.", "type": "number", "default": 1000, "maximum": 10000, "minimum": 10 } }, { "name": "cursor", "in": "query", "schema": { "description": "Opaque token indicating the position from which to continue when requesting the next set of records. A valid value for the cursor can be obtained from the cursors object in the result_info structure.", "type": "string", "example": "AAAAANuhDN7SjacTnSVsDu3WW1Lvst6dxJGTjRY5BhxPXdf6L6uTcpd_NVtjhn11OUYRsVEykxoUwF-JQU4dn6QylZSKTOJuG0indrdn_MlHpMRtsxgXjs-RPdHYIVm3odE_uvEQ_dTQGFm8oikZMohns34DLBgrQpc" } } ], "responses": { "200": { "description": "List Objects response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-collection" }, { "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/workers_object" } }, "result_info": { "type": "object", "properties": { "count": { "description": "Total results returned based on your list parameters.", "type": "number", "example": 1 }, "cursor": { "$ref": "#/components/schemas/workers_cursor" } } } }, "type": "object" } ] } } } }, "4XX": { "description": "List Objects response failure.", "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-collection" }, { "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/workers_object" } }, "result_info": { "type": "object", "properties": { "count": { "description": "Total results returned based on your list parameters.", "type": "number", "example": 1 }, "cursor": { "$ref": "#/components/schemas/workers_cursor" } } } }, "type": "object" } ] }, { "$ref": "#/components/schemas/workers_api-response-common-failure" } ] } } } } }, "tags": ["Durable Objects Namespace"] } }, "/r2/buckets": { "get": { "operationId": "r2-list-buckets", "summary": "List Buckets", "description": "Lists all R2 buckets on your account.", "parameters": [], "responses": { "200": { "description": "List Buckets response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/r2_v4_response_list" }, { "properties": { "result": { "type": "object", "properties": { "buckets": { "type": "array", "items": { "$ref": "#/components/schemas/r2_bucket" } } } } }, "type": "object" } ] } } } }, "4XX": { "description": "List Buckets response failure.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/r2_v4_response_failure" } } } } }, "tags": ["R2 Bucket"] } }, "/r2/buckets/{bucket_name}": { "get": { "operationId": "r2-get-bucket", "summary": "Get Bucket", "description": "Gets properties of an existing R2 bucket.", "parameters": [ { "name": "bucket_name", "in": "path", "required": true, "schema": { "$ref": "#/components/schemas/r2_bucket_name" } } ], "responses": { "200": { "description": "Get Bucket response.", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/r2_v4_response" }, { "properties": { "result": { "$ref": "#/components/schemas/r2_bucket" } }, "type": "object" } ] } } } }, "4XX": { "description": "Get Bucket response failure.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/r2_v4_response_failure" } } } } }, "tags": ["R2 Bucket"] } }, "/r2/buckets/{bucket_name}/objects": { "get": { "description": "List objects in an R2 bucket with optional prefix and delimiter.", "operationId": "r2-bucket-list-objects", "parameters": [ { "in": "path", "name": "bucket_name", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "prefix", "schema": { "type": "string" }, "description": "Filter objects by key prefix" }, { "in": "query", "name": "delimiter", "schema": { "type": "string" }, "description": "Delimiter for directory-style listing (usually '/')" }, { "in": "query", "name": "cursor", "schema": { "type": "string" }, "description": "Pagination cursor from previous response" }, { "in": "query", "name": "per_page", "schema": { "type": "integer", "default": 1000 }, "description": "Maximum number of objects to return" } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "type": "array", "items": { "$ref": "#/components/schemas/r2_object" } }, "result_info": { "$ref": "#/components/schemas/r2_list-objects-result-info" } }, "type": "object" } ] } } }, "description": "List objects response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "List objects failure." } }, "summary": "List Objects in R2 Bucket", "tags": ["R2 Bucket"] }, "delete": { "description": "Delete multiple objects from an R2 bucket.", "operationId": "r2-bucket-delete-objects", "parameters": [ { "in": "path", "name": "bucket_name", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" }, "description": "Array of object keys to delete" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" } } } } }, "type": "object" } ] } } }, "description": "Delete objects response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Delete objects failure." } }, "summary": "Delete Multiple Objects from R2 Bucket", "tags": ["R2 Bucket"] } }, "/r2/buckets/{bucket_name}/objects/{object_key}": { "delete": { "description": "Delete an object from an R2 bucket.", "operationId": "r2-bucket-delete-object", "parameters": [ { "in": "path", "name": "bucket_name", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "object_key", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "type": "object", "properties": { "result": { "type": "object", "properties": { "key": { "type": "string" } } } } } ] } } }, "description": "Delete object response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Delete object failure." } }, "summary": "Delete Object from R2 Bucket", "tags": ["R2 Bucket"] }, "get": { "description": "Get an object from an R2 bucket. Use cf-metadata-only header for HEAD-like behavior.", "operationId": "r2-bucket-get-object", "parameters": [ { "in": "path", "name": "bucket_name", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "object_key", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "cf-metadata-only", "schema": { "type": "string" }, "description": "Set to 'true' to return only metadata (HEAD-like behavior)" } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "$ref": "#/components/schemas/r2_head-object-result" } }, "type": "object" } ] } }, "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } }, "description": "Object content or metadata." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Get object failure." } }, "summary": "Get Object from R2 Bucket", "tags": ["R2 Bucket"] }, "put": { "description": "Upload an object to an R2 bucket.", "operationId": "r2-bucket-put-object", "parameters": [ { "in": "path", "name": "bucket_name", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "object_key", "required": true, "schema": { "type": "string" } }, { "in": "header", "name": "content-type", "schema": { "type": "string" }, "description": "Content type of the object" }, { "in": "header", "name": "cf-r2-custom-metadata", "schema": { "type": "string" }, "description": "JSON-encoded custom metadata" } ], "requestBody": { "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "$ref": "#/components/schemas/r2_put-object-result" } }, "type": "object" } ] } } }, "description": "Put object response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Put object failure." } }, "summary": "Upload Object to R2 Bucket", "tags": ["R2 Bucket"] } }, "/workers/durable_objects/namespaces/{namespace_id}/query": { "post": { "description": "Execute SQL queries against a Durable Object's SQLite storage.", "operationId": "durable-objects-namespace-query-sqlite", "parameters": [ { "in": "path", "name": "namespace_id", "required": true, "schema": { "$ref": "#/components/schemas/workers_schemas-id" } } ], "requestBody": { "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/do_query-by-id" }, { "$ref": "#/components/schemas/do_query-by-name" } ] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "items": { "$ref": "#/components/schemas/do_raw-query-result" }, "type": "array" } }, "type": "object" } ] } } }, "description": "Query response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Query response failure." } }, "summary": "Query Durable Object SQLite", "tags": ["Durable Objects Namespace"] } }, "/local/workers": { "get": { "description": "List all workers in the local dev registry.", "operationId": "local-explorer-list-workers", "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "items": { "$ref": "#/components/schemas/local-explorer_worker" }, "type": "array" } }, "type": "object" } ] } } }, "description": "List workers response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "List workers failure." } }, "summary": "List Workers in Dev Registry", "tags": ["Local Explorer"] } }, "/local/scheduled": { "post": { "description": "Dispatches one scheduled invocation to the exact Worker available to Local Explorer under the requested name.", "operationId": "local-explorer-dispatch-scheduled", "parameters": [ { "in": "query", "name": "worker", "required": true, "schema": { "type": "string", "minLength": 1 }, "description": "Exact Worker name available to Local Explorer." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/local-explorer_scheduled-request" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "type": "object", "required": ["result"], "properties": { "result": { "$ref": "#/components/schemas/local-explorer_scheduled-result" } } } ] } } }, "description": "Scheduled invocation result." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Scheduled invocation request failure." } }, "summary": "Dispatch Scheduled Invocation", "tags": ["Local Explorer"] } }, "/local/email/routing": { "get": { "description": "Lists emails received by any email() handler during this dev session. Use `capture_id` with `worker` for canonical exact-capture details, or `email_id` for compatibility Message-ID lookup. The two identifiers are mutually exclusive.", "operationId": "email-list-routing", "parameters": [ { "in": "query", "name": "worker", "schema": { "type": "string" }, "description": "Only return emails received by this worker's email() handler." }, { "in": "query", "name": "email_id", "schema": { "type": "string" }, "description": "Compatibility lookup by RFC Message-ID. Returns the newest match and accepts bracketed or bracket-stripped values." }, { "in": "query", "name": "capture_id", "schema": { "type": "string", "format": "uuid" }, "description": "Canonical identifier for one captured delivery. Requires `worker` and never falls back to Message-ID lookup." }, { "in": "query", "name": "cursor", "schema": { "type": "string" }, "description": "Opaque cursor for the next page of emails." }, { "in": "query", "name": "per_page", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 25 }, "description": "Number of emails per page." } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "oneOf": [ { "items": { "$ref": "#/components/schemas/email_routing-item" }, "type": "array" }, { "$ref": "#/components/schemas/email_routing-detail" } ] }, "result_info": { "type": "object", "properties": { "count": { "type": "number" }, "cursor": { "type": "string" }, "per_page": { "type": "integer" }, "has_more": { "type": "boolean" } } } }, "type": "object" } ] } } }, "description": "List received emails response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "List received emails failure." } }, "summary": "List Received Emails", "tags": ["Email"] } }, "/local/email/routing/resend": { "post": { "description": "Replays the stored bytes of one exact Routing capture to the same Worker's email() handler with a new Message-ID.", "operationId": "email-resend-routing", "parameters": [ { "in": "query", "name": "worker", "required": true, "schema": { "type": "string", "minLength": 1 }, "description": "Worker that owns the exact Routing capture." }, { "in": "query", "name": "capture_id", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "Opaque identifier for the exact captured delivery." } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "type": "object", "properties": { "result": { "type": "object", "properties": { "messageId": { "type": "string" }, "outcome": { "type": "string", "enum": ["ok", "exception"] }, "rejectReason": { "type": "string" }, "capturedPortion": { "type": "boolean" } }, "required": [ "messageId", "outcome", "capturedPortion" ] } } } ] } } }, "description": "Email resend result." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Email resend failure." } }, "summary": "Resend Received Email", "tags": ["Email"] } }, "/local/email/routing/resend/draft": { "get": { "description": "Projects one complete composer-originated Routing capture back into structured composer fields.", "operationId": "email-resend-draft-routing", "parameters": [ { "in": "query", "name": "worker", "required": true, "schema": { "type": "string", "minLength": 1 }, "description": "Worker that owns the exact Routing capture." }, { "in": "query", "name": "capture_id", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "Opaque identifier for the exact captured delivery." } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "type": "object", "properties": { "result": { "$ref": "#/components/schemas/email_send-request" } } } ] } } }, "description": "Composer projection response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Composer projection failure." } }, "summary": "Get Received Email Resend Draft", "tags": ["Email"] } }, "/local/email/routing/send": { "post": { "description": "Sends a test email to trigger the worker's email() handler. Only the first `to` address is used as the envelope recipient; any additional to and cc addresses appear only in the composed MIME headers. bcc addresses are accepted but, by convention, are not written into the composed message.", "operationId": "email-send-routing", "parameters": [ { "in": "query", "name": "worker", "required": true, "schema": { "type": "string" }, "description": "Deliver the test email directly to this worker's email() handler. Required because a single dev port can serve multiple workers, so the target cannot be inferred from the recipient address." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/email_send-request" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "type": "object", "properties": { "messageId": { "type": "string", "description": "RFC Message-ID header value of the delivered test email." }, "outcome": { "type": "string", "enum": ["ok", "exception"], "description": "Whether the handler ran to completion or threw." }, "rejectReason": { "type": "string", "description": "Reason passed to setReject(), if the handler rejected the message." } } } }, "type": "object" } ] } } }, "description": "Send test email response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Send test email failure." } }, "summary": "Send Test Email", "tags": ["Email"] } }, "/local/email/sending": { "get": { "description": "Lists emails sent through send_email bindings during this dev session, or returns one email's details when `email_id` is provided.", "operationId": "email-list-sending", "parameters": [ { "in": "query", "name": "worker", "schema": { "type": "string" }, "description": "Only return emails sent through this worker's send_email bindings." }, { "in": "query", "name": "email_id", "schema": { "type": "string" }, "description": "Return the details for this email instead of a paginated list." }, { "in": "query", "name": "cursor", "schema": { "type": "string" }, "description": "Opaque cursor for the next page of emails." }, { "in": "query", "name": "per_page", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 25 }, "description": "Number of emails per page." } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "oneOf": [ { "items": { "$ref": "#/components/schemas/email_sending-item" }, "type": "array" }, { "$ref": "#/components/schemas/email_sending-detail" } ] }, "result_info": { "type": "object", "properties": { "count": { "type": "number" }, "cursor": { "type": "string" }, "per_page": { "type": "integer" }, "has_more": { "type": "boolean" } } } }, "type": "object" } ] } } }, "description": "List sent emails response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "List sent emails failure." } }, "summary": "List Sent Emails", "tags": ["Email"] } }, "/workflows": { "get": { "description": "Returns the workflows configured for local development.", "operationId": "workflows-list-workflows", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "items": { "$ref": "#/components/schemas/workflows_workflow" }, "type": "array" }, "result_info": { "properties": { "count": { "type": "number" } }, "type": "object" } }, "type": "object" } ] } } }, "description": "List Workflows response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "List Workflows response failure." } }, "summary": "List Workflows", "tags": ["Workflows"] } }, "/workflows/{workflow_name}": { "get": { "description": "Returns details of a specific workflow including instance status counts.", "operationId": "workflows-get-workflow-details", "parameters": [ { "in": "path", "name": "workflow_name", "required": true, "schema": { "$ref": "#/components/schemas/workflows_workflow-name" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "$ref": "#/components/schemas/workflows_workflow-details" } }, "type": "object" } ] } } }, "description": "Get Workflow Details response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Get Workflow Details response failure." } }, "summary": "Get Workflow Details", "tags": ["Workflows"] }, "delete": { "description": "Deletes all instances of a workflow by removing their persistence files.", "operationId": "workflows-delete-workflow", "parameters": [ { "in": "path", "name": "workflow_name", "required": true, "schema": { "$ref": "#/components/schemas/workflows_workflow-name" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "type": "object", "properties": { "status": { "type": "string" }, "success": { "type": "boolean" } } } }, "type": "object" } ] } } }, "description": "Delete Workflow response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Delete Workflow response failure." } }, "summary": "Delete Workflow (all instances)", "tags": ["Workflows"] } }, "/workflows/{workflow_name}/instances": { "get": { "description": "Returns the instances of a workflow.", "operationId": "workflows-list-instances", "parameters": [ { "in": "path", "name": "workflow_name", "required": true, "schema": { "$ref": "#/components/schemas/workflows_workflow-name" } }, { "in": "query", "name": "page", "schema": { "default": 1, "description": "Page number (1-indexed).", "minimum": 1, "type": "number" } }, { "in": "query", "name": "per_page", "schema": { "default": 25, "description": "Number of instances per page.", "maximum": 100, "minimum": 1, "type": "number" } }, { "in": "query", "name": "status", "schema": { "type": "string", "enum": [ "queued", "running", "paused", "errored", "terminated", "complete", "waitingForPause", "waiting" ], "description": "Filter instances by status." } }, { "in": "query", "name": "date_start", "schema": { "type": "string", "format": "date-time", "description": "Only return instances created at or after this time. Accepts ISO 8601 with no timezone offsets and in UTC." } }, { "in": "query", "name": "date_end", "schema": { "type": "string", "format": "date-time", "description": "Only return instances created at or before this time. Accepts ISO 8601 with no timezone offsets and in UTC." } } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "items": { "$ref": "#/components/schemas/workflows_instance" }, "type": "array" }, "result_info": { "properties": { "page": { "type": "number" }, "per_page": { "type": "number" }, "total_count": { "type": "number" }, "total_pages": { "type": "number" } }, "type": "object" } }, "type": "object" } ] } } }, "description": "List Workflow Instances response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "List Workflow Instances response failure." } }, "summary": "List Workflow Instances", "tags": ["Workflows"] }, "post": { "description": "Creates a new workflow instance.", "operationId": "workflows-create-instance", "parameters": [ { "in": "path", "name": "workflow_name", "required": true, "schema": { "$ref": "#/components/schemas/workflows_workflow-name" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Optional instance ID. If not provided, a UUID is generated." }, "params": { "description": "Optional JSON payload to pass to the workflow." } } } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "type": "object", "properties": { "id": { "type": "string", "description": "The instance ID of the newly created workflow instance." } }, "required": ["id"] } }, "type": "object" } ] } } }, "description": "Create Workflow Instance response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Create Workflow Instance response failure." } }, "summary": "Create Workflow Instance", "tags": ["Workflows"] } }, "/workflows/{workflow_name}/instances/batch/delete": { "post": { "description": "Deletes multiple workflow instances.", "operationId": "workflows-batch-delete-instances", "parameters": [ { "in": "path", "name": "workflow_name", "required": true, "schema": { "$ref": "#/components/schemas/workflows_workflow-name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "instances": { "type": "array", "minItems": 1, "maxItems": 100, "items": { "type": "string", "minLength": 1, "maxLength": 271, "pattern": "^[a-zA-Z0-9, */#_-]+$" } } }, "required": ["instances"] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "type": "object", "properties": { "result": { "type": "object", "properties": { "deleted": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" } }, "required": ["id"] } }, "errors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "code": { "type": "number" }, "message": { "type": "string" } }, "required": ["id", "code", "message"] } } }, "required": ["deleted", "errors"] } } } ] } } }, "description": "Batch delete Workflow Instances response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Batch delete Workflow Instances response failure." } }, "summary": "Batch Delete Workflow Instances", "tags": ["Workflows"] } }, "/workflows/{workflow_name}/instances/{instance_id}": { "get": { "description": "Returns the status details of a workflow instance.", "operationId": "workflows-get-instance-details", "parameters": [ { "in": "path", "name": "workflow_name", "required": true, "schema": { "$ref": "#/components/schemas/workflows_workflow-name" } }, { "in": "path", "name": "instance_id", "required": true, "schema": { "$ref": "#/components/schemas/workflows_instance-id" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "$ref": "#/components/schemas/workflows_instance-details" } }, "type": "object" } ] } } }, "description": "Get Workflow Instance Details response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Get Workflow Instance Details response failure." } }, "summary": "Get Workflow Instance Details", "tags": ["Workflows"] }, "delete": { "description": "Deletes a workflow instance by removing its persistence files.", "operationId": "workflows-delete-instance", "parameters": [ { "in": "path", "name": "workflow_name", "required": true, "schema": { "$ref": "#/components/schemas/workflows_workflow-name" } }, { "in": "path", "name": "instance_id", "required": true, "schema": { "$ref": "#/components/schemas/workflows_instance-id" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "type": "object", "properties": { "success": { "type": "boolean" } } } }, "type": "object" } ] } } }, "description": "Delete Workflow Instance response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Delete Workflow Instance response failure." } }, "summary": "Delete Workflow Instance", "tags": ["Workflows"] } }, "/workflows/{workflow_name}/instances/{instance_id}/events/{event_type}": { "post": { "description": "Sends an event to a workflow instance.", "operationId": "workflows-send-instance-event", "parameters": [ { "in": "path", "name": "workflow_name", "required": true, "schema": { "$ref": "#/components/schemas/workflows_workflow-name" } }, { "in": "path", "name": "instance_id", "required": true, "schema": { "$ref": "#/components/schemas/workflows_instance-id" } }, { "in": "path", "name": "event_type", "required": true, "schema": { "type": "string", "description": "The event type to send." } } ], "requestBody": { "content": { "application/json": { "schema": { "description": "Optional JSON payload for the event." } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common" } } }, "description": "Send Event response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Send Event response failure." } }, "summary": "Send Event to Workflow Instance", "tags": ["Workflows"] } }, "/local/observability/query": { "post": { "description": "Runs a single read-only SQL query against the local trace store and returns { columns, rows }.\n\nOnly one SELECT/WITH statement is allowed; writes, DDL, PRAGMA, ATTACH, and multiple statements are rejected, and at most 10000 rows are returned.\nBind values with `params` rather than string-interpolating them.\n`attributes` is stored as JSONB — wrap it with `json(attributes)` to read it back as JSON.\n\nSchema (the query contract):\n\nCREATE TABLE spans (\n trace_id TEXT NOT NULL, span_id TEXT NOT NULL, parent_id TEXT, -- parent_id IS NULL on a root (invocation) span\n service TEXT, -- owning worker name (multi-worker attribution)\n name TEXT, kind TEXT,\n start_ms INTEGER, -- absolute epoch ms\n duration_ms INTEGER, -- whole ms; NULL while the span is still running\n outcome TEXT, error TEXT,\n attributes BLOB, -- JSONB; read via json(attributes)\n created_at TEXT,\n PRIMARY KEY (trace_id, span_id)\n);\n-- index spans_roots ON spans (start_ms) WHERE parent_id IS NULL\n\nCREATE TABLE logs (\n trace_id TEXT NOT NULL, span_id TEXT,\n seq INTEGER NOT NULL, -- order within the trace\n ts_ms INTEGER, level TEXT, message TEXT, -- message is a JSON-encoded console arg array\n operation TEXT, created_at TEXT,\n PRIMARY KEY (trace_id, seq)\n);", "operationId": "observability-query", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "sql": { "type": "string", "description": "A single read-only SELECT/WITH query against the spans/logs schema above." }, "params": { "type": "array", "items": {}, "description": "Values bound to `?` placeholders in the query, in order." } }, "required": ["sql"] } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "$ref": "#/components/schemas/observability_query-result" } }, "type": "object" } ] } } }, "description": "Query response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Query response failure." } }, "summary": "Query Observability Store", "tags": ["Observability"] } }, "/local/observability/clear": { "post": { "description": "Deletes all captured spans and logs from the local trace store.", "operationId": "observability-clear", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common" } } }, "description": "Clear response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Clear response failure." } }, "summary": "Clear Observability Store", "tags": ["Observability"] } }, "/flagship/apps": { "get": { "description": "Returns the Flagship apps bound for local development.", "operationId": "flagship-list-apps", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "items": { "$ref": "#/components/schemas/flagship_app" }, "type": "array" } }, "type": "object" } ] } } }, "description": "List Flagship Apps response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "List Flagship Apps response failure." } }, "summary": "List Flagship Apps", "tags": ["Flagship"] } }, "/flagship/apps/{app_id}/flags": { "get": { "description": "Returns the flags in a local Flagship app.", "operationId": "flagship-list-flags", "parameters": [ { "in": "path", "name": "app_id", "required": true, "schema": { "type": "string" } }, { "description": "Worker whose local Flagship store should be used.", "in": "query", "name": "worker", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "items": { "$ref": "#/components/schemas/flagship_flag" }, "type": "array" } }, "type": "object" } ] } } }, "description": "List Flagship Flags response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "List Flagship Flags response failure." } }, "summary": "List Flagship Flags", "tags": ["Flagship"] }, "post": { "description": "Creates a flag in a local Flagship app.", "operationId": "flagship-create-flag", "parameters": [ { "in": "path", "name": "app_id", "required": true, "schema": { "type": "string" } }, { "description": "Worker whose local Flagship store should be used.", "in": "query", "name": "worker", "required": false, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "required": ["key", "default_variation", "variations"], "properties": { "key": { "description": "Flag key", "type": "string" }, "description": { "description": "Human readable description", "nullable": true, "type": "string" }, "enabled": { "description": "Whether the flag is enabled", "type": "boolean" }, "default_variation": { "description": "Variation served when no rule matches", "type": "string" }, "variations": { "additionalProperties": true, "description": "Named values the flag can serve", "type": "object" }, "rules": { "description": "Targeting rules, in priority order", "items": { "$ref": "#/components/schemas/flagship_rule" }, "type": "array" } }, "type": "object" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "$ref": "#/components/schemas/flagship_flag" } }, "type": "object" } ] } } }, "description": "Create Flagship Flag response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Create Flagship Flag response failure." } }, "summary": "Create Flagship Flag", "tags": ["Flagship"] } }, "/flagship/apps/{app_id}/flags/{flag_key}": { "patch": { "description": "Updates a flag. Omitted fields keep their current values; provided rules replace the existing ones.", "operationId": "flagship-update-flag", "parameters": [ { "in": "path", "name": "app_id", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "flag_key", "required": true, "schema": { "type": "string" } }, { "description": "Worker whose local Flagship store should be used.", "in": "query", "name": "worker", "required": false, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "properties": { "description": { "description": "Human readable description", "nullable": true, "type": "string" }, "enabled": { "description": "Whether the flag is enabled", "type": "boolean" }, "default_variation": { "description": "Variation served when no rule matches", "type": "string" }, "variations": { "additionalProperties": true, "description": "Named values the flag can serve", "type": "object" }, "rules": { "description": "Targeting rules, in priority order", "items": { "$ref": "#/components/schemas/flagship_rule" }, "type": "array" } }, "type": "object" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "$ref": "#/components/schemas/flagship_flag" } }, "type": "object" } ] } } }, "description": "Update Flagship Flag response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Update Flagship Flag response failure." } }, "summary": "Update Flagship Flag", "tags": ["Flagship"] }, "delete": { "description": "Deletes a flag from a local Flagship app.", "operationId": "flagship-delete-flag", "parameters": [ { "in": "path", "name": "app_id", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "flag_key", "required": true, "schema": { "type": "string" } }, { "description": "Worker whose local Flagship store should be used.", "in": "query", "name": "worker", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "properties": { "success": { "type": "boolean" } }, "type": "object" } }, "type": "object" } ] } } }, "description": "Delete Flagship Flag response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Delete Flagship Flag response failure." } }, "summary": "Delete Flagship Flag", "tags": ["Flagship"] } }, "/flagship/apps/{app_id}/flags/{flag_key}/evaluate": { "post": { "description": "Evaluates a flag against an evaluation context, as a Worker binding would.", "operationId": "flagship-evaluate-flag", "parameters": [ { "in": "path", "name": "app_id", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "flag_key", "required": true, "schema": { "type": "string" } }, { "description": "Worker whose local Flagship store should be used.", "in": "query", "name": "worker", "required": false, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "properties": { "context": { "additionalProperties": true, "description": "Attributes used for rule matching and rollout bucketing.", "type": "object" } }, "type": "object" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result": { "$ref": "#/components/schemas/flagship_evaluation" } }, "type": "object" } ] } } }, "description": "Evaluate Flagship Flag response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Evaluate Flagship Flag response failure." } }, "summary": "Evaluate Flagship Flag", "tags": ["Flagship"] } } }, "components": { "schemas": { "r2_v4_response": { "type": "object", "properties": { "errors": { "$ref": "#/components/schemas/r2_errors" }, "messages": { "$ref": "#/components/schemas/r2_messages" }, "result": { "type": "object" }, "success": { "description": "Whether the API call was successful.", "type": "boolean", "enum": [true] } }, "required": ["success", "errors", "messages", "result"] }, "r2_messages": { "type": "array", "items": { "type": "string" } }, "r2_errors": { "type": "array", "items": { "properties": { "code": { "type": "integer", "minimum": 1000 }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object", "uniqueItems": true } }, "r2_bucket_name": { "description": "Name of the bucket.", "type": "string", "example": "example-bucket", "maxLength": 64, "minLength": 3, "pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]" }, "r2_v4_response_failure": { "type": "object", "properties": { "errors": { "$ref": "#/components/schemas/r2_errors" }, "messages": { "$ref": "#/components/schemas/r2_messages" }, "result": { "type": "object", "enum": [null], "nullable": true }, "success": { "description": "Whether the API call was successful.", "type": "boolean", "example": false, "enum": [false] } }, "required": ["success", "errors", "messages", "result"] }, "r2_bucket": { "description": "A single R2 bucket.", "type": "object", "properties": { "creation_date": { "description": "Creation timestamp.", "type": "string" }, "name": { "$ref": "#/components/schemas/r2_bucket_name" } } }, "r2_v4_response_list": { "allOf": [ { "$ref": "#/components/schemas/r2_v4_response" }, { "properties": { "result_info": { "$ref": "#/components/schemas/r2_result_info" } }, "type": "object" } ] }, "r2_result_info": { "type": "object", "properties": {} }, "workers_cursor": { "description": "Opaque token indicating the position from which to continue when requesting the next set of records. A valid value for the cursor can be obtained from the cursors object in the result_info structure.", "type": "string", "example": "AAAAANuhDN7SjacTnSVsDu3WW1Lvst6dxJGTjRY5BhxPXdf6L6uTcpd_NVtjhn11OUYRsVEykxoUwF-JQU4dn6QylZSKTOJuG0indrdn_MlHpMRtsxgXjs-RPdHYIVm3odE_uvEQ_dTQGFm8oikZMohns34DLBgrQpc" }, "workers_object": { "type": "object", "properties": { "hasStoredData": { "description": "Whether the Durable Object has stored data.", "type": "boolean", "example": true, "readOnly": true }, "id": { "description": "ID of the Durable Object.", "type": "string", "example": "fe7803fc55b964e09d94666545aab688d360c6bda69ba349ced1e5f28d2fc2c8", "readOnly": true }, "name": { "type": "string", "description": "Name of the Durable Object instance, if created via idFromName().", "readOnly": true } } }, "workers_schemas-id": { "description": "ID of the namespace.", "type": "string", "example": "5fd1cafff895419c8bcc647fc64ab8f0" }, "workers_api-response-common-failure": { "type": "object", "properties": { "errors": { "example": [ { "code": 7003, "message": "No route for the URI" } ], "allOf": [ { "$ref": "#/components/schemas/workers_messages" } ], "minLength": 1 }, "messages": { "example": [], "allOf": [ { "$ref": "#/components/schemas/workers_messages" } ] }, "result": { "type": "object", "enum": [null], "nullable": true }, "success": { "description": "Whether the API call was successful.", "type": "boolean", "example": false, "enum": [false] } }, "required": ["success", "errors", "messages", "result"] }, "workers_messages": { "type": "array", "items": { "properties": { "code": { "type": "integer", "minimum": 1000 }, "documentation_url": { "type": "string" }, "message": { "type": "string" }, "source": { "type": "object", "properties": { "pointer": { "type": "string" } } } }, "required": ["code", "message"], "type": "object", "uniqueItems": true }, "example": [] }, "workers_namespace": { "type": "object", "properties": { "class": { "type": "string" }, "id": { "type": "string", "readOnly": true }, "name": { "type": "string" }, "script": { "type": "string" }, "use_sqlite": { "type": "boolean" } } }, "workers_api-response-collection": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result_info": { "type": "object", "properties": { "count": { "description": "Total number of results for the requested service.", "type": "number", "example": 1 }, "page": { "description": "Current page within paginated list of results.", "type": "number", "example": 1 }, "per_page": { "description": "Number of results per page of results.", "type": "number", "example": 20 }, "total_count": { "description": "Total results available without any search parameters.", "type": "number", "example": 2000 }, "total_pages": { "description": "The number of total pages in the entire result set.", "type": "number", "example": 100 } } } }, "type": "object" } ] }, "workers_api-response-common": { "type": "object", "properties": { "errors": { "$ref": "#/components/schemas/workers_messages" }, "messages": { "$ref": "#/components/schemas/workers_messages" }, "success": { "description": "Whether the API call was successful.", "type": "boolean", "example": true, "enum": [true] } }, "required": ["success", "errors", "messages"] }, "d1_raw-result-response": { "type": "object", "properties": { "meta": { "$ref": "#/components/schemas/d1_query-meta" }, "results": { "type": "object", "properties": { "columns": { "type": "array", "items": { "type": "string" } }, "rows": { "type": "array", "items": { "items": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "object" } ] }, "type": "array" } } } }, "success": { "type": "boolean" } } }, "d1_query-meta": { "type": "object", "properties": { "changed_db": { "description": "Denotes if the database has been altered in some way, like deleting rows.", "type": "boolean" }, "changes": { "description": "Rough indication of how many rows were modified by the query, as provided by SQLite's `sqlite3_total_changes()`.", "type": "number" }, "duration": { "description": "The duration of the SQL query execution inside the database. Does not include any network communication.", "type": "number" }, "last_row_id": { "description": "The row ID of the last inserted row in a table with an `INTEGER PRIMARY KEY` as provided by SQLite. Tables created with `WITHOUT ROWID` do not populate this.", "type": "number" }, "rows_read": { "description": "Number of rows read during the SQL query execution, including indices (not all rows are necessarily returned).", "type": "number" }, "rows_written": { "description": "Number of rows written during the SQL query execution, including indices.", "type": "number" }, "size_after": { "description": "Size of the database after the query committed, in bytes.", "type": "number" }, "timings": { "description": "Various durations for the query.", "type": "object", "properties": { "sql_duration_ms": { "description": "The duration of the SQL query execution inside the database. Does not include any network communication.", "type": "number" } } } } }, "d1_batch-query": { "description": "A single query object or a batch query object", "oneOf": [ { "$ref": "#/components/schemas/d1_single-query" }, { "properties": { "batch": { "type": "array", "items": { "$ref": "#/components/schemas/d1_single-query" } } }, "required": ["batch"], "title": "multiple queries", "type": "object" } ] }, "d1_single-query": { "description": "A single query with or without parameters", "type": "object", "properties": { "params": { "$ref": "#/components/schemas/d1_params" }, "sql": { "$ref": "#/components/schemas/d1_sql" } }, "required": ["sql"], "title": "single query" }, "d1_sql": { "description": "Your SQL query. Supports multiple statements, joined by semicolons, which will be executed as a batch.", "type": "string", "example": "SELECT * FROM myTable WHERE field = ? OR field = ?;" }, "d1_params": { "type": "array", "items": { "type": "string" }, "example": ["firstParam", "secondParam"] }, "d1_database-identifier": { "description": "D1 database identifier (UUID).", "type": "string", "example": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "readOnly": true }, "d1_api-response-common-failure": { "type": "object", "properties": { "errors": { "example": [ { "code": 7003, "message": "No route for the URI" } ], "allOf": [ { "$ref": "#/components/schemas/d1_messages" } ], "minLength": 1 }, "messages": { "example": [], "allOf": [ { "$ref": "#/components/schemas/d1_messages" } ] }, "result": { "type": "object", "enum": [null], "nullable": true }, "success": { "description": "Whether the API call was successful", "type": "boolean", "example": false, "enum": [false] } }, "required": ["success", "errors", "messages", "result"] }, "d1_messages": { "type": "array", "items": { "properties": { "code": { "type": "integer", "minimum": 1000 }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object", "uniqueItems": true }, "example": [] }, "d1_database-response": { "type": "object", "properties": { "jurisdiction": { "$ref": "#/components/schemas/d1_jurisdiction-nullable" }, "name": { "$ref": "#/components/schemas/d1_database-name" }, "uuid": { "$ref": "#/components/schemas/d1_database-identifier" }, "version": { "$ref": "#/components/schemas/d1_database-version" } } }, "d1_database-version": { "type": "string", "example": "production", "pattern": "^(alpha|beta|production)$" }, "d1_database-name": { "description": "D1 database name.", "type": "string", "example": "my-database", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$" }, "d1_jurisdiction-nullable": { "description": "Specify the location to restrict the D1 database to run and store data. If this option is present, the location hint is ignored.", "type": "string", "example": "eu", "enum": ["eu", "fedramp", "us"], "nullable": true }, "d1_api-response-common": { "type": "object", "properties": { "errors": { "$ref": "#/components/schemas/d1_messages" }, "messages": { "$ref": "#/components/schemas/d1_messages" }, "result": { "type": "object" }, "success": { "description": "Whether the API call was successful", "type": "boolean", "example": true, "enum": [true] } }, "required": ["success", "errors", "messages", "result"] }, "workers-kv_bulk-get-result-with-metadata": { "type": "object", "properties": { "values": { "description": "Requested keys are paired with their values and metadata in an object.", "type": "object", "example": { "key1": { "expiration": 1577836800, "metadata": { "someMetadataKey": "someMetadataValue" }, "value": "value1" }, "key2": { "metadata": { "anotherKey": "anotherValue" }, "value": "value2" } }, "additionalProperties": { "nullable": true, "properties": { "expiration": { "$ref": "#/components/schemas/workers-kv_expiration" }, "metadata": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_any" }, { "description": "The metadata associated with the key." } ] }, "value": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_any" }, { "description": "The value associated with the key." } ] } }, "required": ["value", "metadata"], "type": "object" } } } }, "workers-kv_any": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "integer" }, { "type": "boolean" }, { "additionalProperties": true, "nullable": true, "type": "object" }, { "items": { "$ref": "#/components/schemas/workers-kv_any" }, "type": "array" } ] }, "workers-kv_expiration": { "description": "Expires the key at a certain time, measured in number of seconds since the UNIX epoch.", "type": "number", "example": 1578435000 }, "workers-kv_bulk-get-result": { "type": "object", "properties": { "values": { "description": "Requested keys are paired with their values in an object.", "type": "object", "example": { "key1": "value1", "key2": "value2" }, "additionalProperties": { "description": "The value associated with the key.", "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "additionalProperties": true, "type": "object" } ], "nullable": true } } } }, "workers-kv_key_name_bulk": { "description": "A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid.", "type": "string", "example": "My-Key", "maxLength": 512 }, "workers-kv_bulk_delete": { "type": "array", "items": { "$ref": "#/components/schemas/workers-kv_key_name_bulk" }, "maxItems": 10000 }, "workers-kv_bulk-result": { "type": "object", "properties": { "successful_key_count": { "description": "Number of keys successfully updated.", "type": "number", "example": 100 }, "unsuccessful_keys": { "description": "Name of the keys that failed to be fully updated. They should be retried.", "type": "array", "items": { "type": "string" } } } }, "workers-kv_bulk_write": { "type": "array", "items": { "properties": { "base64": { "description": "Indicates whether or not the server should base64 decode the value before storing it. Useful for writing values that wouldn't otherwise be valid JSON strings, such as images.", "type": "boolean", "default": false }, "expiration": { "$ref": "#/components/schemas/workers-kv_expiration" }, "expiration_ttl": { "$ref": "#/components/schemas/workers-kv_expiration_ttl" }, "key": { "$ref": "#/components/schemas/workers-kv_key_name_bulk" }, "metadata": { "$ref": "#/components/schemas/workers-kv_list_metadata" }, "value": { "description": "A UTF-8 encoded string to be stored, up to 25 MiB in length.", "type": "string", "example": "Some string", "maxLength": 26214400 } }, "required": ["key", "value"], "type": "object" }, "maxItems": 10000 }, "workers-kv_list_metadata": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_any" }, { "description": "Arbitrary JSON that is associated with a key.", "example": { "someMetadataKey": "someMetadataValue" } } ] }, "workers-kv_expiration_ttl": { "description": "Expires the key after a number of seconds. Must be at least 60.", "type": "number", "example": 300, "minimum": 60 }, "workers-kv_api-response-common-no-result": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_api-response-common" }, { "properties": { "result": { "type": "object", "nullable": true } }, "type": "object" } ] }, "workers-kv_api-response-common": { "type": "object", "properties": { "errors": { "$ref": "#/components/schemas/workers-kv_messages" }, "messages": { "$ref": "#/components/schemas/workers-kv_messages" }, "success": { "description": "Whether the API call was successful.", "type": "boolean", "example": true, "enum": [true] } }, "required": ["success", "errors", "messages"] }, "workers-kv_messages": { "type": "array", "items": { "properties": { "code": { "type": "integer", "minimum": 1000 }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" }, "example": [], "uniqueItems": true }, "workers-kv_metadata": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_any" }, { "description": "Associates arbitrary JSON data with a key/value pair.", "example": { "someMetadataKey": "someMetadataValue" } } ] }, "workers-kv_value": { "description": "A byte sequence to be stored, up to 25 MiB in length.", "example": "Some Value", "anyOf": [ { "type": "string" }, { "format": "binary", "type": "string" } ] }, "workers-kv_key_name": { "description": "A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.", "type": "string", "example": "My-Key", "maxLength": 512 }, "workers-kv_cursor_result_info": { "type": "object", "properties": { "count": { "description": "Total results returned based on your list parameters.", "type": "number", "example": 1 }, "cursor": { "$ref": "#/components/schemas/workers-kv_cursor" } } }, "workers-kv_cursor": { "description": "Opaque token indicating the position from which to continue when requesting the next set of records if the amount of list results was limited by the limit parameter. A valid value for the cursor can be obtained from the cursors object in the result_info structure.", "type": "string", "example": "6Ck1la0VxJ0djhidm1MdX2FyDGxLKVeeHZZmORS_8XeSuhz9SjIJRaSa2lnsF01tQOHrfTGAP3R5X1Kv5iVUuMbNKhWNAXHOl6ePB0TUL8nw" }, "workers-kv_key": { "description": "A name for a value. A value stored under a given key may be retrieved via the same key.", "type": "object", "properties": { "expiration": { "description": "The time, measured in number of seconds since the UNIX epoch, at which the key will expire. This property is omitted for keys that will not expire.", "type": "number", "example": 1577836800 }, "metadata": { "$ref": "#/components/schemas/workers-kv_list_metadata" }, "name": { "$ref": "#/components/schemas/workers-kv_key_name" } }, "required": ["name"] }, "workers-kv_namespace_identifier": { "description": "Namespace identifier tag.", "type": "string", "example": "0f2ac74b498b48028cb68387c421e279", "maxLength": 32, "readOnly": true }, "workers-kv_api-response-common-failure": { "type": "object", "properties": { "errors": { "example": [ { "code": 7003, "message": "No route for the URI" } ], "allOf": [ { "$ref": "#/components/schemas/workers-kv_messages" } ], "minLength": 1 }, "messages": { "example": [], "allOf": [ { "$ref": "#/components/schemas/workers-kv_messages" } ] }, "result": { "type": "object", "nullable": true }, "success": { "description": "Whether the API call was successful.", "type": "boolean", "example": false, "enum": [false] } }, "required": ["success", "errors", "messages", "result"] }, "workers-kv_namespace": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/workers-kv_namespace_identifier" }, "title": { "$ref": "#/components/schemas/workers-kv_namespace_title" } }, "required": ["id", "title"] }, "workers-kv_namespace_title": { "description": "A human-readable string name for a Namespace.", "type": "string", "example": "My Own Namespace", "maxLength": 512 }, "workers-kv_api-response-collection": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/workers-kv_api-response-common" }, { "properties": { "result_info": { "$ref": "#/components/schemas/workers-kv_result_info" } }, "type": "object" } ] }, "workers-kv_result_info": { "type": "object", "properties": { "count": { "description": "Total number of results for the requested service.", "type": "number", "example": 1 } } }, "local-explorer_scheduled-request": { "type": "object", "required": ["cron"], "properties": { "cron": { "type": "string", "pattern": ".*\\S.*" }, "scheduled_time": { "type": "integer", "minimum": -9223372036854, "maximum": 9223372036854, "description": "Epoch milliseconds within workerd's signed 64-bit nanosecond range." } } }, "local-explorer_scheduled-result": { "type": "object", "required": ["outcome", "noRetry"], "additionalProperties": true, "properties": { "outcome": { "type": "string" }, "noRetry": { "type": "boolean" } } }, "flagship_app": { "type": "object", "required": ["id", "bindings"], "properties": { "id": { "type": "string", "description": "The Flagship app id the bindings point at" }, "bindings": { "type": "array", "items": { "type": "string" }, "description": "Binding names in this instance using the app" } } }, "flagship_base-condition": { "type": "object", "required": ["attribute", "operator", "value"], "properties": { "attribute": { "type": "string" }, "operator": { "type": "string", "enum": [ "equals", "not_equals", "greater_than", "less_than", "greater_than_or_equals", "less_than_or_equals", "contains", "starts_with", "ends_with", "in", "not_in", "has", "not_has" ] }, "value": {} } }, "flagship_logical-condition": { "type": "object", "required": ["logical_operator", "clauses"], "properties": { "logical_operator": { "type": "string", "enum": ["AND", "OR"] }, "clauses": { "type": "array", "items": { "$ref": "#/components/schemas/flagship_condition" } } } }, "flagship_condition": { "oneOf": [ { "$ref": "#/components/schemas/flagship_base-condition" }, { "$ref": "#/components/schemas/flagship_logical-condition" } ] }, "flagship_rule": { "type": "object", "required": ["priority", "conditions", "serve_variation"], "properties": { "priority": { "type": "integer", "description": "Evaluation order, lowest first" }, "conditions": { "type": "array", "items": { "$ref": "#/components/schemas/flagship_condition" }, "description": "Conditions that must match for the rule to apply" }, "serve_variation": { "type": "string", "description": "Variation served when the rule matches" }, "rollout": { "type": "object", "required": ["percentage"], "properties": { "percentage": { "type": "number", "minimum": 0, "maximum": 100, "multipleOf": 0.01 }, "attribute": { "type": "string" } }, "description": "Percentage rollout applied to matching contexts" } } }, "flagship_flag": { "type": "object", "required": [ "key", "type", "enabled", "default_variation", "variations", "rules", "updated_at" ], "properties": { "key": { "type": "string", "description": "Flag key" }, "type": { "type": "string", "enum": ["boolean", "string", "number", "json"], "description": "Type shared by the flag's variations" }, "description": { "description": "Human readable description", "nullable": true, "type": "string" }, "enabled": { "description": "Whether the flag is enabled", "type": "boolean" }, "default_variation": { "description": "Variation served when no rule matches", "type": "string" }, "variations": { "additionalProperties": true, "description": "Named values the flag can serve", "type": "object" }, "rules": { "description": "Targeting rules, in priority order", "items": { "$ref": "#/components/schemas/flagship_rule" }, "type": "array" }, "updated_at": { "type": "string", "description": "When the flag was last written locally" } } }, "flagship_evaluation": { "type": "object", "required": ["flagKey", "value", "variant", "reason"], "properties": { "flagKey": { "type": "string" }, "value": { "description": "The resolved flag value" }, "variant": { "type": "string", "description": "Name of the variation served" }, "reason": { "type": "string", "enum": [ "STATIC", "TARGETING_MATCH", "DEFAULT", "DISABLED", "SPLIT", "ERROR" ], "description": "Why this value was served" }, "errorCode": { "type": "string" }, "errorMessage": { "type": "string" } } }, "r2_object": { "type": "object", "properties": { "key": { "type": "string", "description": "Object key (path)" }, "etag": { "type": "string", "description": "Object ETag" }, "size": { "type": "integer", "description": "Object size in bytes" }, "last_modified": { "type": "string", "format": "date-time", "description": "Last modified timestamp" }, "http_metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "HTTP metadata for the object" }, "custom_metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Custom user-defined metadata" } } }, "r2_list-objects-result-info": { "type": "object", "properties": { "delimited": { "type": "array", "items": { "type": "string" }, "description": "Common prefixes when using delimiter (virtual directories)" }, "cursor": { "type": "string", "description": "Cursor for fetching next page of results" }, "is_truncated": { "type": "string", "description": "Whether there are more results to fetch" } } }, "r2_head-object-result": { "type": "object", "properties": { "key": { "type": "string", "description": "Object key (path)" }, "etag": { "type": "string", "description": "Object ETag" }, "last_modified": { "type": "string", "description": "Last modified timestamp" }, "size": { "type": "integer", "description": "Object size in bytes" }, "http_metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "HTTP metadata for the object" }, "custom_metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Custom user-defined metadata" } } }, "r2_put-object-result": { "type": "object", "properties": { "key": { "type": "string", "description": "Object key (path)" }, "etag": { "type": "string", "description": "Object ETag" }, "size": { "type": "integer", "description": "Object size in bytes" }, "version": { "type": "string", "description": "Object version ID" } } }, "do_sql-with-params": { "type": "object", "required": ["sql"], "properties": { "sql": { "type": "string", "minLength": 1, "description": "SQL query to execute" }, "params": { "type": "array", "items": {}, "description": "Optional parameters for the SQL query" } } }, "do_query-by-id": { "type": "object", "required": ["durable_object_id", "queries"], "properties": { "durable_object_id": { "type": "string", "minLength": 1, "description": "Hex string ID of the Durable Object" }, "queries": { "type": "array", "items": { "$ref": "#/components/schemas/do_sql-with-params" }, "description": "Array of SQL queries to execute" } } }, "do_query-by-name": { "type": "object", "required": ["durable_object_name", "queries"], "properties": { "durable_object_name": { "type": "string", "minLength": 1, "description": "Name to derive DO ID via idFromName()" }, "queries": { "type": "array", "items": { "$ref": "#/components/schemas/do_sql-with-params" }, "description": "Array of SQL queries to execute" } } }, "do_raw-query-result": { "type": "object", "properties": { "columns": { "type": "array", "items": { "type": "string" }, "description": "Column names from the query result" }, "rows": { "type": "array", "items": { "type": "array", "items": {} }, "description": "Array of row arrays containing query results" }, "meta": { "type": "object", "properties": { "rows_read": { "type": "number", "description": "Number of rows read during query execution" }, "rows_written": { "type": "number", "description": "Number of rows written during query execution" } } } } }, "local-explorer_worker": { "type": "object", "required": ["isSelf", "name"], "properties": { "isSelf": { "type": "boolean", "description": "Whether this worker is the one hosting the explorer" }, "name": { "type": "string", "description": "Worker name from the dev registry" }, "persistenceScope": { "type": "string", "description": "Opaque stable identifier for the worker's local project, used to scope browser persistence without exposing its filesystem path" }, "bindings": { "$ref": "#/components/schemas/local-explorer_worker-bindings", "description": "Resource bindings for this worker" }, "triggers": { "$ref": "#/components/schemas/local-explorer_worker-triggers", "description": "Configured triggers for this worker" } } }, "local-explorer_worker-triggers": { "type": "object", "description": "Trigger metadata for a worker", "required": ["crons"], "properties": { "crons": { "type": "array", "items": { "type": "string" }, "description": "Exact configured Cron Trigger expressions" } } }, "local-explorer_worker-bindings": { "type": "object", "description": "Resource bindings for a worker", "properties": { "kv": { "type": "array", "items": { "$ref": "#/components/schemas/local-explorer_resource-binding" }, "description": "KV namespace bindings" }, "d1": { "type": "array", "items": { "$ref": "#/components/schemas/local-explorer_resource-binding" }, "description": "D1 database bindings" }, "r2": { "type": "array", "items": { "$ref": "#/components/schemas/local-explorer_resource-binding" }, "description": "R2 bucket bindings" }, "do": { "type": "array", "items": { "$ref": "#/components/schemas/local-explorer_do-binding" }, "description": "Durable Object bindings" }, "workflows": { "type": "array", "items": { "$ref": "#/components/schemas/local-explorer_workflow-binding" }, "description": "Workflow bindings" }, "sendEmail": { "type": "array", "items": { "$ref": "#/components/schemas/local-explorer_named-binding" }, "description": "Send Email bindings" }, "flagship": { "type": "array", "items": { "$ref": "#/components/schemas/local-explorer_resource-binding" }, "description": "Flagship app bindings" } } }, "local-explorer_named-binding": { "type": "object", "required": ["bindingName"], "properties": { "bindingName": { "type": "string", "description": "Name of the binding in the worker's env" } } }, "local-explorer_resource-binding": { "type": "object", "required": ["id", "bindingName"], "properties": { "id": { "type": "string", "description": "Unique identifier for the resource" }, "bindingName": { "type": "string", "description": "Name of the binding in the worker's env" } } }, "local-explorer_do-binding": { "type": "object", "required": [ "id", "bindingName", "className", "scriptName", "useSqlite" ], "properties": { "id": { "type": "string", "description": "Unique identifier (scriptName-className)" }, "bindingName": { "type": "string", "description": "Name of the binding in the worker's env" }, "className": { "type": "string", "description": "Durable Object class name" }, "scriptName": { "type": "string", "description": "Script containing the Durable Object" }, "useSqlite": { "type": "boolean", "description": "Whether the Durable Object uses SQLite storage" } } }, "local-explorer_workflow-binding": { "type": "object", "required": ["id", "bindingName", "className", "scriptName"], "properties": { "id": { "type": "string", "description": "Workflow name" }, "bindingName": { "type": "string", "description": "Name of the binding in the worker's env" }, "className": { "type": "string", "description": "Workflow entrypoint class name" }, "scriptName": { "type": "string", "description": "Script containing the workflow" } } }, "workflows_workflow-name": { "description": "The name of the workflow.", "example": "my-workflow", "type": "string" }, "workflows_instance-id": { "description": "The unique identifier of a workflow instance.", "example": "my-instance-id", "type": "string" }, "workflows_workflow": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the workflow." }, "class_name": { "type": "string", "description": "The entrypoint class name of the workflow." }, "script_name": { "type": "string", "description": "The script name containing the workflow." } }, "required": ["name"] }, "workflows_workflow-details": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the workflow." }, "class_name": { "type": "string", "description": "The entrypoint class name." }, "script_name": { "type": "string", "description": "The script containing the workflow." }, "instances": { "type": "object", "description": "Instance counts by status.", "properties": { "complete": { "type": "number" }, "errored": { "type": "number" }, "paused": { "type": "number" }, "queued": { "type": "number" }, "running": { "type": "number" }, "terminated": { "type": "number" }, "waiting": { "type": "number" }, "waitingForPause": { "type": "number" } } } }, "required": ["name", "class_name", "script_name", "instances"] }, "workflows_instance": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the workflow instance." }, "status": { "type": "string", "enum": [ "queued", "running", "paused", "errored", "terminated", "complete", "waitingForPause", "waiting", "unknown" ], "description": "The current status of the instance." }, "created_on": { "type": "string", "description": "ISO 8601 timestamp of when the instance was created." } }, "required": ["id"] }, "workflows_instance-details": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the workflow instance." }, "status": { "type": "string", "enum": [ "queued", "running", "paused", "errored", "terminated", "complete", "waitingForPause", "waiting", "unknown" ], "description": "The current status of the instance." }, "output": { "description": "Output value if the workflow completed successfully." }, "error": { "type": "object", "properties": { "name": { "type": "string" }, "message": { "type": "string" } }, "description": "Error details if the workflow errored." } }, "required": ["id", "status"] }, "observability_query-result": { "type": "object", "description": "Columns and rows for a read-only SQL query.", "properties": { "columns": { "type": "array", "items": { "type": "string" } }, "rows": { "type": "array", "items": { "type": "array", "items": {} } } }, "required": ["columns", "rows"] }, "email_handler-event": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "enum": ["received", "reject", "unhandled"] }, "timestamp": { "type": "string", "description": "ISO 8601 timestamp of when the event occurred." } }, "required": ["type", "timestamp"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "enum": ["forward", "reply"] }, "timestamp": { "type": "string", "description": "ISO 8601 timestamp of when the event occurred." }, "messageId": { "type": "string", "description": "Correlates with the matching `forwards`/`replies` entry." } }, "required": ["type", "timestamp", "messageId"], "additionalProperties": false } ], "description": "One entry in the ordered lifecycle of what the handler did to the message. `received` is first for any message actually delivered to an `email()` handler. The exception is `unhandled`: when the Worker exports no `email()` handler the message never reaches one, so the timeline is a single `unhandled` event with no preceding `received`. `forward`/`reply` events carry a `messageId` correlating with the matching `forwards`/`replies` entry." }, "email_handler-forward": { "type": "object", "properties": { "messageId": { "type": "string" }, "recipient": { "type": "string", "description": "Envelope recipient the message was forwarded to." }, "headers": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "string" } ] }, "minItems": 2, "maxItems": 2 }, "description": "Headers added to the forwarded message." } }, "required": ["messageId", "recipient", "headers"], "additionalProperties": false }, "email_handler-reply": { "type": "object", "properties": { "messageId": { "type": "string" }, "sender": { "type": "string", "description": "Address the reply was sent from." }, "raw": { "type": "string", "description": "Raw MIME content of the reply. Omitted from the routing list; present on the detail response." }, "rawBase64": { "type": "string", "description": "Lossless base64 representation of the reply MIME." } }, "required": ["messageId", "sender"], "additionalProperties": false }, "email_base": { "type": "object", "properties": { "worker": { "type": "string", "description": "Worker associated with the email, if known." }, "from": { "type": "string", "description": "Envelope MAIL FROM address." }, "subject": { "type": "string" }, "messageId": { "type": "string", "description": "RFC Message-ID header value carried by the email." }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/email_attachment" }, "description": "Metadata for attachments parsed out of the email. The content itself is only available in the raw MIME." } }, "required": ["from", "subject", "messageId", "attachments"], "additionalProperties": false }, "email_routing-item": { "type": "object", "properties": { "worker": { "type": "string", "description": "Worker that handled this captured delivery." }, "from": { "type": "string", "description": "Envelope MAIL FROM address." }, "subject": { "type": "string" }, "messageId": { "type": "string", "description": "RFC Message-ID header value. This is message content and compatibility lookup material; captureId identifies the Routing record." }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/email_attachment" }, "description": "Metadata for attachments parsed out of the email. The content itself is only available in the raw MIME." }, "captureId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", "description": "Opaque identifier for this exact captured delivery." }, "editAndResendAvailable": { "type": "boolean", "description": "Whether this capture can be projected into the email composer." }, "editAndResendUnavailableReason": { "type": "string" }, "capturedPortion": { "type": "boolean", "description": "Whether this capture contains only a portion of the original message." }, "to": { "type": "string", "description": "Envelope RCPT TO address." }, "cc": { "type": "array", "items": { "type": "string" } }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "headerEntries": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "string" } ] }, "minItems": 2, "maxItems": 2 }, "description": "Email headers as ordered name/value pairs, including duplicates." }, "receivedAt": { "type": "string" }, "rawSize": { "type": "number" }, "outcome": { "type": "string", "enum": ["ok", "exception"], "description": "Whether the handler ran to completion or threw." }, "rejectReason": { "type": "string", "description": "Reason passed to setReject(), if the handler rejected the message." }, "forwards": { "type": "array", "items": { "$ref": "#/components/schemas/email_handler-forward" } }, "replies": { "type": "array", "items": { "$ref": "#/components/schemas/email_handler-reply" } }, "events": { "type": "array", "items": { "$ref": "#/components/schemas/email_handler-event" } } }, "required": [ "from", "subject", "messageId", "attachments", "to", "receivedAt", "rawSize", "outcome", "forwards", "replies", "events" ], "additionalProperties": false }, "email_routing-detail": { "type": "object", "properties": { "worker": { "type": "string" }, "from": { "type": "string", "description": "Envelope MAIL FROM address." }, "subject": { "type": "string" }, "messageId": { "type": "string", "description": "RFC Message-ID header value. This is message content and compatibility lookup material; captureId identifies the Routing record." }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/email_attachment" }, "description": "Metadata for attachments parsed out of the email. The content itself is only available in the raw MIME." }, "captureId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "editAndResendAvailable": { "type": "boolean" }, "editAndResendUnavailableReason": { "type": "string" }, "capturedPortion": { "type": "boolean" }, "to": { "type": "string", "description": "Envelope RCPT TO address." }, "cc": { "type": "array", "items": { "type": "string" } }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "headerEntries": { "type": "array", "items": { "type": "array", "items": { "anyOf": [ { "type": "string" }, { "type": "string" } ] }, "minItems": 2, "maxItems": 2 }, "description": "Email headers as ordered name/value pairs, including duplicates." }, "receivedAt": { "type": "string" }, "rawSize": { "type": "number" }, "outcome": { "type": "string", "enum": ["ok", "exception"], "description": "Whether the handler ran to completion or threw." }, "rejectReason": { "type": "string", "description": "Reason passed to setReject(), if the handler rejected the message." }, "forwards": { "type": "array", "items": { "$ref": "#/components/schemas/email_handler-forward" } }, "replies": { "type": "array", "items": { "$ref": "#/components/schemas/email_handler-reply" } }, "events": { "type": "array", "items": { "$ref": "#/components/schemas/email_handler-event" } }, "text": { "type": "string", "description": "Parsed plain text body, when present." }, "html": { "type": "string", "description": "Parsed HTML body, when present." }, "raw": { "type": "string", "description": "Raw MIME content of the received email." }, "rawBase64": { "type": "string", "description": "Lossless base64 representation of the received MIME." } }, "required": [ "worker", "from", "subject", "messageId", "attachments", "captureId", "editAndResendAvailable", "capturedPortion", "to", "receivedAt", "rawSize", "outcome", "forwards", "replies", "events", "raw" ], "additionalProperties": false }, "email_send-request": { "type": "object", "properties": { "from": { "type": "string", "description": "Sender address." }, "to": { "minItems": 1, "type": "array", "items": { "type": "string" }, "description": "Recipient addresses." }, "cc": { "type": "array", "items": { "type": "string" } }, "bcc": { "type": "array", "items": { "type": "string" } }, "replyTo": { "type": "string" }, "subject": { "type": "string" }, "text": { "type": "string", "description": "Plain text body." }, "html": { "type": "string", "description": "HTML body." }, "headers": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Custom headers to include on the message." }, "attachments": { "type": "array", "items": { "type": "object", "properties": { "filename": { "type": "string", "description": "Name the attachment is presented under." }, "type": { "type": "string", "description": "MIME type of the attachment, e.g. 'application/pdf'." }, "content": { "type": "string", "description": "Attachment content, base64-encoded. MessageBuilder takes raw bytes here, but this endpoint accepts JSON so the bytes must be base64-encoded." }, "contentId": { "type": "string", "description": "Content-ID for an inline attachment." }, "disposition": { "type": "string", "enum": ["inline", "attachment"], "description": "How the attachment is presented. Defaults to 'attachment'." } }, "required": ["filename", "type", "content"], "additionalProperties": false }, "description": "Attachments to include on the message, mirroring the MessageBuilder `attachments` entries accepted by a send_email binding. Adding any attachment composes the message as multipart/mixed." } }, "required": ["from", "to", "subject"], "additionalProperties": false, "description": "Fields for composing a test email, mirroring MessageBuilder." }, "email_attachment": { "type": "object", "properties": { "filename": { "type": "string" }, "contentType": { "type": "string" }, "disposition": { "type": "string", "enum": ["inline", "attachment"] }, "size": { "type": "number" } }, "required": ["filename", "contentType", "disposition", "size"], "additionalProperties": false, "description": "Metadata describing an attachment on a captured email, without its content." }, "email_sending-item": { "type": "object", "properties": { "worker": { "type": "string", "description": "Worker associated with the email, if known." }, "from": { "type": "string", "description": "Envelope MAIL FROM address." }, "subject": { "type": "string" }, "messageId": { "type": "string", "description": "RFC Message-ID header value that identifies this Sending record for detail lookup." }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/email_attachment" }, "description": "Metadata for attachments parsed out of the email. The content itself is only available in the raw MIME." }, "to": { "type": "array", "items": { "type": "string" } }, "cc": { "type": "array", "items": { "type": "string" } }, "bcc": { "type": "array", "items": { "type": "string" } }, "replyTo": { "type": "string" }, "sentAt": { "type": "string" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } } }, "required": [ "from", "subject", "messageId", "attachments", "to", "sentAt" ], "additionalProperties": false }, "email_sending-detail": { "type": "object", "properties": { "worker": { "type": "string", "description": "Worker associated with the email, if known." }, "from": { "type": "string", "description": "Envelope MAIL FROM address." }, "subject": { "type": "string" }, "messageId": { "type": "string", "description": "RFC Message-ID header value that identifies this Sending record for detail lookup." }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/email_attachment" }, "description": "Metadata for attachments parsed out of the email. The content itself is only available in the raw MIME." }, "to": { "type": "array", "items": { "type": "string" } }, "cc": { "type": "array", "items": { "type": "string" } }, "bcc": { "type": "array", "items": { "type": "string" } }, "replyTo": { "type": "string" }, "sentAt": { "type": "string" }, "headers": { "type": "object", "additionalProperties": { "type": "string" } }, "text": { "type": "string" }, "html": { "type": "string" }, "raw": { "type": "string", "description": "Raw MIME content, present when sent via the EmailMessage API." }, "rawBase64": { "type": "string", "description": "Lossless base64 representation of sent MIME." } }, "required": [ "from", "subject", "messageId", "attachments", "to", "sentAt" ], "additionalProperties": false } } } }