{ "openapi": "3.0.0", "paths": { "/api/health": { "get": { "operationId": "health", "summary": "Service and database liveness.", "parameters": [], "responses": { "200": { "description": "" } }, "tags": [ "health" ] } }, "/api/script/{id}/revisions": { "get": { "operationId": "revisionList", "summary": "", "description": "Get a list of revisions (bundle not included).", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "page", "required": true, "in": "query", "schema": { "type": "number" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/PaginatedResponseDto" }, { "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/RevisionDataDto" } } } } ] } } } } }, "tags": [ "scripts" ], "security": [ { "bearer": [] } ] }, "patch": { "operationId": "setRevision", "summary": "", "description": "Set the current active revision for a script.", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "revisionId", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewRevisionResponseDto" } } } } }, "tags": [ "scripts" ], "security": [ { "bearer": [] } ] }, "put": { "operationId": "createRevision", "summary": "", "description": "Create a new revision.", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateRevisionDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevisionDataDto" } } } } }, "tags": [ "scripts" ], "security": [ { "bearer": [] } ] } }, "/api/script/{id}/aliases": { "get": { "operationId": "listAliases", "summary": "", "description": "List a script's environment aliases.", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AliasDto" } } } } } }, "tags": [ "scripts" ], "security": [ { "bearer": [] } ] }, "put": { "operationId": "setAlias", "summary": "", "description": "Point an environment alias at a revision. Creating and moving an alias\nare the same call; rollback is moving it back.", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetAliasDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AliasDto" } } } } }, "tags": [ "scripts" ], "security": [ { "bearer": [] } ] } }, "/api/script/{id}": { "get": { "operationId": "getScript", "summary": "", "description": "Get a script by ID.", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScriptDto" } } } } }, "tags": [ "scripts" ], "security": [ { "bearer": [] } ] }, "delete": { "operationId": "deleteScript", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponseDto" } } } } }, "tags": [ "scripts" ], "security": [ { "bearer": [] } ] } }, "/api/project/{project}/scripts": { "get": { "operationId": "listScripts", "summary": "", "description": "Get a paginated list of scripts.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "page", "required": true, "in": "query", "schema": { "type": "number" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/PaginatedResponseDto" }, { "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/ScriptDto" } } } } ] } } } } }, "tags": [ "scripts" ], "security": [ { "bearer": [] } ] }, "post": { "operationId": "createScript", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateScriptDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScriptDto" } } } } }, "tags": [ "scripts" ], "security": [ { "bearer": [] } ] } }, "/api/project/{project}/scripts/missing-blobs": { "post": { "operationId": "missingBlobs", "summary": "", "description": "Which of these content hashes the blob store does not hold. A publish\nmay reference stored hashes without resending their content.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MissingBlobsDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MissingBlobsResponseDto" } } } } }, "tags": [ "scripts" ], "security": [ { "bearer": [] } ] } }, "/api/revisions/{id}": { "get": { "operationId": "getRevision", "summary": "", "description": "Get a revision by ID.", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "withBundle", "required": true, "in": "query", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevisionFullDto" } } } } }, "tags": [ "revisions" ], "security": [ { "bearer": [] } ] }, "delete": { "operationId": "deleteRevision", "summary": "", "description": "Delete a revision by ID.", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewRevisionResponseDto" } } } } }, "tags": [ "revisions" ], "security": [ { "bearer": [] } ] } }, "/api/auth/login": { "post": { "operationId": "login", "summary": "", "description": "Login with username/password and recieve an authentication token.", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AuthTokenDto" } } } } }, "tags": [ "auth" ] } }, "/api/users": { "post": { "operationId": "createUser", "summary": "", "description": "Create a new user using standard username/password sign up.", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserDto" } } } } }, "tags": [ "users" ] } }, "/api/users/registrationConfig": { "get": { "operationId": "registrationConfig", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegistrationConfigDto" } } } } }, "tags": [ "users" ] } }, "/api/users/@me": { "get": { "operationId": "me", "summary": "", "description": "Get the currently logged in user's details.", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserDto" } } } } }, "tags": [ "users" ], "security": [ { "bearer": [] } ] }, "put": { "operationId": "update", "summary": "", "description": "Update user details.", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserDto" } } } } }, "tags": [ "users" ], "security": [ { "bearer": [] } ] } }, "/api/users/@me/password": { "put": { "operationId": "updatePassword", "summary": "", "description": "Update user details.", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePasswordDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponseDto" } } } } }, "tags": [ "users" ], "security": [ { "bearer": [] } ] } }, "/api/users/lookup": { "get": { "operationId": "lookupUser", "summary": "", "description": "Resolve one account by its exact email or username, for adding a\nmember to a project. Nothing here lists or matches loosely: browsing\nthe user table is an admin capability, at `GET /admin/users`.", "parameters": [ { "name": "identifier", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicUserDto" } } } } }, "tags": [ "users" ], "security": [ { "bearer": [] } ] } }, "/api/project/{project}/acl/@me": { "get": { "operationId": "getAclMe", "summary": "", "description": "Get ACL list for the current authorized user.\nThis doesn't require the `PERMISSIONS_READ` permission.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AclListDto" } } } } }, "tags": [ "acl" ] } }, "/api/project/{project}/acl/{user}": { "get": { "operationId": "getAclSingle", "summary": "", "description": "Get ACL list for a single user.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "user", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AclListDto" } } } } }, "tags": [ "acl" ] }, "put": { "operationId": "putAcl", "summary": "", "description": "Set ACL access for the project for the user.\nThis will implicitly add the user to the project.\nIf `permissions` is empty then the user will be removed from the project.", "parameters": [ { "name": "user", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AclListDto" } } } } }, "tags": [ "acl" ] } }, "/api/project/{project}/acl": { "get": { "operationId": "getAcl", "summary": "", "description": "Get ACL list for all users.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AclListDto" } } } } } }, "tags": [ "acl" ] } }, "/api/acl/permissions": { "get": { "operationId": "getPermissions", "summary": "", "description": "Get a list of all permissions.", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } } } }, "tags": [ "acl" ] } }, "/api/project": { "post": { "operationId": "createProject", "summary": "", "description": "Create a project and return the data.", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateProjectDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectDto" } } } } }, "tags": [ "project" ], "security": [ { "bearer": [] } ] }, "get": { "operationId": "listProjects", "summary": "", "description": "Get projects that a user has access to.", "parameters": [ { "name": "page", "required": true, "in": "query", "schema": { "type": "number" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/PaginatedResponseDto" }, { "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectDto" } } } } ] } } } } }, "tags": [ "project" ], "security": [ { "bearer": [] } ] } }, "/api/project/{project}": { "get": { "operationId": "getProject", "summary": "", "description": "Get a project by its ID.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectDto" } } } } }, "tags": [ "project" ], "security": [ { "bearer": [] } ] }, "delete": { "operationId": "deleteProject", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponseDto" } } } } }, "tags": [ "project" ], "security": [ { "bearer": [] } ] } }, "/api/project/{project}/policy": { "get": { "operationId": "getPolicy", "summary": "", "description": "Delete a project by its ID.\nThe project's runtime policy: rates and egress lists, the defaults\nwhen none was set. Lives in the script service, which is what the\nworkers read it from.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectPolicyViewDto" } } } } }, "tags": [ "project" ], "security": [ { "bearer": [] } ] }, "patch": { "operationId": "setPolicy", "summary": "", "description": "Replaces the project's runtime policy. Every field is set: a rate of\n0 is unbounded, an empty allow list admits everything not denied.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectPolicyDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectPolicyViewDto" } } } } }, "tags": [ "project" ], "security": [ { "bearer": [] } ] } }, "/api/project/{project}/region": { "patch": { "operationId": "moveProject", "summary": "", "description": "Moves the project to another home: marks it moving, drains, copies\nits objects between the regions' buckets, flips the home (FLEET.md\n6.3). Answers at once with the move to follow; both regions must be\nregistered.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetProjectRegionDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectMoveDto" } } } } }, "tags": [ "project" ], "security": [ { "bearer": [] } ] } }, "/api/project/{project}/move": { "get": { "operationId": "getMove", "summary": "", "description": "The project's latest move between homes; an empty step means it\nnever moved.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectMoveDto" } } } } }, "tags": [ "project" ], "security": [ { "bearer": [] } ] } }, "/api/project/{project}/tokens": { "post": { "operationId": "createToken", "summary": "", "description": "Create a service token. The response is the only time the secret is\nshown; only its hash is stored.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateServiceTokenDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatedServiceTokenDto" } } } } }, "tags": [ "tokens" ], "security": [ { "bearer": [] } ] }, "get": { "operationId": "listTokens", "summary": "", "description": "List the project's service tokens. Secrets are never listed.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceTokenDto" } } } } } }, "tags": [ "tokens" ], "security": [ { "bearer": [] } ] } }, "/api/project/{project}/tokens/{token}": { "delete": { "operationId": "revokeToken", "summary": "", "description": "Revoke a token. Revocation is deletion: the hash is gone, so the held\nsecret can never authenticate again.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "token", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponseDto" } } } } }, "tags": [ "tokens" ], "security": [ { "bearer": [] } ] } }, "/api/project/{project}/kv": { "get": { "operationId": "listNamespaces", "summary": "", "description": "List all namespaces in a project.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/NamespaceDto" } } } } } }, "tags": [ "kv" ], "security": [ { "bearer": [] } ] } }, "/api/project/{project}/kv/{namespace}": { "put": { "operationId": "createNamespace", "summary": "", "description": "Create an empty namespace.\n\nNamespaces also come into being on their first write; this exists so one\ncan be made from the dashboard without writing a junk pair into it.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "namespace", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NamespaceDto" } } } } }, "tags": [ "kv" ], "security": [ { "bearer": [] } ] }, "delete": { "operationId": "deleteNamespace", "summary": "", "description": "Delete a namespace and all keys in a project.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "namespace", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponseDto" } } } } }, "tags": [ "kv" ], "security": [ { "bearer": [] } ] }, "get": { "operationId": "listNamespace", "summary": "", "description": "List pairs in a namespace.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "namespace", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "token", "required": false, "in": "query", "description": "Pagination token", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListNamespaceDto" } } } } }, "tags": [ "kv" ], "security": [ { "bearer": [] } ] } }, "/api/project/{project}/kv/{namespace}/{key}": { "get": { "operationId": "getKey", "summary": "", "description": "Get a value from a key in a namespace.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "namespace", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "key", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PairDto" } } } } }, "tags": [ "kv" ], "security": [ { "bearer": [] } ] }, "delete": { "operationId": "deleteKey", "summary": "", "description": "Delete a value from a key in a namespace.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "namespace", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "key", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponseDto" } } } } }, "tags": [ "kv" ], "security": [ { "bearer": [] } ] }, "put": { "operationId": "setKey", "summary": "", "description": "Create or update a value from a key in a namespace.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "namespace", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "key", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetKeyDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponseDto" } } } } }, "tags": [ "kv" ], "security": [ { "bearer": [] } ] } }, "/api/project/{project}/secrets": { "get": { "operationId": "listSecrets", "summary": "", "description": "List a project's live secrets: names and metadata, never values.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SecretDto" } } } } } }, "tags": [ "secrets" ], "security": [ { "bearer": [] } ] } }, "/api/project/{project}/secrets/{name}": { "put": { "operationId": "putSecret", "summary": "", "description": "Set or rotate a secret. Every write is a new immutable version; there\nis no way to read a value back.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetSecretDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SecretDto" } } } } }, "tags": [ "secrets" ], "security": [ { "bearer": [] } ] }, "delete": { "operationId": "deleteSecret", "summary": "", "description": "Delete a secret. The name disappears and scripts stop resolving it;\nworkflow runs that pinned a version keep the credentials they\nstarted with.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponseDto" } } } } }, "tags": [ "secrets" ], "security": [ { "bearer": [] } ] } }, "/api/project/{project}/secrets/{name}/versions": { "get": { "operationId": "listSecretVersions", "summary": "", "description": "A name's rotation history, newest first: timestamps and authors\nonly. Old values are retained encrypted solely for workflow runs\nthat pinned them; nothing reads them back out here.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SecretVersionDto" } } } } } }, "tags": [ "secrets" ], "security": [ { "bearer": [] } ] } }, "/api/admin/registration/settings": { "get": { "operationId": "registrationSettings", "summary": "", "description": "What the admin surface adapts to: invite-only and mail capability.", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegistrationSettingsDto" } } } } }, "tags": [ "admin" ], "security": [ { "bearer": [] } ] } }, "/api/admin/registration/invite": { "post": { "operationId": "createInvite", "summary": "", "description": "Invite one person: a one-use code wrapped in a register link,\nmailed when SMTP is configured, returned for copying either way.", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InviteRequestDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InviteResponseDto" } } } } }, "tags": [ "admin" ], "security": [ { "bearer": [] } ] } }, "/api/admin/registration": { "post": { "operationId": "newRegistrationCode", "summary": "", "description": "Create a new registration code.", "parameters": [ { "name": "uses", "required": true, "in": "query", "schema": { "type": "number" } } ], "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegistrationCodeDto" } } } } }, "tags": [ "admin" ], "security": [ { "bearer": [] } ] }, "get": { "operationId": "listRegistrationCodes", "summary": "", "description": "List created registration codes.", "parameters": [ { "name": "page", "required": true, "in": "query", "schema": { "type": "number" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/PaginatedResponseDto" }, { "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/RegistrationCodeDto" } } } } ] } } } } }, "tags": [ "admin" ], "security": [ { "bearer": [] } ] } }, "/api/admin/registration/{code}": { "delete": { "operationId": "deleteRegistrationCode", "parameters": [ { "name": "code", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponseDto" } } } } }, "tags": [ "admin" ], "security": [ { "bearer": [] } ] } }, "/api/admin/users": { "get": { "operationId": "listUsers", "summary": "", "description": "Every user on the instance, newest first; search matches username\nor email.", "parameters": [ { "name": "page", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "search", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/PaginatedResponseDto" }, { "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/UserDto" } } } } ] } } } } }, "tags": [ "admin" ], "security": [ { "bearer": [] } ] } }, "/api/admin/users/{user}/admin": { "post": { "operationId": "setUserAdmin", "summary": "", "description": "Grants or revokes the admin flag; your own is another admin's to\nchange.", "parameters": [ { "name": "user", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetAdminDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserDto" } } } } }, "tags": [ "admin" ], "security": [ { "bearer": [] } ] } }, "/api/admin/users/{user}": { "delete": { "operationId": "deleteUser", "summary": "", "description": "Deletes a user and every project they own, through the same\nteardown an owner's own delete uses.", "parameters": [ { "name": "user", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponseDto" } } } } }, "tags": [ "admin" ], "security": [ { "bearer": [] } ] } }, "/api/admin/projects": { "get": { "operationId": "listAllProjects", "summary": "", "description": "Every project on the instance, newest first; search matches the\nname.", "parameters": [ { "name": "page", "required": true, "in": "query", "schema": { "type": "number" } }, { "name": "search", "required": true, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/PaginatedResponseDto" }, { "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/AdminProjectDto" } } } } ] } } } } }, "tags": [ "admin" ], "security": [ { "bearer": [] } ] } }, "/api/admin/projects/{project}": { "delete": { "operationId": "deleteAnyProject", "summary": "", "description": "Deletes any project, through the same teardown its owner would\ntrigger.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponseDto" } } } } }, "tags": [ "admin" ], "security": [ { "bearer": [] } ] } }, "/api/regions": { "get": { "operationId": "listRegions", "summary": "", "description": "Every registered region. Empty on a single-region deployment.", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RegionDto" } } } } } }, "tags": [ "regions" ], "security": [ { "bearer": [] } ] } }, "/api/regions/{name}": { "put": { "operationId": "putRegion", "summary": "", "description": "Registers or updates a region: its data-plane address and bucket.", "parameters": [ { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PutRegionDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegionDto" } } } } }, "tags": [ "regions" ], "security": [ { "bearer": [] } ] }, "delete": { "operationId": "deleteRegion", "summary": "", "description": "Forgets a region. Refused while any project calls it home.", "parameters": [ { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "tags": [ "regions" ], "security": [ { "bearer": [] } ] } }, "/api/project/{project}/queues": { "get": { "operationId": "listQueues", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ResourceInstanceDto" } } } } } }, "tags": [ "queues" ] } }, "/api/project/{project}/queues/{name}/stats": { "get": { "operationId": "queueStats", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueueStatsDto" } } } } }, "tags": [ "queues" ] } }, "/api/project/{project}/queues/{name}/messages": { "get": { "operationId": "queueMessages", "summary": "", "description": "Live and dead message rows, newest first; delivered messages are in\nthe journal.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/QueueMessageDto" } } } } } }, "tags": [ "queues" ] } }, "/api/project/{project}/queues/{name}/events": { "get": { "operationId": "queueEvents", "summary": "", "description": "The queue's journal after `since`: enqueued, delivered, retried and\ndead-lettered, oldest first.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "since", "required": false, "in": "query", "schema": { "type": "number" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/QueueEventDto" } } } } } }, "tags": [ "queues" ] } }, "/api/project/{project}/queues/{name}/retry-dead": { "post": { "operationId": "retryDead", "summary": "", "description": "Requeues every dead letter; they start their attempts over.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetriedDto" } } } } }, "tags": [ "queues" ] } }, "/api/project/{project}/queues/{name}/messages/{id}/retry": { "post": { "operationId": "retryMessage", "summary": "", "description": "Requeues one dead letter by id.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetriedDto" } } } } }, "tags": [ "queues" ] } }, "/api/project/{project}/queues/{name}/messages/{id}/drop": { "post": { "operationId": "dropMessage", "summary": "", "description": "Discards one message, live or dead.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "" } }, "tags": [ "queues" ] } }, "/api/project/{project}/databases": { "get": { "operationId": "listDatabases", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ResourceInstanceDto" } } } } } }, "tags": [ "databases" ] } }, "/api/project/{project}/databases/{name}/overview": { "get": { "operationId": "databaseOverview", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DatabaseOverviewDto" } } } } }, "tags": [ "databases" ] } }, "/api/project/{project}/databases/{name}/query": { "post": { "operationId": "query", "summary": "", "description": "Runs a read-only query from the nearest copy, bounded staleness by\ndesign; the script-guard authorizer applies exactly as it does to\nscript sql.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SqlQueryDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SqlRowsDto" } } } } }, "tags": [ "databases" ] } }, "/api/project/{project}/databases/{name}/execute": { "post": { "operationId": "execute", "summary": "", "description": "Executes a statement through the owner, transactional, single-writer.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SqlQueryDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SqlRowsDto" } } } } }, "tags": [ "databases" ] } }, "/api/project/{project}/objects": { "get": { "operationId": "listObjects", "summary": "", "description": "Instances the directory knows of one class, filterable by name\nprefix, always paged, because a per-user class holds one instance\nper user. The classes come from the counts endpoint.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "class", "required": true, "in": "query", "schema": { "type": "string" } }, { "name": "prefix", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "page", "required": false, "in": "query", "schema": { "type": "number" } }, { "name": "pageSize", "required": false, "in": "query", "schema": { "type": "number" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectPageDto" } } } } }, "tags": [ "objects" ] } }, "/api/project/{project}/objects/{class}/{name}": { "delete": { "operationId": "deleteObject", "summary": "", "description": "Deletion is forget: storage, snapshot and edges are reclaimed,\nthe name may be recreated later and starts fresh, and there is no\nundo. This tombstones; the janitor finishes within a sweep.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "class", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteOutcomeDto" } } } } }, "tags": [ "objects" ] } }, "/api/project/{project}/objects/{class}": { "delete": { "operationId": "deleteClass", "summary": "", "description": "Every instance of one class, for dev cleanup; pages through the\ndirectory and tombstones each row.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "class", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteOutcomeDto" } } } } }, "tags": [ "objects" ] } }, "/api/project/{project}/objects/counts": { "get": { "operationId": "countObjects", "summary": "", "description": "How many instances each user class holds: what the rail renders\nbefore anyone asks for names.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ClassCountDto" } } } } } }, "tags": [ "objects" ] } }, "/api/project/{project}/objects/{class}/{name}/call": { "post": { "operationId": "objectCall", "summary": "", "description": "One method call on one instance, as a script would make it: through\nthe object's own lane, serialized with every other call, directory\nderivation and alarms running as they always do. Never a side\nchannel into the file.\n\nThis is the shell's write mode, and a person touching live data,\nso every call is logged against the account that made it. Naming\nan instance that does not exist creates it, admission permitting,\nexactly as in a script.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "class", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectCallDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ObjectCallResultDto" } } } } }, "tags": [ "objects" ] } }, "/api/project/{project}/objects/{class}/{name}/overview": { "get": { "operationId": "objectOverview", "summary": "", "description": "Overview of one durable object's private storage; a user class's\nfile is a SQLite database like any other.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "class", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DatabaseOverviewDto" } } } } }, "tags": [ "objects" ] } }, "/api/project/{project}/objects/{class}/{name}/followers": { "get": { "operationId": "objectFollowers", "summary": "", "description": "The edges other things hold on this object: who follows it, on\nwhich topic, with what filter, and how far behind the publisher's\nevent log each durable edge sits. Runtime state, never contract.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "class", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FollowersDto" } } } } }, "tags": [ "objects" ] } }, "/api/project/{project}/objects/{class}/{name}/state": { "get": { "operationId": "objectState", "summary": "", "description": "The object's key-value state pairs, in key order. The reserved\ntable is denied to SQL from every direction, so this typed read is\nthe console's only window on the store face. Read-only: writes go\nthrough the object's methods, like everything else it keeps.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "class", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StateDto" } } } } }, "tags": [ "objects" ] } }, "/api/project/{project}/objects/{class}/{name}/query": { "post": { "operationId": "objectQuery", "summary": "", "description": "A read-only query against one object's storage, from the nearest\ncopy; the script-guard authorizer applies, so reserved tables stay\nout of reach. Writes only ever happen through the object's methods.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "class", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "name", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SqlQueryDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SqlRowsDto" } } } } }, "tags": [ "objects" ] } }, "/api/project/{project}/objects/{class}/directory": { "post": { "operationId": "objectDirectory", "summary": "", "description": "One page of the class's directory: the row every object in it\ncontributes, answered without waking any of them.\n\nA POST because the predicate is a tree, not a query string. The\nrows are each object's last saved write, so a listing decides\nwhich objects to call and never substitutes for calling one.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "class", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DirectoryQueryDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DirectoryPageDto" } } } } }, "tags": [ "objects" ] } }, "/api/project/{project}/objects/{class}/directory/rebuild": { "post": { "operationId": "objectDirectoryRebuild", "summary": "", "description": "Rebuilds the class's index from what still exists: the placement\nstore's live identities, and each object's shipping manifest.\n\nThe operator's path for damage the background pass cannot reach.\nThat pass finds classes by listing the blob store, so a class\nwhose prefix is gone entirely is invisible to it; a name can always\nbe asked for. Nothing is woken and no object file is opened, so\nthe cost is one small read per live object.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "class", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DirectoryRebuiltDto" } } } } }, "tags": [ "objects" ] } }, "/api/project/{project}/objects/{class}/directory/visit": { "post": { "operationId": "objectDirectoryVisit", "summary": "", "description": "The verified read over a class's directory. Same query as the\nlisting; every candidate is checked against its object's settled\nstate before it is served, so stale rows drop, fresher rows arrive\nfresh, and the uncheckable come back flagged rather than missing.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "class", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DirectoryQueryDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VisitPageDto" } } } } }, "tags": [ "objects" ] } }, "/api/project/{project}/workflows": { "get": { "operationId": "listDefinitions", "summary": "", "description": "Every workflow definition a live contract declares, with the\ndeclared-possible step names the skeleton renders.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WorkflowDefinitionDto" } } } } } }, "tags": [ "workflows" ] } }, "/api/project/{project}/workflows/{definition}/runs": { "get": { "operationId": "listRuns", "summary": "", "description": "The definition's runs, newest first, each with its journal-derived\nstatus; the directory names them, the files answer for them.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "definition", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WorkflowRunDto" } } } } } }, "tags": [ "workflows" ] }, "post": { "operationId": "startRun", "summary": "", "description": "Starts (or joins) a run; the id is the idempotency key, minted\nhere when the caller has none.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "definition", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RunStartDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object" } } } } }, "tags": [ "workflows" ] } }, "/api/project/{project}/workflows/{definition}/runs/{id}": { "get": { "operationId": "runDetail", "summary": "", "description": "One run, whole: status plus the journal the CI view folds.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "definition", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkflowRunDetailDto" } } } } }, "tags": [ "workflows" ] } }, "/api/project/{project}/workflows/{definition}/runs/{id}/resume": { "post": { "operationId": "resume", "summary": "", "description": "Re-enters a failed run at its failed step with fresh attempts;\neverything before it replays untouched.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "definition", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object" } } } } }, "tags": [ "workflows" ] } }, "/api/project/{project}/workflows/{definition}/runs/{id}/signal": { "post": { "operationId": "signal", "summary": "", "description": "Delivers a named signal into the run; a parked await resumes.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "definition", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RunSignalDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object" } } } } }, "tags": [ "workflows" ] } }, "/api/project/{project}/workflows/{definition}/runs/{id}/cancel": { "post": { "operationId": "cancel", "summary": "", "description": "Cancels the run; children and late signals stay refused.", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "definition", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RunCancelDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "type": "object" } } } } }, "tags": [ "workflows" ] } }, "/api/project/{project}/shell/run": { "post": { "operationId": "runShell", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ShellRunDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ShellOutcomeDto" } } } } }, "tags": [ "shell" ] } }, "/api/project/{project}/connections": { "get": { "operationId": "listConnections", "parameters": [ { "name": "project", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ConnectionDto" } } } } } }, "tags": [ "connections" ] } }, "/api/interest": { "post": { "operationId": "keepMePosted", "summary": "", "description": "Ask to be kept posted. Public, because the landing page is where\nthis is asked and nobody has an account yet.\n\nThe reply is the same whether the address was new or already on the\nlist, so the endpoint cannot be used to test whether someone signed\nup.", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInterestDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponseDto" } } } } }, "tags": [ "interest" ] }, "get": { "operationId": "listInterest", "summary": "", "description": "Read the list.", "parameters": [ { "name": "page", "required": true, "in": "query", "schema": { "type": "number" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/PaginatedResponseDto" }, { "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/InterestSignupDto" } } } } ] } } } } }, "tags": [ "interest" ], "security": [ { "bearer": [] } ] } } }, "info": { "title": "Actias API", "description": "Public facing API for Actias workers.", "version": "1.0", "contact": {} }, "tags": [ { "name": "scripts", "description": "revisions" } ], "servers": [], "components": { "securitySchemes": { "bearer": { "scheme": "bearer", "bearerFormat": "JWT", "type": "http" } }, "schemas": { "PaginatedResponseDto": { "type": "object", "properties": { "page": { "type": "number", "description": "Current page." }, "lastPage": { "type": "number", "description": "Last possible page." } }, "required": [ "page", "lastPage" ] }, "CapabilitiesDto": { "type": "object", "properties": { "kv": { "description": "Namespaces declared with `kv \"name\"`.", "type": "array", "items": { "type": "string" } }, "events": { "description": "Events declared with `on \"event\"`.", "type": "array", "items": { "type": "string" } }, "secrets": { "description": "Secrets declared with `secret \"name\"`.", "type": "array", "items": { "type": "string" } }, "objects": { "description": "Object classes declared with `object \"Class\" { ... }`.", "type": "array", "items": { "type": "string" } }, "databases": { "description": "Databases declared with `database \"name\"`.", "type": "array", "items": { "type": "string" } }, "queues": { "description": "Queues declared with `queue \"name\"`.", "type": "array", "items": { "type": "string" } }, "workflows": { "description": "Workflow definitions declared with `workflow \"name\"`.", "type": "array", "items": { "type": "string" } }, "workflowSteps": { "description": "Step literals found at publish: the declared-possible superset.", "type": "array", "items": { "type": "string" } }, "publishes": { "description": "Topics each class publishes: \"Class:topic\", with \"=policy\" suffixed\nfor built-in policies (\"self\").", "type": "array", "items": { "type": "string" } }, "lifecycle": { "description": "Class lifecycle declarations: \"Class:expire=30d\" for a declared\nlifespan, \"Class:admit\" for a creation gate.", "type": "array", "items": { "type": "string" } }, "connections": { "description": "Connection classes declared with `connection \"Class\" { ... }`.", "type": "array", "items": { "type": "string" } } }, "required": [ "kv", "events", "secrets", "objects", "databases", "queues", "workflows", "workflowSteps", "publishes", "lifecycle", "connections" ] }, "ScriptConfigDto": { "type": "object", "properties": { "id": { "type": "string" }, "entryPoint": { "type": "string" }, "ignore": { "type": "array", "items": { "type": "string" } }, "includes": { "type": "array", "items": { "type": "string" } }, "capabilities": { "description": "Derived from the code at publish, never hand-written.", "allOf": [ { "$ref": "#/components/schemas/CapabilitiesDto" } ] } }, "required": [ "id", "entryPoint", "ignore", "includes" ] }, "RevisionDataDto": { "type": "object", "properties": { "id": { "type": "string" }, "created": { "format": "date-time", "type": "string", "description": "Date that revision was published." }, "scriptId": { "type": "string", "description": "ID of the script this revision is attached to." }, "scriptConfig": { "description": "Config that the project was uploaded with.\nThis is metadata and is mostly included for CLI to restore revisions intact.", "allOf": [ { "$ref": "#/components/schemas/ScriptConfigDto" } ] } }, "required": [ "id", "created", "scriptId", "scriptConfig" ] }, "NewRevisionResponseDto": { "type": "object", "properties": { "scriptId": { "type": "string" }, "revisionId": { "type": "string", "description": "New revision ID.\nThis may be null." } }, "required": [ "scriptId" ] }, "FileDto": { "type": "object", "properties": { "kind": { "type": "string", "description": "How the platform treats the file; modules are lua source, assets are\nserved as-is. Defaults to module.", "enum": [ "module", "asset" ] }, "filePath": { "type": "string", "description": "Path of the file relative to the bundle root; its identity within the\nbundle." }, "content": { "type": "string", "description": "Content of the file, base64 encoded." }, "contentType": { "type": "string", "description": "Mime type served for assets; informative for modules." }, "hash": { "type": "string", "description": "blake3 of the content, computed by the store; ignored on upload." }, "size": { "type": "number", "description": "Content size in bytes, computed by the store; ignored on upload." } }, "required": [ "filePath", "content" ] }, "BundleDto": { "type": "object", "properties": { "entryPoint": { "type": "string", "description": "Path of the entrypoint file.\nThis is the first file which is executed by the runtime." }, "files": { "description": "All files within the bundle.", "type": "array", "items": { "$ref": "#/components/schemas/FileDto" } } }, "required": [ "entryPoint", "files" ] }, "CreateRevisionDto": { "type": "object", "properties": { "bundle": { "description": "The bundle which will be used.", "allOf": [ { "$ref": "#/components/schemas/BundleDto" } ] }, "scriptConfig": { "description": "A valid project configuration.", "allOf": [ { "$ref": "#/components/schemas/ScriptConfigDto" } ] } }, "required": [ "bundle", "scriptConfig" ] }, "AliasDto": { "type": "object", "properties": { "scriptId": { "type": "string" }, "name": { "type": "string" }, "revisionId": { "type": "string" } }, "required": [ "scriptId", "name", "revisionId" ] }, "SetAliasDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Alias name: 1-64 lowercase letters, digits or single dashes. `live-`\nand `r-` prefixes are reserved for routing." }, "revisionId": { "type": "string", "description": "Revision the alias serves; must belong to the script." } }, "required": [ "name", "revisionId" ] }, "ScriptDto": { "type": "object", "properties": { "id": { "type": "string" }, "publicIdentifier": { "type": "string", "description": "Public identifier of the script.\nThis must be globally unique" }, "lastUpdated": { "format": "date-time", "type": "string", "description": "Date that the script (or revisions) were last updated." }, "currentRevisionId": { "type": "string", "description": "ID of the currently deployed revision.\nThis is empty for newly created scripts." }, "projectId": { "type": "string", "description": "Parent project that owns this script." } }, "required": [ "id", "publicIdentifier", "lastUpdated", "projectId" ] }, "MessageResponseDto": { "type": "object", "properties": { "message": { "type": "string", "description": "Message for the response" } }, "required": [ "message" ] }, "CreateScriptDto": { "type": "object", "properties": { "publicIdentifier": { "type": "string", "description": "Public identifier of the script.\nThis will be the globally unique identifier of your script.", "minLength": 3, "maxLength": 63 } }, "required": [ "publicIdentifier" ] }, "MissingBlobsDto": { "type": "object", "properties": { "hashes": { "description": "blake3 hashes of the files, lowercase hex.", "type": "array", "items": { "type": "string" } } }, "required": [ "hashes" ] }, "MissingBlobsResponseDto": { "type": "object", "properties": { "missing": { "type": "array", "items": { "type": "string" } } }, "required": [ "missing" ] }, "RevisionFullDto": { "type": "object", "properties": { "id": { "type": "string" }, "created": { "format": "date-time", "type": "string", "description": "Date that revision was published." }, "scriptId": { "type": "string", "description": "ID of the script this revision is attached to." }, "scriptConfig": { "description": "Config that the project was uploaded with.\nThis is metadata and is mostly included for CLI to restore revisions intact.", "allOf": [ { "$ref": "#/components/schemas/ScriptConfigDto" } ] }, "bundle": { "description": "Content bundle of all files.\nThis is only present in some responses.", "allOf": [ { "$ref": "#/components/schemas/BundleDto" } ] } }, "required": [ "id", "created", "scriptId", "scriptConfig" ] }, "LoginDto": { "type": "object", "properties": { "auth": { "type": "string", "description": "Either username or email." }, "password": { "type": "string" }, "rememberMe": { "type": "boolean", "description": "Should the generated token be remembered?\nThis changes expiration to 60 days from 1 day." } }, "required": [ "auth", "password" ] }, "AuthTokenDto": { "type": "object", "properties": { "token": { "type": "string" } }, "required": [ "token" ] }, "CreateUserDto": { "type": "object", "properties": { "username": { "type": "string", "description": "Username, must be unique.", "minLength": 6, "maxLength": 36 }, "email": { "type": "string" }, "password": { "type": "string", "description": "Password between 8 and 64 characters.", "minLength": 8, "maxLength": 64 }, "registrationCode": { "type": "string", "description": "Registration code (if needed)." } }, "required": [ "username", "email", "password" ] }, "UserDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Users ID." }, "created": { "format": "date-time", "type": "string", "description": "When the user was created." }, "admin": { "type": "boolean", "description": "If the user is a system admin." }, "email": { "type": "string", "description": "Users email." }, "username": { "type": "string", "description": "Users username." } }, "required": [ "id", "created", "admin", "email", "username" ] }, "RegistrationConfigDto": { "type": "object", "properties": { "inviteOnly": { "type": "boolean" } }, "required": [ "inviteOnly" ] }, "UpdatePasswordDto": { "type": "object", "properties": { "currentPassword": { "type": "string", "description": "This is only needed if a password is set.\nOAuth only accounts or accounts with alternative methods\ndo not need this." }, "password": { "type": "string", "description": "Password between 8 and 64 characters.", "minLength": 8, "maxLength": 64 } }, "required": [ "password" ] }, "UpdateUserDto": { "type": "object", "properties": { "username": { "type": "string", "minLength": 6, "maxLength": 36 }, "email": { "type": "string" } }, "required": [ "username", "email" ] }, "PublicUserDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Users ID." }, "username": { "type": "string", "description": "Users username." } }, "required": [ "id", "username" ] }, "AclListDto": { "type": "object", "properties": { "user": { "description": "User id that the permissions apply to.", "allOf": [ { "$ref": "#/components/schemas/UserDto" } ] }, "permissions": { "type": "object", "description": "List of permissions" } }, "required": [ "user", "permissions" ] }, "CreateProjectDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of project.", "minLength": 6, "maxLength": 36 } }, "required": [ "name" ] }, "ProjectDto": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string", "description": "Name of project." }, "ownerId": { "type": "string", "description": "Owner of project, has full access." }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": [ "id", "name", "ownerId", "createdAt", "updatedAt" ] }, "ProjectPolicyViewDto": { "type": "object", "properties": { "region": { "type": "string", "description": "The project's home region: where its named objects are born and its\ndirectory lives." }, "moving": { "type": "boolean", "description": "Whether the project is between homes; calls are refused, retryably, until it settles." }, "requestsPerSec": { "type": "number", "description": "Requests a node admits for the project per second, burst of the\nsame size; 0 is unbounded.", "minimum": 0 }, "workUnitsPerSec": { "type": "number", "description": "Work units a node lets the project spend per second; 0 is unbounded.", "minimum": 0 }, "egressAllow": { "description": "Hosts outbound requests and dials may reach; a leading dot matches\nsubdomains. Empty admits everything not denied.", "type": "array", "items": { "type": "string" } }, "egressDeny": { "description": "Hosts refused before the allow list is consulted.", "type": "array", "items": { "type": "string" } } }, "required": [ "region", "moving", "requestsPerSec", "workUnitsPerSec", "egressAllow", "egressDeny" ] }, "SetProjectRegionDto": { "type": "object", "properties": { "region": { "type": "string", "description": "A region token: one to sixteen of a-z, 0-9 and '-', not starting with '-'.", "pattern": "/^[a-z0-9][a-z0-9-]{0,15}$/" } }, "required": [ "region" ] }, "ProjectMoveDto": { "type": "object", "properties": { "fromRegion": { "type": "string" }, "toRegion": { "type": "string" }, "step": { "type": "string", "description": "marking, draining, copying, flipping, done, failed; empty when the project never moved." }, "objectsTotal": { "type": "number" }, "objectsCopied": { "type": "number" }, "error": { "type": "string", "description": "Set when the step is failed; the move may be started again." }, "startedAt": { "type": "number", "description": "Unix milliseconds; 0 when the project never moved." }, "finishedAt": { "type": "number", "description": "Unix milliseconds; 0 while the move runs." } }, "required": [ "fromRegion", "toRegion", "step", "objectsTotal", "objectsCopied", "error", "startedAt", "finishedAt" ] }, "ProjectPolicyDto": { "type": "object", "properties": { "requestsPerSec": { "type": "number", "description": "Requests a node admits for the project per second, burst of the\nsame size; 0 is unbounded.", "minimum": 0 }, "workUnitsPerSec": { "type": "number", "description": "Work units a node lets the project spend per second; 0 is unbounded.", "minimum": 0 }, "egressAllow": { "description": "Hosts outbound requests and dials may reach; a leading dot matches\nsubdomains. Empty admits everything not denied.", "type": "array", "items": { "type": "string" } }, "egressDeny": { "description": "Hosts refused before the allow list is consulted.", "type": "array", "items": { "type": "string" } } }, "required": [ "requestsPerSec", "workUnitsPerSec", "egressAllow", "egressDeny" ] }, "CreateServiceTokenDto": { "type": "object", "properties": { "access": { "type": "array", "description": "Access field names granted to the token (see the acl list shape).\nOmitted, the token can manage scripts and kv but not permissions.", "items": { "type": "string", "enum": [ "SCRIPT_READ", "SCRIPT_WRITE", "SCRIPT_RESOURCE", "PERMISSIONS_READ", "PERMISSIONS_WRITE", "PERMISSIONS_RESOURCE", "KV_READ", "KV_WRITE", "KV_RESOURCE", "DATABASE_READ", "DATABASE_WRITE", "DATABASE_RESOURCE", "SECRETS_READ", "SECRETS_WRITE", "SECRETS_RESOURCE", "FULL" ] } }, "name": { "type": "string", "description": "Human label for the token list, e.g. \"github deploy\"." } }, "required": [ "name" ] }, "CreatedServiceTokenDto": { "type": "object", "properties": { "token": { "type": "string", "description": "The full token. Store it now; it cannot be retrieved again." }, "id": { "type": "string" }, "name": { "type": "string" }, "tokenPrefix": { "type": "string", "description": "First characters of the secret, to match a held token to its row." }, "access": { "type": "object", "description": "Access field names to whether the token holds them." }, "createdAt": { "format": "date-time", "type": "string" }, "lastUsed": { "format": "date-time", "type": "string" } }, "required": [ "token", "id", "name", "tokenPrefix", "access", "createdAt" ] }, "ServiceTokenDto": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "tokenPrefix": { "type": "string", "description": "First characters of the secret, to match a held token to its row." }, "access": { "type": "object", "description": "Access field names to whether the token holds them." }, "createdAt": { "format": "date-time", "type": "string" }, "lastUsed": { "format": "date-time", "type": "string" } }, "required": [ "id", "name", "tokenPrefix", "access", "createdAt" ] }, "NamespaceDto": { "type": "object", "properties": { "projectId": { "type": "string" }, "name": { "type": "string", "description": "Namespace identifier (project scoped)" }, "count": { "type": "number", "description": "Amount of pairs in the namespace." } }, "required": [ "projectId", "name", "count" ] }, "PairType": { "type": "string", "enum": [ "STRING", "NUMBER", "INTEGER", "BOOLEAN", "JSON" ] }, "PairDto": { "type": "object", "properties": { "type": { "description": "The stored value is always text; this names how to read it back.", "$ref": "#/components/schemas/PairType" }, "ttl": { "type": "number", "description": "Seconds until the pair expires; absent for one that never does.\nDeclared optional so a generated client does not demand a field\nthe service omits." }, "projectId": { "type": "string" }, "namespace": { "type": "string" }, "key": { "type": "string" }, "value": { "type": "string" } }, "required": [ "type", "projectId", "namespace", "key", "value" ] }, "ListNamespaceDto": { "type": "object", "properties": { "pageSize": { "type": "number" }, "token": { "type": "string", "description": "Token used to fetch next page.\nNot provided on last page." }, "pairs": { "type": "array", "items": { "$ref": "#/components/schemas/PairDto" } } }, "required": [ "pageSize", "pairs" ] }, "SetKeyDto": { "type": "object", "properties": { "type": { "type": "string" }, "value": { "type": "string" } }, "required": [ "type", "value" ] }, "SecretDto": { "type": "object", "properties": { "name": { "type": "string" }, "version": { "type": "number", "description": "Head version; every rotation increments it." }, "createdMs": { "type": "number", "description": "Unix milliseconds of the head version write." }, "createdBy": { "type": "string", "description": "User id that wrote the head version." }, "createdByName": { "type": "string", "description": "Username behind createdBy, when the account still exists; empty otherwise." }, "declaredBy": { "type": "string", "nullable": true, "description": "Public identifier of the live script declaring this name; null is the orphan state, set but reachable by no live revision." }, "declaredByRevision": { "type": "string", "nullable": true, "description": "Revision id the declaration lives in, when declared." } }, "required": [ "name", "version", "createdMs", "createdBy", "createdByName", "declaredBy", "declaredByRevision" ] }, "SetSecretDto": { "type": "object", "properties": { "value": { "type": "string", "description": "The plaintext value; encrypted at rest by the secret service and never returned." } }, "required": [ "value" ] }, "SecretVersionDto": { "type": "object", "properties": { "version": { "type": "number" }, "createdMs": { "type": "number", "description": "Unix milliseconds this version was written." }, "createdBy": { "type": "string", "description": "User id that wrote it." }, "createdByName": { "type": "string", "description": "Username behind createdBy, when the account still exists." }, "deletedMs": { "type": "number", "description": "Unix milliseconds this version was tombstoned by a delete; 0 while live." } }, "required": [ "version", "createdMs", "createdBy", "createdByName", "deletedMs" ] }, "RegistrationSettingsDto": { "type": "object", "properties": { "inviteOnly": { "type": "boolean", "description": "Whether this instance requires a code to register." }, "smtpEnabled": { "type": "boolean", "description": "Whether invites can be mailed; false means links are copied." } }, "required": [ "inviteOnly", "smtpEnabled" ] }, "InviteRequestDto": { "type": "object", "properties": { "email": { "type": "string" } }, "required": [ "email" ] }, "RegistrationCodeDto": { "type": "object", "properties": { "id": { "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" }, "uses": { "type": "number" } }, "required": [ "id", "createdAt", "updatedAt", "uses" ] }, "InviteResponseDto": { "type": "object", "properties": { "code": { "description": "The one-use code backing the invite.", "allOf": [ { "$ref": "#/components/schemas/RegistrationCodeDto" } ] }, "link": { "type": "string", "description": "The register link the code rides in." }, "emailed": { "type": "boolean", "description": "Whether the invite was mailed; false means copy the link instead." } }, "required": [ "code", "link", "emailed" ] }, "SetAdminDto": { "type": "object", "properties": { "admin": { "type": "boolean" } }, "required": [ "admin" ] }, "AdminProjectDto": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "ownerUsername": { "type": "string", "description": "The owning user's name; ownership means full access." }, "createdAt": { "format": "date-time", "type": "string" } }, "required": [ "id", "name", "ownerUsername", "createdAt" ] }, "RegionDto": { "type": "object", "properties": { "name": { "type": "string", "description": "A region token: one to sixteen of a-z, 0-9 and '-', not starting with '-'." }, "dataPlaneAddr": { "type": "string", "description": "The region's data-plane ingress, host:port, what other regions forward to." }, "bucket": { "type": "string", "description": "The region's object bucket." }, "placementAddr": { "type": "string", "description": "The region's placement service as the control plane reaches it; a\nmove lists the project's objects there. Empty for the control\nplane's own region, which it reaches by its own setting." }, "s3Endpoint": { "type": "string", "description": "The region's own object storage endpoint, when it is not the\ncontrol plane's; empty means the control plane's S3 settings reach\nthe bucket. The access key is shown; the secret never is." }, "s3AccessKey": { "type": "string" } }, "required": [ "name", "dataPlaneAddr", "bucket", "placementAddr", "s3Endpoint", "s3AccessKey" ] }, "PutRegionDto": { "type": "object", "properties": { "dataPlaneAddr": { "type": "string", "minLength": 1 }, "bucket": { "type": "string", "minLength": 1 }, "placementAddr": { "type": "string" }, "s3Endpoint": { "type": "string", "description": "The region's own S3 endpoint with its scheme; omit for the control plane's." }, "s3AccessKey": { "type": "string" }, "s3SecretKey": { "type": "string", "description": "Write-only; never read back." } }, "required": [ "dataPlaneAddr", "bucket" ] }, "ResourceInstanceDto": { "type": "object", "properties": { "name": { "type": "string" }, "declaredBy": { "type": "string", "description": "Public identifier of a script declaring it; empty when only the directory remembers it." }, "orphaned": { "type": "boolean", "description": "Data exists but no live revision declares it; the platform keeps it until it is deleted explicitly." } }, "required": [ "name", "declaredBy", "orphaned" ] }, "QueueStatsDto": { "type": "object", "properties": { "depth": { "type": "number", "description": "Every message still queued." }, "inFlight": { "type": "number", "description": "Messages due now, in delivery." }, "oldestPending": { "type": "number", "nullable": true }, "deadLetters": { "type": "number" } }, "required": [ "depth", "inFlight", "deadLetters" ] }, "QueueMessageDto": { "type": "object", "properties": { "id": { "type": "number" }, "state": { "type": "string", "description": "pending, in-flight or dead." }, "attempts": { "type": "number" }, "preview": { "type": "string", "description": "Payload prefix." }, "size": { "type": "number", "description": "Payload size in bytes." }, "enqueuedMs": { "type": "number" }, "nextMs": { "type": "number", "nullable": true }, "diedMs": { "type": "number", "nullable": true } }, "required": [ "id", "state", "attempts", "preview", "size", "enqueuedMs" ] }, "QueueEventDto": { "type": "object", "properties": { "seq": { "type": "number" }, "at": { "type": "number" }, "kind": { "type": "string" }, "detail": { "type": "object", "description": "Structured event detail: message id, payload preview, producer, per-attempt error.", "additionalProperties": true } }, "required": [ "seq", "at", "kind", "detail" ] }, "RetriedDto": { "type": "object", "properties": { "requeued": { "type": "number", "description": "How many dead letters were requeued." } }, "required": [ "requeued" ] }, "ColumnInfoDto": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "description": "Declared SQLite type; empty when untyped." }, "notNull": { "type": "boolean" }, "primaryKey": { "type": "boolean" } }, "required": [ "name", "type", "notNull", "primaryKey" ] }, "TableInfoDto": { "type": "object", "properties": { "name": { "type": "string" }, "rows": { "type": "number" }, "columns": { "type": "array", "items": { "$ref": "#/components/schemas/ColumnInfoDto" } } }, "required": [ "name", "rows", "columns" ] }, "DatabaseOverviewDto": { "type": "object", "properties": { "sizeBytes": { "type": "number", "description": "Database file size in bytes." }, "tables": { "type": "array", "items": { "$ref": "#/components/schemas/TableInfoDto" } } }, "required": [ "sizeBytes", "tables" ] }, "SqlQueryDto": { "type": "object", "properties": { "sql": { "type": "string" }, "params": { "type": "array", "items": {} } }, "required": [ "sql" ] }, "SqlRowsDto": { "type": "object", "properties": { "rows": { "type": "array", "items": {} } }, "required": [ "rows" ] }, "ObjectInstanceDto": { "type": "object", "properties": { "class": { "type": "string", "description": "The object class." }, "name": { "type": "string", "description": "The instance name." }, "declaredBy": { "type": "string", "description": "Public identifier of the script whose code it runs." }, "createdMs": { "type": "number", "description": "Unix ms of the first claim." }, "expireAtMs": { "type": "number", "description": "When the platform deletes it if untouched; 0 = never." }, "deletedAtMs": { "type": "number", "description": "Tombstone time; nonzero is a deletion in progress the janitor is finishing." }, "alarmDueMs": { "type": "number", "description": "The pending alarm's due time; 0 = none." }, "nodeId": { "type": "string", "description": "The lease holder; empty = cold, next touch revives." } }, "required": [ "class", "name", "declaredBy", "createdMs", "expireAtMs", "deletedAtMs", "alarmDueMs", "nodeId" ] }, "ObjectPageDto": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectInstanceDto" } }, "total": { "type": "number", "description": "Instances matching the filter across every page." } }, "required": [ "items", "total" ] }, "DeleteOutcomeDto": { "type": "object", "properties": { "deleting": { "type": "number", "description": "Rows tombstoned by this request; the janitor finishes each one." } }, "required": [ "deleting" ] }, "DirectoryFieldDto": { "type": "object", "properties": { "name": { "type": "string" }, "kind": { "type": "string", "description": "string, integer, number, boolean or array. The store binds each value as the kind declared, and a filter is checked against it." } }, "required": [ "name", "kind" ] }, "ClassCountDto": { "type": "object", "properties": { "class": { "type": "string" }, "count": { "type": "number" }, "hasDirectory": { "type": "boolean", "description": "Whether the class's current revision declares a directory, so the console offers a search only where one exists." }, "directoryFields": { "description": "The fields that directory declares, so a filter can be typed against the same set the worker enforces. Empty for a class with no directory, and for one published before fields were declared.", "type": "array", "items": { "$ref": "#/components/schemas/DirectoryFieldDto" } }, "methods": { "description": "The methods the class's current revision declares, by name, so a shell can offer what an instance answers to. Which of them write is not declarable; a read-only session refuses at the call.", "type": "array", "items": { "type": "string" } } }, "required": [ "class", "count", "hasDirectory", "directoryFields", "methods" ] }, "ObjectCallDto": { "type": "object", "properties": { "method": { "type": "string", "description": "The method to call on the instance." }, "args": { "type": "array", "items": {}, "description": "Positional arguments, as json values." } }, "required": [ "method" ] }, "ObjectCallResultDto": { "type": "object", "properties": { "valueJson": { "type": "string", "description": "What the method returned, as json text; \"null\" for nothing. Text rather than a typed value because a method returns whatever it returns, and every generated client reads json text the same way (the same convention as condition values and entry fields)." } }, "required": [ "valueJson" ] }, "FollowerEdgeDto": { "type": "object", "properties": { "kind": { "type": "string", "description": "'object' (durable) or 'connection'." }, "follower": { "type": "string", "description": "The follower's identity, 'Class/name'." }, "connection": { "type": "string", "nullable": true, "description": "Connection edges only: the endpoint connection id." }, "topic": { "type": "string", "description": "The topic this edge listens on." }, "filter": { "type": "object", "nullable": true, "additionalProperties": true, "description": "Equality filter on event data fields, when set." }, "cursor": { "type": "number", "description": "Last event sequence this edge passed." }, "lag": { "type": "number", "nullable": true, "description": "Undelivered events behind the log head; durable edges only." }, "attempts": { "type": "number", "description": "Consecutive failed deliveries so far." }, "nextAt": { "type": "number", "description": "When delivery retries next (unix ms); 0 when not due." } }, "required": [ "kind", "follower", "topic", "cursor", "attempts", "nextAt" ] }, "FollowersDto": { "type": "object", "properties": { "head": { "type": "number", "description": "Newest event sequence in the publisher's log." }, "edges": { "type": "array", "items": { "$ref": "#/components/schemas/FollowerEdgeDto" } } }, "required": [ "head", "edges" ] }, "StatePairDto": { "type": "object", "properties": { "key": { "type": "string" }, "type": { "type": "string", "description": "How 'value' parses: the kv typed-pair kind." }, "value": { "type": "string", "description": "The stored value, as encoded text." } }, "required": [ "key", "type", "value" ] }, "StateDto": { "type": "object", "properties": { "entries": { "type": "array", "items": { "$ref": "#/components/schemas/StatePairDto" } } }, "required": [ "entries" ] }, "DirectoryConditionDto": { "type": "object", "properties": { "field": { "type": "string", "description": "Field name as the class's directory function returned it; nested tables arrive flattened, so \"location.region\" is one field." }, "op": { "type": "string", "description": "eq, ne, lt, lte, gt, gte, one_of, starts_with, contains or exists. one_of rather than in, because in is a Lua keyword." }, "valueJson": { "type": "string", "description": "The operand, json-encoded: a scalar, an array for one_of, or a boolean for exists." } }, "required": [ "field", "op", "valueJson" ] }, "DirectoryWhereDto": { "type": "object", "properties": { "conditions": { "type": "array", "items": { "$ref": "#/components/schemas/DirectoryConditionDto" } }, "any": { "description": "OR over sub-wheres.", "type": "array", "items": { "$ref": "#/components/schemas/DirectoryWhereDto" } }, "all": { "description": "Explicit AND, for grouping inside an any.", "type": "array", "items": { "$ref": "#/components/schemas/DirectoryWhereDto" } }, "none": { "description": "NOT over sub-wheres.", "type": "array", "items": { "$ref": "#/components/schemas/DirectoryWhereDto" } } } }, "DirectoryOrderDto": { "type": "object", "properties": { "field": { "type": "string" }, "descending": { "type": "boolean" } }, "required": [ "field" ] }, "DirectoryQueryDto": { "type": "object", "properties": { "where": { "$ref": "#/components/schemas/DirectoryWhereDto" }, "order": { "type": "array", "items": { "$ref": "#/components/schemas/DirectoryOrderDto" } }, "limit": { "type": "number", "description": "Rows this page may carry; the worker caps it." }, "cursor": { "type": "string", "description": "From a previous page." } } }, "DirectoryEntryDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The instance name; what you call to reach the object." }, "objectId": { "type": "string" }, "fields": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Field name to json-encoded value, for the fields this object has. A field the object lacks is simply absent." } }, "required": [ "name", "objectId", "fields" ] }, "DirectoryPageDto": { "type": "object", "properties": { "entries": { "type": "array", "items": { "$ref": "#/components/schemas/DirectoryEntryDto" } }, "cursor": { "type": "string", "description": "Feeds the next page; absent on the last." }, "building": { "description": "Fields the class has seen but not finished backfilling. A query naming one is refused; this reports the rest so progress is visible rather than a column mysteriously missing.", "type": "array", "items": { "type": "string" } } }, "required": [ "entries", "building" ] }, "DirectoryRebuiltDto": { "type": "object", "properties": { "live": { "type": "number", "description": "Identities the placement store still lists as live." }, "rows": { "type": "number", "description": "Rows recovered from manifests." }, "withoutRow": { "type": "number", "description": "Live objects whose manifest carries no row yet. Not an error: nothing has settled to copy, and a backfill is what covers them." }, "tombstones": { "type": "number", "description": "Rows retired because the object no longer exists." }, "held": { "type": "boolean", "description": "Whether a node did the work. False means another node holds the class and is rebuilding it already." } }, "required": [ "live", "rows", "withoutRow", "tombstones", "held" ] }, "VisitEntryDto": { "type": "object", "properties": { "entry": { "$ref": "#/components/schemas/DirectoryEntryDto" }, "unverified": { "type": "boolean", "description": "The row could not be checked against its object and is served anyway, saying so: dropping it would invent the false negative the directory refuses." }, "reason": { "type": "string", "description": "Why, when unverified." } }, "required": [ "entry", "unverified" ] }, "VisitPageDto": { "type": "object", "properties": { "entries": { "type": "array", "items": { "$ref": "#/components/schemas/VisitEntryDto" } }, "cursor": { "type": "string", "description": "Feeds the next page; absent on the last." }, "building": { "description": "Fields still building; a query naming one is refused.", "type": "array", "items": { "type": "string" } } }, "required": [ "entries", "building" ] }, "WorkflowDefinitionDto": { "type": "object", "properties": { "name": { "type": "string" }, "declaredBy": { "type": "string", "description": "Public identifier of the declaring script." }, "stepNames": { "description": "Step name literals found at publish: a superset of what may run, rendered as the hollow skeleton.", "type": "array", "items": { "type": "string" } } }, "required": [ "name", "declaredBy", "stepNames" ] }, "WorkflowRunDto": { "type": "object", "properties": { "id": { "type": "string", "description": "The caller-supplied run id." }, "definition": { "type": "string" }, "status": { "type": "string", "description": "completed, cancelled, sleeping, awaiting, running or unstarted." }, "detail": { "type": "object", "description": "The status detail: due times, awaited signal, reason.", "additionalProperties": true }, "entries": { "type": "number", "description": "Journal rows so far." }, "atStep": { "type": "string", "description": "The step or gate the run is at." }, "input": { "type": "object", "description": "The STARTED input, verbatim.", "additionalProperties": true, "nullable": true }, "startedAt": { "type": "number", "nullable": true }, "updatedAt": { "type": "number", "nullable": true } }, "required": [ "id", "definition", "status", "detail", "entries", "atStep", "input" ] }, "WorkflowJournalRowDto": { "type": "object", "properties": { "seq": { "type": "number" }, "at": { "type": "number" }, "kind": { "type": "string", "description": "STARTED, INTENT, RESULT, TIMER, SIGNAL, CHILD, CANCEL, COMPLETED or AMBIENT." }, "data": { "type": "object", "additionalProperties": true }, "format": { "type": "number" } }, "required": [ "seq", "at", "kind", "data", "format" ] }, "WorkflowRunDetailDto": { "type": "object", "properties": { "id": { "type": "string" }, "definition": { "type": "string" }, "status": { "type": "string" }, "detail": { "type": "object", "additionalProperties": true }, "journal": { "type": "array", "items": { "$ref": "#/components/schemas/WorkflowJournalRowDto" } } }, "required": [ "id", "definition", "status", "detail", "journal" ] }, "RunStartDto": { "type": "object", "properties": { "payload": { "type": "object", "additionalProperties": true }, "id": { "type": "string", "description": "The run id; the idempotency key. Omitted, the console mints one." } } }, "RunSignalDto": { "type": "object", "properties": { "name": { "type": "string" }, "payload": { "type": "object", "additionalProperties": true } }, "required": [ "name" ] }, "RunCancelDto": { "type": "object", "properties": { "reason": { "type": "string" } } }, "ShellRunDto": { "type": "object", "properties": { "source": { "type": "string", "description": "The chunk to run: any Luau, as typed or pasted. Its return value is the result." }, "wallSecs": { "type": "number", "description": "Wall budget in seconds; the node caps it." }, "write": { "type": "boolean", "description": "Whether the session is in write mode. Off, the chunk still runs, and the vm refuses kv set/delete, database exec and method calls inside it." } }, "required": [ "source" ] }, "ShellOutcomeDto": { "type": "object", "properties": { "valueJson": { "type": "string", "description": "The chunk's return value as json text; \"null\" for nothing." }, "output": { "description": "Every print and log line, in order.", "type": "array", "items": { "type": "string" } }, "error": { "type": "string", "description": "The chunk's own error, when it failed." }, "work": { "type": "number", "description": "Work units the run consumed." }, "wallMs": { "type": "number", "description": "Milliseconds the run took on the node." } }, "required": [ "valueJson", "output", "work", "wallMs" ] }, "ConnectionDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Node-local connection id." }, "connectionClass": { "type": "string", "description": "The declared connection class running the wire." }, "identity": { "type": "string", "description": "The identity it speaks as, 'Class/name'." }, "direction": { "type": "string", "description": "'inbound' (a client's upgrade) or 'outbound' (dialled by the project)." }, "peer": { "type": "string", "nullable": true, "description": "The far side's host, outbound only." }, "node": { "type": "string", "description": "The node holding the wire." }, "scriptId": { "type": "string", "description": "The script whose revision opened it." }, "openedAt": { "type": "number", "description": "Unix milliseconds the wire opened." }, "status": { "type": "string", "description": "'new', 'warm' (holding a vm) or 'hibernated' (wire kept, vm dropped)." }, "follows": { "type": "number", "description": "Edges the connection holds right now." } }, "required": [ "id", "connectionClass", "identity", "direction", "node", "scriptId", "openedAt", "status", "follows" ] }, "CreateInterestDto": { "type": "object", "properties": { "email": { "type": "string", "minLength": 3, "maxLength": 254 }, "source": { "type": "string", "description": "Which surface this came from. Defaults to `landing`, which is the\nonly one that asks today.", "minLength": 1, "maxLength": 32 } }, "required": [ "email" ] }, "InterestSignupDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Signup id." }, "email": { "type": "string", "description": "Address that asked to be kept posted." }, "source": { "type": "string", "description": "Surface the address came from." }, "createdAt": { "format": "date-time", "type": "string", "description": "When the address was first recorded." } }, "required": [ "id", "email", "source", "createdAt" ] } } } }