{ "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/explorer/api" } ], "paths": { "/storage/kv/namespaces": { "get": { "description": "Returns the namespaces owned by an account.", "operationId": "workers-kv-namespace-list-namespaces", "parameters": [ { "in": "query", "name": "order", "schema": { "description": "Field to order results by.", "enum": ["id", "title"], "example": "id", "type": "string" } }, { "in": "query", "name": "direction", "schema": { "description": "Direction to order namespaces.", "enum": ["asc", "desc"], "example": "asc", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_api-response-collection" }, { "properties": { "result": { "items": { "$ref": "#/components/schemas/workers-kv_namespace" }, "type": "array" } }, "type": "object" } ] } } }, "description": "List Namespaces response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_api-response-common-failure" } } }, "description": "List Namespaces response failure." } }, "summary": "List Namespaces", "tags": ["Workers KV Namespace"] } }, "/storage/kv/namespaces/{namespace_id}/keys": { "get": { "description": "Lists a namespace's keys.", "operationId": "workers-kv-namespace-list-a-namespace'-s-keys", "parameters": [ { "in": "path", "name": "namespace_id", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_namespace_identifier" } }, { "in": "query", "name": "limit", "schema": { "default": 1000, "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.", "maximum": 1000, "minimum": 10, "type": "number" } }, { "in": "query", "name": "prefix", "schema": { "description": "Filters returned keys by a name prefix. Exact matches and any key names that begin with the prefix will be returned.", "example": "My-Prefix", "type": "string" } }, { "in": "query", "name": "cursor", "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.", "example": "6Ck1la0VxJ0djhidm1MdX2FyDGxLKVeeHZZmORS_8XeSuhz9SjIJRaSa2lnsF01tQOHrfTGAP3R5X1Kv5iVUuMbNKhWNAXHOl6ePB0TUL8nw", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_api-response-common" }, { "properties": { "result": { "items": { "$ref": "#/components/schemas/workers-kv_key" }, "type": "array" }, "result_info": { "$ref": "#/components/schemas/workers-kv_cursor_result_info" } }, "type": "object" } ] } } }, "description": "List a Namespace's Keys response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_api-response-common-failure" } } }, "description": "List a Namespace's Keys response failure." } }, "summary": "List a Namespace's Keys", "tags": ["Workers KV Namespace"] } }, "/storage/kv/namespaces/{namespace_id}/values/{key_name}": { "get": { "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.", "operationId": "workers-kv-namespace-read-key-value-pair", "parameters": [ { "in": "path", "name": "key_name", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_key_name" } }, { "in": "path", "name": "namespace_id", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_namespace_identifier" } } ], "responses": { "200": { "content": { "application/octet-stream": { "schema": { "$ref": "#/components/schemas/workers-kv_value" } } }, "description": "Read key-value pair response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_api-response-common-failure" } } }, "description": "Read key-value pair response failure." } }, "summary": "Read key-value pair", "tags": ["Workers KV Namespace"] }, "put": { "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.", "operationId": "workers-kv-namespace-write-key-value-pair-with-metadata", "parameters": [ { "in": "path", "name": "key_name", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_key_name" } }, { "in": "path", "name": "namespace_id", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_namespace_identifier" } } ], "requestBody": { "content": { "application/octet-stream": { "schema": { "$ref": "#/components/schemas/workers-kv_value" } }, "multipart/form-data": { "encoding": { "metadata": { "contentType": "application/json" } }, "schema": { "properties": { "metadata": { "$ref": "#/components/schemas/workers-kv_metadata" }, "value": { "$ref": "#/components/schemas/workers-kv_value" } }, "required": ["value"], "type": "object" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_api-response-common-no-result" } } }, "description": "Write key-value pair with metadata response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_api-response-common-failure" } } }, "description": "Write key-value pair with metadata response failure." } }, "summary": "Write key-value pair with optional metadata", "tags": ["Workers KV Namespace"] }, "delete": { "description": "Remove a KV pair from the namespace. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name.", "operationId": "workers-kv-namespace-delete-key-value-pair", "parameters": [ { "in": "path", "name": "key_name", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_key_name" } }, { "in": "path", "name": "namespace_id", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_namespace_identifier" } } ], "requestBody": { "content": { "application/json": {} }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_api-response-common-no-result" } } }, "description": "Delete key-value pair response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_api-response-common-failure" } } }, "description": "Delete key-value pair response failure." } }, "summary": "Delete key-value pair", "tags": ["Workers KV Namespace"] } }, "/storage/kv/namespaces/{namespace_id}/bulk/get": { "post": { "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.", "operationId": "workers-kv-namespace-get-multiple-key-value-pairs", "parameters": [ { "in": "path", "name": "namespace_id", "required": true, "schema": { "$ref": "#/components/schemas/workers-kv_namespace_identifier" } } ], "requestBody": { "content": { "application/json": { "schema": { "properties": { "keys": { "description": "Array of keys to retrieve (maximum of 100).", "items": { "$ref": "#/components/schemas/workers-kv_key_name_bulk" }, "maxItems": 100, "type": "array" } }, "required": ["keys"], "type": "object" } } }, "required": true }, "responses": { "200": { "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" } ] } } }, "description": "Get multiple key-value pairs response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers-kv_api-response-common-failure" } } }, "description": "Get multiple key-value pairs response failure." } }, "summary": "Get multiple key-value pairs", "tags": ["Workers KV Namespace"] } }, "/d1/database": { "get": { "description": "Returns a list of D1 databases.", "operationId": "d1-list-databases", "parameters": [ { "in": "query", "name": "name", "schema": { "description": "a database name to search for.", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/d1_api-response-common" }, { "properties": { "result": { "items": { "$ref": "#/components/schemas/d1_database-response" }, "type": "array" }, "result_info": { "properties": { "count": { "description": "Total number of results for the requested service", "example": 1, "type": "number" } }, "type": "object" } } } ] } } }, "description": "List D1 databases response" }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/d1_api-response-common-failure" } } }, "description": "List D1 databases response failure" } }, "summary": "List D1 Databases", "tags": ["D1"] } }, "/d1/database/{database_id}/raw": { "post": { "description": "Returns the query result rows as arrays rather than objects. This is a performance-optimized version of the /query endpoint.", "operationId": "d1-raw-database-query", "parameters": [ { "in": "path", "name": "database_id", "required": true, "schema": { "$ref": "#/components/schemas/d1_database-identifier" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/d1_batch-query" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/d1_api-response-common" }, { "properties": { "result": { "items": { "$ref": "#/components/schemas/d1_raw-result-response" }, "type": "array" } } } ] } } }, "description": "Raw query response" }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/d1_api-response-common-failure" } } }, "description": "Query response failure" } }, "summary": "Raw D1 Database query", "tags": ["D1"] } }, "/workers/durable_objects/namespaces": { "get": { "description": "Returns the Durable Object namespaces owned by an account.", "operationId": "durable-objects-namespace-list-namespaces", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-collection" }, { "properties": { "result": { "items": { "$ref": "#/components/schemas/workers_namespace" }, "type": "array" } }, "type": "object" } ] } } }, "description": "List Namespaces response." }, "4XX": { "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-collection" }, { "properties": { "result": { "items": { "$ref": "#/components/schemas/workers_namespace" }, "type": "array" } }, "type": "object" } ] }, { "$ref": "#/components/schemas/workers_api-response-common-failure" } ] } } }, "description": "List Namespaces response failure." } }, "summary": "List Namespaces", "tags": ["Durable Objects Namespace"] } }, "/workers/durable_objects/namespaces/{id}/objects": { "get": { "description": "Returns the Durable Objects in a given namespace.", "operationId": "durable-objects-namespace-list-objects", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "$ref": "#/components/schemas/workers_schemas-id" } }, { "in": "query", "name": "limit", "schema": { "default": 1000, "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.", "maximum": 10000, "minimum": 10, "type": "number" } }, { "in": "query", "name": "cursor", "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.", "example": "AAAAANuhDN7SjacTnSVsDu3WW1Lvst6dxJGTjRY5BhxPXdf6L6uTcpd_NVtjhn11OUYRsVEykxoUwF-JQU4dn6QylZSKTOJuG0indrdn_MlHpMRtsxgXjs-RPdHYIVm3odE_uvEQ_dTQGFm8oikZMohns34DLBgrQpc", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-collection" }, { "properties": { "result": { "items": { "$ref": "#/components/schemas/workers_object" }, "type": "array" }, "result_info": { "properties": { "count": { "description": "Total results returned based on your list parameters.", "example": 1, "type": "number" }, "cursor": { "$ref": "#/components/schemas/workers_cursor" } }, "type": "object" } }, "type": "object" } ] } } }, "description": "List Objects response." }, "4XX": { "content": { "application/json": { "schema": { "allOf": [ { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-collection" }, { "properties": { "result": { "items": { "$ref": "#/components/schemas/workers_object" }, "type": "array" }, "result_info": { "properties": { "count": { "description": "Total results returned based on your list parameters.", "example": 1, "type": "number" }, "cursor": { "$ref": "#/components/schemas/workers_cursor" } }, "type": "object" } }, "type": "object" } ] }, { "$ref": "#/components/schemas/workers_api-response-common-failure" } ] } } }, "description": "List Objects response failure." } }, "summary": "List Objects", "tags": ["Durable Objects Namespace"] } }, "/r2/buckets": { "get": { "description": "Lists all R2 buckets on your account.", "operationId": "r2-list-buckets", "parameters": [], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/r2_v4_response_list" }, { "properties": { "result": { "properties": { "buckets": { "items": { "$ref": "#/components/schemas/r2_bucket" }, "type": "array" } }, "type": "object" } }, "type": "object" } ] } } }, "description": "List Buckets response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/r2_v4_response_failure" } } }, "description": "List Buckets response failure." } }, "summary": "List Buckets", "tags": ["R2 Bucket"] } }, "/r2/buckets/{bucket_name}": { "get": { "description": "Gets properties of an existing R2 bucket.", "operationId": "r2-get-bucket", "parameters": [ { "in": "path", "name": "bucket_name", "required": true, "schema": { "$ref": "#/components/schemas/r2_bucket_name" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/r2_v4_response" }, { "properties": { "result": { "$ref": "#/components/schemas/r2_bucket" } }, "type": "object" } ] } } }, "description": "Get Bucket response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/r2_v4_response_failure" } } }, "description": "Get Bucket response failure." } }, "summary": "Get Bucket", "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}": { "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"] } }, "/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." } } ], "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/{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}/status": { "patch": { "description": "Changes the status of a workflow instance (pause, resume, restart, terminate).", "operationId": "workflows-change-instance-status", "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" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["action"], "properties": { "action": { "type": "string", "enum": ["pause", "resume", "restart", "terminate"], "description": "The action to perform on the workflow instance." } } } } } }, "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": "Change Workflow Instance Status response." }, "4XX": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/workers_api-response-common-failure" } } }, "description": "Change Workflow Instance Status response failure." } }, "summary": "Change Workflow Instance Status", "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"] } } }, "components": { "schemas": { "r2_v4_response": { "properties": { "errors": { "$ref": "#/components/schemas/r2_errors" }, "messages": { "$ref": "#/components/schemas/r2_messages" }, "result": { "type": "object" }, "success": { "description": "Whether the API call was successful.", "enum": [true], "type": "boolean" } }, "required": ["success", "errors", "messages", "result"], "type": "object" }, "r2_messages": { "items": { "type": "string" }, "type": "array" }, "r2_errors": { "items": { "properties": { "code": { "minimum": 1000, "type": "integer" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object", "uniqueItems": true }, "type": "array" }, "r2_bucket_name": { "description": "Name of the bucket.", "example": "example-bucket", "maxLength": 64, "minLength": 3, "pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]", "type": "string" }, "r2_v4_response_failure": { "properties": { "errors": { "$ref": "#/components/schemas/r2_errors" }, "messages": { "$ref": "#/components/schemas/r2_messages" }, "result": { "enum": [null], "nullable": true, "type": "object" }, "success": { "description": "Whether the API call was successful.", "enum": [false], "example": false, "type": "boolean" } }, "required": ["success", "errors", "messages", "result"], "type": "object" }, "r2_bucket": { "description": "A single R2 bucket.", "properties": { "creation_date": { "description": "Creation timestamp.", "type": "string" }, "name": { "$ref": "#/components/schemas/r2_bucket_name" } }, "type": "object" }, "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": { "properties": {}, "type": "object" }, "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.", "example": "AAAAANuhDN7SjacTnSVsDu3WW1Lvst6dxJGTjRY5BhxPXdf6L6uTcpd_NVtjhn11OUYRsVEykxoUwF-JQU4dn6QylZSKTOJuG0indrdn_MlHpMRtsxgXjs-RPdHYIVm3odE_uvEQ_dTQGFm8oikZMohns34DLBgrQpc", "type": "string" }, "workers_object": { "properties": { "hasStoredData": { "description": "Whether the Durable Object has stored data.", "example": true, "readOnly": true, "type": "boolean" }, "id": { "description": "ID of the Durable Object.", "example": "fe7803fc55b964e09d94666545aab688d360c6bda69ba349ced1e5f28d2fc2c8", "readOnly": true, "type": "string" }, "name": { "type": "string", "description": "Name of the Durable Object instance, if created via idFromName().", "readOnly": true } }, "type": "object" }, "workers_schemas-id": { "description": "ID of the namespace.", "example": "5fd1cafff895419c8bcc647fc64ab8f0", "type": "string" }, "workers_api-response-common-failure": { "properties": { "errors": { "allOf": [ { "$ref": "#/components/schemas/workers_messages" } ], "example": [ { "code": 7003, "message": "No route for the URI" } ], "minLength": 1 }, "messages": { "allOf": [ { "$ref": "#/components/schemas/workers_messages" } ], "example": [] }, "result": { "enum": [null], "nullable": true, "type": "object" }, "success": { "description": "Whether the API call was successful.", "enum": [false], "example": false, "type": "boolean" } }, "required": ["success", "errors", "messages", "result"], "type": "object" }, "workers_messages": { "example": [], "items": { "properties": { "code": { "minimum": 1000, "type": "integer" }, "documentation_url": { "type": "string" }, "message": { "type": "string" }, "source": { "properties": { "pointer": { "type": "string" } }, "type": "object" } }, "required": ["code", "message"], "type": "object", "uniqueItems": true }, "type": "array" }, "workers_namespace": { "properties": { "class": { "type": "string" }, "id": { "readOnly": true, "type": "string" }, "name": { "type": "string" }, "script": { "type": "string" }, "use_sqlite": { "type": "boolean" } }, "type": "object" }, "workers_api-response-collection": { "allOf": [ { "$ref": "#/components/schemas/workers_api-response-common" }, { "properties": { "result_info": { "properties": { "count": { "description": "Total number of results for the requested service.", "example": 1, "type": "number" }, "page": { "description": "Current page within paginated list of results.", "example": 1, "type": "number" }, "per_page": { "description": "Number of results per page of results.", "example": 20, "type": "number" }, "total_count": { "description": "Total results available without any search parameters.", "example": 2000, "type": "number" }, "total_pages": { "description": "The number of total pages in the entire result set.", "example": 100, "type": "number" } }, "type": "object" } }, "type": "object" } ], "type": "object" }, "workers_api-response-common": { "properties": { "errors": { "$ref": "#/components/schemas/workers_messages" }, "messages": { "$ref": "#/components/schemas/workers_messages" }, "success": { "description": "Whether the API call was successful.", "enum": [true], "example": true, "type": "boolean" } }, "required": ["success", "errors", "messages"], "type": "object" }, "d1_raw-result-response": { "properties": { "meta": { "$ref": "#/components/schemas/d1_query-meta" }, "results": { "properties": { "columns": { "items": { "type": "string" }, "type": "array" }, "rows": { "items": { "items": { "anyOf": [ { "type": "number" }, { "type": "string" }, { "type": "object" } ] }, "type": "array" }, "type": "array" } }, "type": "object" }, "success": { "type": "boolean" } }, "type": "object" }, "d1_query-meta": { "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.", "properties": { "sql_duration_ms": { "description": "The duration of the SQL query execution inside the database. Does not include any network communication.", "type": "number" } }, "type": "object" } }, "type": "object" }, "d1_batch-query": { "description": "A single query object or a batch query object", "oneOf": [ { "$ref": "#/components/schemas/d1_single-query" }, { "properties": { "batch": { "items": { "$ref": "#/components/schemas/d1_single-query" }, "type": "array" } }, "required": ["batch"], "title": "multiple queries", "type": "object" } ] }, "d1_single-query": { "description": "A single query with or without parameters", "properties": { "params": { "$ref": "#/components/schemas/d1_params" }, "sql": { "$ref": "#/components/schemas/d1_sql" } }, "required": ["sql"], "title": "single query", "type": "object" }, "d1_sql": { "description": "Your SQL query. Supports multiple statements, joined by semicolons, which will be executed as a batch.", "example": "SELECT * FROM myTable WHERE field = ? OR field = ?;", "type": "string" }, "d1_params": { "example": ["firstParam", "secondParam"], "items": { "type": "string" }, "type": "array" }, "d1_database-identifier": { "description": "D1 database identifier (UUID).", "example": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "readOnly": true, "type": "string" }, "d1_api-response-common-failure": { "properties": { "errors": { "allOf": [ { "$ref": "#/components/schemas/d1_messages" } ], "example": [ { "code": 7003, "message": "No route for the URI" } ], "minLength": 1 }, "messages": { "allOf": [ { "$ref": "#/components/schemas/d1_messages" } ], "example": [] }, "result": { "enum": [null], "nullable": true, "type": "object" }, "success": { "description": "Whether the API call was successful", "enum": [false], "example": false, "type": "boolean" } }, "required": ["success", "errors", "messages", "result"], "type": "object" }, "d1_messages": { "example": [], "items": { "properties": { "code": { "minimum": 1000, "type": "integer" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object", "uniqueItems": true }, "type": "array" }, "d1_database-response": { "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" } }, "type": "object" }, "d1_database-version": { "example": "production", "pattern": "^(alpha|beta|production)$", "type": "string" }, "d1_database-name": { "description": "D1 database name.", "example": "my-database", "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$", "type": "string" }, "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.", "enum": ["eu", "fedramp"], "example": "eu", "nullable": true, "type": "string" }, "d1_api-response-common": { "properties": { "errors": { "$ref": "#/components/schemas/d1_messages" }, "messages": { "$ref": "#/components/schemas/d1_messages" }, "result": { "type": "object" }, "success": { "description": "Whether the API call was successful", "enum": [true], "example": true, "type": "boolean" } }, "required": ["success", "errors", "messages", "result"], "type": "object" }, "workers-kv_bulk-get-result-with-metadata": { "properties": { "values": { "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" }, "description": "Requested keys are paired with their values and metadata in an object.", "example": { "key1": { "expiration": 1577836800, "metadata": { "someMetadataKey": "someMetadataValue" }, "value": "value1" }, "key2": { "metadata": { "anotherKey": "anotherValue" }, "value": "value2" } }, "type": "object" } }, "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.", "example": 1578435000, "type": "number" }, "workers-kv_bulk-get-result": { "properties": { "values": { "additionalProperties": { "description": "The value associated with the key.", "oneOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" }, { "additionalProperties": true, "type": "object" } ], "nullable": true }, "description": "Requested keys are paired with their values in an object.", "example": { "key1": "value1", "key2": "value2" }, "type": "object" } }, "type": "object" }, "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.", "example": "My-Key", "maxLength": 512, "type": "string" }, "workers-kv_api-response-common-no-result": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_api-response-common" }, { "properties": { "result": { "nullable": true, "type": "object" } }, "type": "object" } ] }, "workers-kv_api-response-common": { "properties": { "errors": { "$ref": "#/components/schemas/workers-kv_messages" }, "messages": { "$ref": "#/components/schemas/workers-kv_messages" }, "success": { "description": "Whether the API call was successful.", "enum": [true], "example": true, "type": "boolean" } }, "required": ["success", "errors", "messages"], "type": "object" }, "workers-kv_messages": { "example": [], "items": { "properties": { "code": { "minimum": 1000, "type": "integer" }, "message": { "type": "string" } }, "required": ["code", "message"], "type": "object" }, "type": "array", "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": { "anyOf": [ { "type": "string" }, { "format": "binary", "type": "string" } ], "description": "A byte sequence to be stored, up to 25 MiB in length.", "example": "Some Value" }, "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.", "example": "My-Key", "maxLength": 512, "type": "string" }, "workers-kv_cursor_result_info": { "properties": { "count": { "description": "Total results returned based on your list parameters.", "example": 1, "type": "number" }, "cursor": { "$ref": "#/components/schemas/workers-kv_cursor" } }, "type": "object" }, "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.", "example": "6Ck1la0VxJ0djhidm1MdX2FyDGxLKVeeHZZmORS_8XeSuhz9SjIJRaSa2lnsF01tQOHrfTGAP3R5X1Kv5iVUuMbNKhWNAXHOl6ePB0TUL8nw", "type": "string" }, "workers-kv_key": { "description": "A name for a value. A value stored under a given key may be retrieved via the same key.", "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.", "example": 1577836800, "type": "number" }, "metadata": { "$ref": "#/components/schemas/workers-kv_list_metadata" }, "name": { "$ref": "#/components/schemas/workers-kv_key_name" } }, "required": ["name"], "type": "object" }, "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_namespace_identifier": { "description": "Namespace identifier tag.", "example": "0f2ac74b498b48028cb68387c421e279", "maxLength": 32, "readOnly": true, "type": "string" }, "workers-kv_api-response-common-failure": { "properties": { "errors": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_messages" } ], "example": [ { "code": 7003, "message": "No route for the URI" } ], "minLength": 1 }, "messages": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_messages" } ], "example": [] }, "result": { "nullable": true, "type": "object" }, "success": { "description": "Whether the API call was successful.", "enum": [false], "example": false, "type": "boolean" } }, "required": ["success", "errors", "messages", "result"], "type": "object" }, "workers-kv_namespace": { "properties": { "id": { "$ref": "#/components/schemas/workers-kv_namespace_identifier" }, "title": { "$ref": "#/components/schemas/workers-kv_namespace_title" } }, "required": ["id", "title"], "type": "object" }, "workers-kv_namespace_title": { "description": "A human-readable string name for a Namespace.", "example": "My Own Namespace", "maxLength": 512, "type": "string" }, "workers-kv_api-response-collection": { "allOf": [ { "$ref": "#/components/schemas/workers-kv_api-response-common" }, { "properties": { "result_info": { "$ref": "#/components/schemas/workers-kv_result_info" } }, "type": "object" } ], "type": "object" }, "workers-kv_result_info": { "properties": { "count": { "description": "Total number of results for the requested service.", "example": 1, "type": "number" } }, "type": "object" }, "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" }, "bindings": { "$ref": "#/components/schemas/local-explorer_worker-bindings", "description": "Resource bindings for this worker" } } }, "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" } } }, "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"] } } } }