{ "openapi": "3.1.0", "info": { "title": "Example App API", "version": "0.1.0" }, "servers": [ { "url": "/", "description": "This deployment." } ], "paths": { "/api/v1/account.analytics.export": { "post": { "operationId": "account.analytics.export", "tags": [ "account" ], "summary": "effect procedure on the user scope", "description": "Kind: effect. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ticket": { "type": "string", "minLength": 1, "maxLength": 512 } }, "required": [ "ticket" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "exportedAt": { "type": "string" }, "document": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": [ "exportedAt", "document" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/account.analytics.request": { "post": { "operationId": "account.analytics.request", "tags": [ "account" ], "summary": "effect procedure on the user scope", "description": "Kind: effect. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "kind": { "type": "string", "enum": [ "erase", "export" ] } }, "required": [ "kind" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ticket": { "type": "string" }, "kind": { "type": "string", "enum": [ "erase", "export" ] }, "status": { "type": "string", "enum": [ "pending", "running", "completed", "failed", "expired" ] }, "created": { "type": "boolean" }, "stores": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "completed", "not_keyed", "failed" ] }, "deleted": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "anonymized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "exported": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "status", "deleted", "anonymized", "exported" ], "additionalProperties": false } }, "requestedAt": { "type": "string" }, "finishedAt": { "type": [ "string", "null" ] }, "expiresAt": { "type": [ "string", "null" ] } }, "required": [ "ticket", "kind", "status", "created", "stores", "requestedAt", "finishedAt", "expiresAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/account.analytics.status": { "post": { "operationId": "account.analytics.status", "tags": [ "account" ], "summary": "effect procedure on the user scope", "description": "Kind: effect. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ticket": { "type": "string", "minLength": 1, "maxLength": 512 } }, "required": [ "ticket" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "ticket": { "type": "string" }, "kind": { "type": "string", "enum": [ "erase", "export" ] }, "status": { "type": "string", "enum": [ "pending", "running", "completed", "failed", "expired" ] }, "created": { "type": "boolean" }, "stores": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "completed", "not_keyed", "failed" ] }, "deleted": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "anonymized": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "exported": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "status", "deleted", "anonymized", "exported" ], "additionalProperties": false } }, "requestedAt": { "type": "string" }, "finishedAt": { "type": [ "string", "null" ] }, "expiresAt": { "type": [ "string", "null" ] } }, "required": [ "ticket", "kind", "status", "created", "stores", "requestedAt", "finishedAt", "expiresAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/account.data.export": { "post": { "operationId": "account.data.export", "tags": [ "account" ], "summary": "effect procedure on the user scope", "description": "Kind: effect. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "format": { "type": "string", "const": "conusai.account-export.v1" }, "exportedAt": { "type": "string" }, "subject": { "type": "string" }, "complete": { "type": "boolean" }, "failed": { "type": "array", "items": { "type": "string" } }, "sections": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "oneOf": [ { "type": "object", "properties": { "status": { "type": "string", "const": "ok" }, "data": { "anyOf": [ { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, { "type": "null" } ] } }, "required": [ "status", "data" ], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "const": "failed" }, "code": { "type": "string" }, "retryable": { "type": "boolean" } }, "required": [ "status", "code", "retryable" ], "additionalProperties": false }, { "type": "object", "properties": { "status": { "type": "string", "const": "not_exported" } }, "required": [ "status" ], "additionalProperties": false } ] } } }, "required": [ "format", "exportedAt", "subject", "complete", "failed", "sections" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/account.deletion.request": { "post": { "operationId": "account.deletion.request", "tags": [ "account" ], "summary": "effect procedure on the user scope", "description": "Kind: effect. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "confirm": { "type": "string", "minLength": 1, "maxLength": 320 } }, "required": [ "confirm" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "state": { "type": "string", "enum": [ "erasing", "held", "completed" ] }, "erased": { "type": "array", "items": { "type": "string" } }, "pending": { "type": "array", "items": { "type": "string" } }, "abandoned": { "type": "array", "items": { "type": "string" } }, "requestedAt": { "type": "string" }, "completedAt": { "type": [ "string", "null" ] } }, "required": [ "state", "erased", "pending", "abandoned", "requestedAt", "completedAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/account.deletion.status": { "post": { "operationId": "account.deletion.status", "tags": [ "account" ], "summary": "read procedure on the user scope", "description": "Kind: read. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "deletion": { "anyOf": [ { "type": "object", "properties": { "state": { "type": "string", "enum": [ "erasing", "held", "completed" ] }, "erased": { "type": "array", "items": { "type": "string" } }, "pending": { "type": "array", "items": { "type": "string" } }, "abandoned": { "type": "array", "items": { "type": "string" } }, "requestedAt": { "type": "string" }, "completedAt": { "type": [ "string", "null" ] } }, "required": [ "state", "erased", "pending", "abandoned", "requestedAt", "completedAt" ], "additionalProperties": false }, { "type": "null" } ] }, "interactive": { "type": "boolean" }, "recentSignIn": { "type": "boolean" }, "signedInAt": { "type": [ "string", "null" ] }, "recentSignInSeconds": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "lastOwnerOf": { "type": "array", "items": { "type": "object", "properties": { "slug": { "type": "string" }, "name": { "type": "string" } }, "required": [ "slug", "name" ], "additionalProperties": false } }, "onlyMemberOf": { "type": "array", "items": { "type": "object", "properties": { "slug": { "type": "string" }, "name": { "type": "string" } }, "required": [ "slug", "name" ], "additionalProperties": false } }, "modules": { "type": "array", "items": { "type": "string" } } }, "required": [ "deletion", "interactive", "recentSignIn", "signedInAt", "recentSignInSeconds", "lastOwnerOf", "onlyMemberOf", "modules" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/agent.approval.list": { "post": { "operationId": "agent.approval.list", "tags": [ "agent" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: agent.approval.review.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" } }, "required": [ "org", "workspace", "project" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "approvals": { "type": "array", "items": { "type": "object", "properties": { "runId": { "type": "string" }, "stepKey": { "type": "string" }, "goal": { "type": "string" }, "tool": { "type": "string" }, "arguments": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "reviewUrl": { "type": [ "string", "null" ] }, "createdAt": { "type": "string" } }, "required": [ "runId", "stepKey", "goal", "tool", "arguments", "reviewUrl", "createdAt" ], "additionalProperties": false } } }, "required": [ "approvals" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/agent.approval.review": { "post": { "operationId": "agent.approval.review", "tags": [ "agent" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: agent.approval.review. Audit event: agent.approval.reviewed.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "runId": { "type": "string" }, "stepKey": { "type": "string" }, "decision": { "type": "string", "enum": [ "approve", "reject" ] }, "reason": { "type": "string", "maxLength": 500 } }, "required": [ "org", "workspace", "project", "runId", "stepKey", "decision" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "runId": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "awaiting_approval", "completed", "failed", "cancelled", "uncertain" ] } }, "required": [ "runId", "status" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/agent.run.cancel": { "post": { "operationId": "agent.run.cancel", "tags": [ "agent" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: agent.run.cancel. Audit event: agent.run.cancelled.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "runId": { "type": "string" } }, "required": [ "org", "workspace", "project", "runId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "runId": { "type": "string" }, "cancelled": { "type": "boolean" } }, "required": [ "runId", "cancelled" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/agent.run.events": { "get": { "operationId": "agent.run.events", "tags": [ "agent" ], "summary": "effect procedure on the project scope", "description": "Kind: effect. Scope: project. Permission: agent.run.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "org", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "workspace", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "project", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "runId", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "after", "in": "query", "required": false, "schema": { "type": "string", "pattern": "^(?:-1|\\d{1,9}|agk1:[A-Za-z0-9_-]{1,128}:\\d{1,9})$" } } ], "responses": { "200": { "description": "The file bytes, streamed with the stored filename.", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/agent.run.getMany": { "post": { "operationId": "agent.run.getMany", "tags": [ "agent" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: agent.run.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 64 } } }, "required": [ "org", "workspace", "project", "ids" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "runId": { "type": "string" }, "goal": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "awaiting_approval", "completed", "failed", "cancelled", "uncertain" ] }, "failureCode": { "anyOf": [ { "type": "string", "enum": [ "tool_error", "budget_exhausted", "plan_refused", "approval_unavailable", "internal" ] }, { "type": "null" } ] }, "failureDetail": { "type": [ "string", "null" ] }, "plan": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "label": { "type": "string" }, "tool": { "type": "string" }, "args": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "needsApproval": { "type": "boolean" }, "status": { "type": "string", "enum": [ "pending", "committed", "failed", "cancelled", "uncertain" ] }, "attempts": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "error": { "type": [ "string", "null" ] } }, "required": [ "key", "label", "tool", "args", "needsApproval", "status", "attempts", "error" ], "additionalProperties": false } }, "usageCostMicrocents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "usageSteps": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "percent": { "type": "number" }, "cancelRequested": { "type": "boolean" }, "answer": { "type": [ "string", "null" ] }, "answerProvenance": { "anyOf": [ { "type": "object", "properties": { "ai_generated": { "type": "boolean", "const": true }, "mode": { "type": "string", "enum": [ "machine-generated", "ai-originated" ] }, "digital_source_type": { "type": "string", "minLength": 1, "maxLength": 200 }, "generator": { "type": "string", "minLength": 1, "maxLength": 100 }, "provider": { "type": "string", "minLength": 1, "maxLength": 100 }, "model": { "type": "string", "minLength": 1, "maxLength": 200 }, "generated_at": { "type": "string", "minLength": 1, "maxLength": 40 } }, "required": [ "ai_generated", "mode", "digital_source_type", "generator", "model", "generated_at" ], "additionalProperties": false }, { "type": "null" } ] }, "actorId": { "type": "string" }, "createdAt": { "type": "string" }, "startedAt": { "type": [ "string", "null" ] }, "finishedAt": { "type": [ "string", "null" ] } }, "required": [ "runId", "goal", "status", "failureCode", "failureDetail", "plan", "usageCostMicrocents", "usageSteps", "percent", "cancelRequested", "answer", "answerProvenance", "actorId", "createdAt", "startedAt", "finishedAt" ], "additionalProperties": false } } }, "required": [ "items" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/agent.run.list": { "post": { "operationId": "agent.run.list", "tags": [ "agent" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: agent.run.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } }, "required": [ "org", "workspace", "project" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "runs": { "type": "array", "items": { "type": "object", "properties": { "runId": { "type": "string" }, "goal": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "awaiting_approval", "completed", "failed", "cancelled", "uncertain" ] }, "failureCode": { "anyOf": [ { "type": "string", "enum": [ "tool_error", "budget_exhausted", "plan_refused", "approval_unavailable", "internal" ] }, { "type": "null" } ] }, "failureDetail": { "type": [ "string", "null" ] }, "plan": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "label": { "type": "string" }, "tool": { "type": "string" }, "args": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "needsApproval": { "type": "boolean" }, "status": { "type": "string", "enum": [ "pending", "committed", "failed", "cancelled", "uncertain" ] }, "attempts": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "error": { "type": [ "string", "null" ] } }, "required": [ "key", "label", "tool", "args", "needsApproval", "status", "attempts", "error" ], "additionalProperties": false } }, "usageCostMicrocents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "usageSteps": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "percent": { "type": "number" }, "cancelRequested": { "type": "boolean" }, "answer": { "type": [ "string", "null" ] }, "answerProvenance": { "anyOf": [ { "type": "object", "properties": { "ai_generated": { "type": "boolean", "const": true }, "mode": { "type": "string", "enum": [ "machine-generated", "ai-originated" ] }, "digital_source_type": { "type": "string", "minLength": 1, "maxLength": 200 }, "generator": { "type": "string", "minLength": 1, "maxLength": 100 }, "provider": { "type": "string", "minLength": 1, "maxLength": 100 }, "model": { "type": "string", "minLength": 1, "maxLength": 200 }, "generated_at": { "type": "string", "minLength": 1, "maxLength": 40 } }, "required": [ "ai_generated", "mode", "digital_source_type", "generator", "model", "generated_at" ], "additionalProperties": false }, { "type": "null" } ] }, "actorId": { "type": "string" }, "createdAt": { "type": "string" }, "startedAt": { "type": [ "string", "null" ] }, "finishedAt": { "type": [ "string", "null" ] } }, "required": [ "runId", "goal", "status", "failureCode", "failureDetail", "plan", "usageCostMicrocents", "usageSteps", "percent", "cancelRequested", "answer", "answerProvenance", "actorId", "createdAt", "startedAt", "finishedAt" ], "additionalProperties": false } }, "cursor": { "type": "string" }, "hasMore": { "type": "boolean" } }, "required": [ "runs", "hasMore" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/agent.run.start": { "post": { "operationId": "agent.run.start", "tags": [ "agent" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: agent.run.start.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "goal": { "type": "string", "minLength": 1, "maxLength": 2000 }, "plan": { "minItems": 1, "maxItems": 25, "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "minLength": 1, "maxLength": 64, "pattern": "^[a-z][a-z0-9-]*$" }, "label": { "type": "string", "minLength": 1, "maxLength": 200 }, "tool": { "type": "string", "minLength": 1, "maxLength": 200 }, "args": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "needsApproval": { "type": "boolean" } }, "required": [ "key", "label", "tool", "args" ], "additionalProperties": false } }, "budget": { "type": "object", "properties": { "maxCostMicrocents": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "maxSteps": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "maxDurationSeconds": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "additionalProperties": false } }, "required": [ "org", "workspace", "project", "goal", "plan" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "runId": { "type": "string" }, "goal": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "awaiting_approval", "completed", "failed", "cancelled", "uncertain" ] }, "failureCode": { "anyOf": [ { "type": "string", "enum": [ "tool_error", "budget_exhausted", "plan_refused", "approval_unavailable", "internal" ] }, { "type": "null" } ] }, "failureDetail": { "type": [ "string", "null" ] }, "plan": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "label": { "type": "string" }, "tool": { "type": "string" }, "args": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "needsApproval": { "type": "boolean" }, "status": { "type": "string", "enum": [ "pending", "committed", "failed", "cancelled", "uncertain" ] }, "attempts": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "error": { "type": [ "string", "null" ] } }, "required": [ "key", "label", "tool", "args", "needsApproval", "status", "attempts", "error" ], "additionalProperties": false } }, "usageCostMicrocents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "usageSteps": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "percent": { "type": "number" }, "cancelRequested": { "type": "boolean" }, "answer": { "type": [ "string", "null" ] }, "answerProvenance": { "anyOf": [ { "type": "object", "properties": { "ai_generated": { "type": "boolean", "const": true }, "mode": { "type": "string", "enum": [ "machine-generated", "ai-originated" ] }, "digital_source_type": { "type": "string", "minLength": 1, "maxLength": 200 }, "generator": { "type": "string", "minLength": 1, "maxLength": 100 }, "provider": { "type": "string", "minLength": 1, "maxLength": 100 }, "model": { "type": "string", "minLength": 1, "maxLength": 200 }, "generated_at": { "type": "string", "minLength": 1, "maxLength": 40 } }, "required": [ "ai_generated", "mode", "digital_source_type", "generator", "model", "generated_at" ], "additionalProperties": false }, { "type": "null" } ] }, "actorId": { "type": "string" }, "createdAt": { "type": "string" }, "startedAt": { "type": [ "string", "null" ] }, "finishedAt": { "type": [ "string", "null" ] } }, "required": [ "runId", "goal", "status", "failureCode", "failureDetail", "plan", "usageCostMicrocents", "usageSteps", "percent", "cancelRequested", "answer", "answerProvenance", "actorId", "createdAt", "startedAt", "finishedAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/agent.run.status": { "post": { "operationId": "agent.run.status", "tags": [ "agent" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: agent.run.read. Exposed as an MCP tool.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "runId": { "type": "string" } }, "required": [ "org", "workspace", "project", "runId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "runId": { "type": "string" }, "goal": { "type": "string" }, "status": { "type": "string", "enum": [ "queued", "running", "awaiting_approval", "completed", "failed", "cancelled", "uncertain" ] }, "failureCode": { "anyOf": [ { "type": "string", "enum": [ "tool_error", "budget_exhausted", "plan_refused", "approval_unavailable", "internal" ] }, { "type": "null" } ] }, "failureDetail": { "type": [ "string", "null" ] }, "plan": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "label": { "type": "string" }, "tool": { "type": "string" }, "args": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "needsApproval": { "type": "boolean" }, "status": { "type": "string", "enum": [ "pending", "committed", "failed", "cancelled", "uncertain" ] }, "attempts": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "error": { "type": [ "string", "null" ] } }, "required": [ "key", "label", "tool", "args", "needsApproval", "status", "attempts", "error" ], "additionalProperties": false } }, "usageCostMicrocents": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "usageSteps": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "percent": { "type": "number" }, "cancelRequested": { "type": "boolean" }, "answer": { "type": [ "string", "null" ] }, "answerProvenance": { "anyOf": [ { "type": "object", "properties": { "ai_generated": { "type": "boolean", "const": true }, "mode": { "type": "string", "enum": [ "machine-generated", "ai-originated" ] }, "digital_source_type": { "type": "string", "minLength": 1, "maxLength": 200 }, "generator": { "type": "string", "minLength": 1, "maxLength": 100 }, "provider": { "type": "string", "minLength": 1, "maxLength": 100 }, "model": { "type": "string", "minLength": 1, "maxLength": 200 }, "generated_at": { "type": "string", "minLength": 1, "maxLength": 40 } }, "required": [ "ai_generated", "mode", "digital_source_type", "generator", "model", "generated_at" ], "additionalProperties": false }, { "type": "null" } ] }, "actorId": { "type": "string" }, "createdAt": { "type": "string" }, "startedAt": { "type": [ "string", "null" ] }, "finishedAt": { "type": [ "string", "null" ] } }, "required": [ "runId", "goal", "status", "failureCode", "failureDetail", "plan", "usageCostMicrocents", "usageSteps", "percent", "cancelRequested", "answer", "answerProvenance", "actorId", "createdAt", "startedAt", "finishedAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/assistant.conversation.get": { "post": { "operationId": "assistant.conversation.get", "tags": [ "assistant" ], "summary": "read procedure on the workspace scope", "description": "Kind: read. Scope: workspace. Permission: assistant.conversation.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "conversationId": { "type": "string", "minLength": 1, "maxLength": 64 }, "limit": { "type": "integer", "minimum": 1, "maximum": 200 } }, "required": [ "org", "workspace", "conversationId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "conversationId": { "type": "string" }, "title": { "type": "string" }, "createdAt": { "type": "string" }, "lastTurnAt": { "type": "string" }, "turns": { "type": "array", "items": { "type": "object", "properties": { "turnId": { "type": "string" }, "status": { "type": "string", "enum": [ "running", "complete", "approval-required", "step-limit", "tool-limit", "time-limit", "cancelled", "error", "interrupted" ] }, "steps": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "toolCalls": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "degraded": { "type": "boolean" }, "answerProvenance": { "anyOf": [ { "type": "object", "properties": { "ai_generated": { "type": "boolean", "const": true }, "mode": { "type": "string", "enum": [ "machine-generated", "ai-originated" ] }, "digital_source_type": { "type": "string", "minLength": 1, "maxLength": 200 }, "generator": { "type": "string", "minLength": 1, "maxLength": 100 }, "provider": { "type": "string", "minLength": 1, "maxLength": 100 }, "model": { "type": "string", "minLength": 1, "maxLength": 200 }, "generated_at": { "type": "string", "minLength": 1, "maxLength": 40 } }, "required": [ "ai_generated", "mode", "digital_source_type", "generator", "model", "generated_at" ], "additionalProperties": false }, { "type": "null" } ] }, "startedAt": { "type": "string" }, "finishedAt": { "type": [ "string", "null" ] } }, "required": [ "turnId", "status", "steps", "toolCalls", "degraded", "answerProvenance", "startedAt", "finishedAt" ], "additionalProperties": false } }, "messages": { "type": "array", "items": { "type": "object", "properties": { "messageId": { "type": [ "string", "null" ] }, "role": { "type": "string", "enum": [ "user", "assistant", "tool" ] }, "text": { "type": "string" }, "toolCalls": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "arguments": { "type": "string" } }, "required": [ "id", "name", "arguments" ], "additionalProperties": false } }, "toolCallId": { "type": [ "string", "null" ] }, "rootActions": { "type": "array", "items": { "type": "object", "properties": { "toolCallId": { "type": "string", "minLength": 1, "maxLength": 300 }, "receipt": { "type": "object", "properties": { "version": { "type": "number", "const": 1 }, "owner": { "type": "string", "const": "platform-app-action-v1" }, "action_id": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "procedure": { "type": "string", "pattern": "^[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*){1,5}$" }, "expires_at_micros": { "type": "string", "pattern": "^[1-9][0-9]{0,18}$" }, "status": { "type": "string", "const": "proposed" } }, "required": [ "version", "owner", "action_id", "procedure", "expires_at_micros", "status" ], "additionalProperties": false } }, "required": [ "toolCallId", "receipt" ], "additionalProperties": false } }, "aiGenerated": { "type": "boolean" }, "provenance": { "anyOf": [ { "type": "object", "properties": { "ai_generated": { "type": "boolean", "const": true }, "mode": { "type": "string", "enum": [ "machine-generated", "ai-originated" ] }, "digital_source_type": { "type": "string", "minLength": 1, "maxLength": 200 }, "generator": { "type": "string", "minLength": 1, "maxLength": 100 }, "provider": { "type": "string", "minLength": 1, "maxLength": 100 }, "model": { "type": "string", "minLength": 1, "maxLength": 200 }, "generated_at": { "type": "string", "minLength": 1, "maxLength": 40 } }, "required": [ "ai_generated", "mode", "digital_source_type", "generator", "model", "generated_at" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "messageId", "role", "text", "toolCalls", "toolCallId", "aiGenerated", "provenance" ], "additionalProperties": false } }, "truncated": { "type": "boolean" } }, "required": [ "conversationId", "title", "createdAt", "lastTurnAt", "turns", "messages", "truncated" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/assistant.conversation.list": { "post": { "operationId": "assistant.conversation.list", "tags": [ "assistant" ], "summary": "read procedure on the workspace scope", "description": "Kind: read. Scope: workspace. Permission: assistant.conversation.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } }, "required": [ "org", "workspace" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "conversations": { "type": "array", "items": { "type": "object", "properties": { "conversationId": { "type": "string" }, "title": { "type": "string" }, "createdAt": { "type": "string" }, "lastTurnAt": { "type": "string" } }, "required": [ "conversationId", "title", "createdAt", "lastTurnAt" ], "additionalProperties": false } }, "cursor": { "type": "string" }, "hasMore": { "type": "boolean" } }, "required": [ "conversations", "hasMore" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/assistant.receipt.list": { "post": { "operationId": "assistant.receipt.list", "tags": [ "assistant" ], "summary": "read procedure on the workspace scope", "description": "Kind: read. Scope: workspace. Permission: assistant.conversation.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "conversationId": { "type": "string", "minLength": 1, "maxLength": 64 }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 100 } }, "required": [ "org", "workspace" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "receipts": { "type": "array", "items": { "type": "object", "properties": { "receiptId": { "type": "string" }, "conversationId": { "type": "string" }, "turnId": { "type": "string" }, "step": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "toolCallId": { "type": "string" }, "tool": { "type": "string" }, "kind": { "type": "string", "enum": [ "read", "effect", "proposal" ] }, "outcome": { "type": "string", "enum": [ "succeeded", "refused", "failed" ] }, "proposalId": { "type": [ "string", "null" ] }, "argumentsHash": { "type": "string" }, "createdAt": { "type": "string" }, "proposal": { "anyOf": [ { "type": "object", "properties": { "status": { "type": "string" }, "decidedBy": { "type": [ "string", "null" ] }, "decidedAt": { "type": [ "string", "null" ] }, "writtenRecordId": { "type": [ "string", "null" ] } }, "required": [ "status", "decidedBy", "decidedAt", "writtenRecordId" ], "additionalProperties": false }, { "type": "null" } ] } }, "required": [ "receiptId", "conversationId", "turnId", "step", "toolCallId", "tool", "kind", "outcome", "proposalId", "argumentsHash", "createdAt", "proposal" ], "additionalProperties": false } }, "cursor": { "type": "string" }, "hasMore": { "type": "boolean" } }, "required": [ "receipts", "hasMore" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/assistant.rootAction.reconcile": { "post": { "operationId": "assistant.rootAction.reconcile", "tags": [ "assistant" ], "summary": "effect procedure on the workspace scope", "description": "Kind: effect. Scope: workspace. Permission: assistant.conversation.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "conversationId": { "type": "string", "minLength": 1, "maxLength": 64 } }, "required": [ "org", "workspace", "conversationId" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "observed": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "unresolved": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "settled": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "observed", "unresolved", "settled" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/assistant.turn.send": { "post": { "operationId": "assistant.turn.send", "tags": [ "assistant" ], "summary": "effect procedure on the workspace scope", "description": "Kind: effect. Scope: workspace. Permission: assistant.turn.send. Answers with a stream, written as it is made.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "turnId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "conversationId": { "type": "string", "minLength": 1, "maxLength": 64 }, "message": { "type": "string", "minLength": 1, "maxLength": 8000 }, "after": { "type": "string", "pattern": "^(?:-1|\\d{1,9}|agk1:[A-Za-z0-9_-]{1,128}:\\d{1,9})$" }, "locale": { "type": "string", "pattern": "^[a-z]{2,3}(?:-[A-Z]{2})?$" }, "pageContext": { "type": "object", "properties": { "scope": { "type": "object", "properties": { "organization": { "type": "string", "maxLength": 200 }, "workspace": { "type": "string", "maxLength": 200 }, "project": { "type": "string", "maxLength": 200 } }, "required": [ "organization" ] }, "resource": { "type": "string", "maxLength": 200 }, "recordId": { "type": "string", "maxLength": 200 }, "record": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": [ "scope" ] } }, "required": [ "org", "workspace", "turnId", "message" ] } } } }, "responses": { "200": { "description": "The answer, streamed as the handler writes it; its media type is the handler's.", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/assistant.workspace.openProject": { "post": { "operationId": "assistant.workspace.openProject", "tags": [ "assistant" ], "summary": "read procedure on the workspace scope", "description": "Kind: read. Scope: workspace. Permission: tenancy.project.read. Exposed as an MCP tool.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "slug": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$", "description": "The project's slug, as the list of projects gives it." } }, "required": [ "org", "workspace", "slug" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "slug": { "type": "string" }, "name": { "type": "string" }, "path": { "type": "string" } }, "required": [ "slug", "name", "path" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/assistant.workspace.projects": { "post": { "operationId": "assistant.workspace.projects", "tags": [ "assistant" ], "summary": "read procedure on the workspace scope", "description": "Kind: read. Scope: workspace. Permission: tenancy.project.read. Exposed as an MCP tool.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org", "workspace" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "projects": { "type": "array", "items": { "type": "object", "properties": { "slug": { "type": "string" }, "name": { "type": "string" }, "archived": { "type": "boolean" }, "updatedAt": { "type": "string" } }, "required": [ "slug", "name", "archived", "updatedAt" ], "additionalProperties": false } } }, "required": [ "projects" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/auth.apiKey.create": { "post": { "operationId": "auth.apiKey.create", "tags": [ "auth" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: auth.api-key.manage. Audit event: auth.api_key_created.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "expiresAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" } }, "required": [ "org", "name" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "key": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "prefix": { "type": "string" }, "userId": { "type": "string" }, "createdAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "expiresAt": { "anyOf": [ { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, { "type": "null" } ] }, "revokedAt": { "anyOf": [ { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, { "type": "null" } ] } }, "required": [ "id", "name", "prefix", "userId", "createdAt", "expiresAt", "revokedAt" ], "additionalProperties": false }, "secret": { "type": "string" } }, "required": [ "key", "secret" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/auth.apiKey.list": { "post": { "operationId": "auth.apiKey.list", "tags": [ "auth" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: auth.api-key.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "keys": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "prefix": { "type": "string" }, "userId": { "type": "string" }, "createdAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "expiresAt": { "anyOf": [ { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, { "type": "null" } ] }, "revokedAt": { "anyOf": [ { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, { "type": "null" } ] } }, "required": [ "id", "name", "prefix", "userId", "createdAt", "expiresAt", "revokedAt" ], "additionalProperties": false } } }, "required": [ "keys" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/auth.apiKey.revoke": { "post": { "operationId": "auth.apiKey.revoke", "tags": [ "auth" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: auth.api-key.manage. Audit event: auth.api_key_revoked.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "id": { "type": "string" } }, "required": [ "org", "id" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "key": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "prefix": { "type": "string" }, "userId": { "type": "string" }, "createdAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "expiresAt": { "anyOf": [ { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, { "type": "null" } ] }, "revokedAt": { "anyOf": [ { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, { "type": "null" } ] } }, "required": [ "id", "name", "prefix", "userId", "createdAt", "expiresAt", "revokedAt" ], "additionalProperties": false } }, "required": [ "key" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/auth.session.current": { "post": { "operationId": "auth.session.current", "tags": [ "auth" ], "summary": "read procedure on the user scope", "description": "Kind: read. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "userId": { "type": "string" }, "email": { "type": "string" }, "displayName": { "type": "string" }, "locale": { "type": "string" } }, "required": [ "userId", "email", "displayName", "locale" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/branding.brand.get": { "post": { "operationId": "branding.brand.get", "tags": [ "branding" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: branding.brand.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "displayName": { "type": [ "string", "null" ] }, "primary": { "type": [ "string", "null" ] }, "accent": { "type": [ "string", "null" ] }, "logoLight": { "type": [ "string", "null" ] }, "logoDark": { "type": [ "string", "null" ] } }, "required": [ "displayName", "primary", "accent", "logoLight", "logoDark" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/branding.brand.set": { "post": { "operationId": "branding.brand.set", "tags": [ "branding" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: branding.brand.write. Audit event: branding.brand_changed.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "displayName": { "anyOf": [ { "type": "string", "maxLength": 60 }, { "type": "null" } ] }, "primary": { "anyOf": [ { "type": "string", "maxLength": 32 }, { "type": "null" } ] }, "accent": { "anyOf": [ { "type": "string", "maxLength": 32 }, { "type": "null" } ] } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "displayName": { "type": [ "string", "null" ] }, "primary": { "type": [ "string", "null" ] }, "accent": { "type": [ "string", "null" ] }, "logoLight": { "type": [ "string", "null" ] }, "logoDark": { "type": [ "string", "null" ] } }, "required": [ "displayName", "primary", "accent", "logoLight", "logoDark" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/branding.logo.clear": { "post": { "operationId": "branding.logo.clear", "tags": [ "branding" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: branding.brand.write. Audit event: branding.brand_changed.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "variant": { "type": "string", "enum": [ "light", "dark" ] } }, "required": [ "org", "variant" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "displayName": { "type": [ "string", "null" ] }, "primary": { "type": [ "string", "null" ] }, "accent": { "type": [ "string", "null" ] }, "logoLight": { "type": [ "string", "null" ] }, "logoDark": { "type": [ "string", "null" ] } }, "required": [ "displayName", "primary", "accent", "logoLight", "logoDark" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/branding.logo.get": { "post": { "operationId": "branding.logo.get", "tags": [ "branding" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: branding.brand.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "variant": { "type": "string", "enum": [ "light", "dark" ] }, "size": { "type": "string", "enum": [ "1x", "2x" ] } }, "required": [ "org", "variant" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "contentType": { "type": "string" }, "body": { "type": "string" } }, "required": [ "contentType", "body" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/branding.logo.set": { "post": { "operationId": "branding.logo.set", "tags": [ "branding" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: branding.brand.write. Audit event: branding.brand_changed.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "variant": { "type": "string", "enum": [ "light", "dark" ] }, "contentType": { "type": "string", "maxLength": 64 }, "body": { "type": "string", "maxLength": 2796207 } }, "required": [ "org", "variant", "contentType", "body" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "displayName": { "type": [ "string", "null" ] }, "primary": { "type": [ "string", "null" ] }, "accent": { "type": [ "string", "null" ] }, "logoLight": { "type": [ "string", "null" ] }, "logoDark": { "type": [ "string", "null" ] } }, "required": [ "displayName", "primary", "accent", "logoLight", "logoDark" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/files.file.beginUpload": { "post": { "operationId": "files.file.beginUpload", "tags": [ "files" ], "summary": "effect procedure on the project scope", "description": "Kind: effect. Scope: project. Permission: files.file.write.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "filename": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[^/\\\\\\u0000-\\u001f\\u007f]+$" }, "contentType": { "type": "string", "minLength": 3, "maxLength": 127, "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$" }, "size": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "org", "workspace", "project", "filename", "contentType", "size" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "fileId": { "type": "string" }, "parts": { "minItems": 1, "type": "array", "items": { "type": "object", "properties": { "number": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "size": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "number", "size" ], "additionalProperties": false } }, "expiresAt": { "type": "string" } }, "required": [ "fileId", "parts", "expiresAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/files.file.completeUpload": { "post": { "operationId": "files.file.completeUpload", "tags": [ "files" ], "summary": "effect procedure on the project scope", "description": "Kind: effect. Scope: project. Permission: files.file.write.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "fileId": { "type": "string" }, "parts": { "minItems": 1, "maxItems": 10000, "type": "array", "items": { "type": "object", "properties": { "number": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "etag": { "type": "string", "minLength": 1, "maxLength": 200 } }, "required": [ "number", "etag" ] } } }, "required": [ "org", "workspace", "project", "fileId", "parts" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "fileId": { "type": "string" }, "filename": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[^/\\\\\\u0000-\\u001f\\u007f]+$" }, "contentType": { "type": "string", "minLength": 3, "maxLength": 127, "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$" }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "uploadedBy": { "type": "string" }, "createdAt": { "type": "string" }, "storedAt": { "type": "string" } }, "required": [ "fileId", "filename", "contentType", "size", "sha256", "uploadedBy", "createdAt", "storedAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/files.file.delete": { "post": { "operationId": "files.file.delete", "tags": [ "files" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: files.file.delete.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "fileId": { "type": "string" } }, "required": [ "org", "workspace", "project", "fileId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/files.file.download": { "get": { "operationId": "files.file.download", "tags": [ "files" ], "summary": "effect procedure on the project scope", "description": "Kind: effect. Scope: project. Permission: files.file.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "org", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "workspace", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "project", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "fileId", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, { "name": "length", "in": "query", "required": false, "schema": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, { "name": "disposition", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "inline", "attachment" ] } } ], "responses": { "200": { "description": "The file bytes, streamed with the stored filename.", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/files.file.get": { "post": { "operationId": "files.file.get", "tags": [ "files" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: files.file.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "fileId": { "type": "string" } }, "required": [ "org", "workspace", "project", "fileId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "fileId": { "type": "string" }, "filename": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[^/\\\\\\u0000-\\u001f\\u007f]+$" }, "contentType": { "type": "string", "minLength": 3, "maxLength": 127, "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$" }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "uploadedBy": { "type": "string" }, "createdAt": { "type": "string" }, "storedAt": { "type": "string" } }, "required": [ "fileId", "filename", "contentType", "size", "sha256", "uploadedBy", "createdAt", "storedAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/files.file.list": { "post": { "operationId": "files.file.list", "tags": [ "files" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: files.file.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 200 } }, "required": [ "org", "workspace", "project" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "files": { "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string" }, "filename": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[^/\\\\\\u0000-\\u001f\\u007f]+$" }, "contentType": { "type": "string", "minLength": 3, "maxLength": 127, "pattern": "^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$" }, "size": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "uploadedBy": { "type": "string" }, "createdAt": { "type": "string" }, "storedAt": { "type": "string" } }, "required": [ "fileId", "filename", "contentType", "size", "sha256", "uploadedBy", "createdAt", "storedAt" ], "additionalProperties": false } }, "cursor": { "type": "string" }, "hasMore": { "type": "boolean" } }, "required": [ "files", "hasMore" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/files.file.putPart": { "put": { "operationId": "files.file.putPart", "tags": [ "files" ], "summary": "effect procedure on the project scope", "description": "Kind: effect. Scope: project. Permission: files.file.write.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." }, { "name": "org", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "workspace", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "project", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "fileId", "in": "query", "required": true, "schema": { "type": "string" } }, { "name": "part", "in": "query", "required": true, "schema": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } } ], "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } }, "description": "The bytes, sent as they are. Their length must be the one the upload declared." }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "part": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "etag": { "type": "string" } }, "required": [ "part", "etag" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 104857600 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/guides.builder.open": { "post": { "operationId": "guides.builder.open", "tags": [ "guides" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: guides.runtime.use.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "code": { "type": "string", "minLength": 1, "maxLength": 200 } }, "required": [ "org", "code" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "anyOf": [ { "type": "object", "properties": { "console_origin": { "type": "string" }, "guide": { "type": "object", "properties": { "id": { "type": "string" }, "key": { "type": "string" }, "kind": { "type": "string" } }, "required": [ "id", "key", "kind" ], "additionalProperties": false }, "preview": { "anyOf": [ {}, { "type": "null" } ] }, "expires_at": { "type": "string" } }, "required": [ "console_origin", "guide", "preview", "expires_at" ], "additionalProperties": false }, { "type": "null" } ] } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/guides.runtime.bootstrap": { "post": { "operationId": "guides.runtime.bootstrap", "tags": [ "guides" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: guides.runtime.use.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "path": { "type": "string", "minLength": 1, "maxLength": 1000, "format": "starts_with", "pattern": "^\\/.*" }, "locale": { "type": "string", "minLength": 2, "maxLength": 35 } }, "required": [ "org", "path" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "oneOf": [ { "type": "object", "properties": { "mode": { "type": "string", "const": "platform" }, "etag": { "type": "string" }, "guides": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "kind": { "type": "string" }, "version": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "content": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "progress": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": [ "key", "kind", "version", "content", "progress" ], "additionalProperties": {} } }, "throttle": { "type": "object", "properties": { "cooldown_seconds": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "one_at_a_time": { "type": "boolean" } }, "required": [ "cooldown_seconds", "one_at_a_time" ], "additionalProperties": false }, "traits": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": [ "string", "number", "boolean", "null" ] } } }, "required": [ "mode", "etag", "guides" ], "additionalProperties": false }, { "type": "object", "properties": { "mode": { "type": "string", "const": "offline" }, "guides": { "type": "array", "items": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "traits": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": [ "string", "number", "boolean", "null" ] } } }, "required": [ "mode", "guides" ], "additionalProperties": false } ] } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/guides.runtime.deleteFile": { "post": { "operationId": "guides.runtime.deleteFile", "tags": [ "guides" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: guides.runtime.use.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "fileId": { "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" } }, "required": [ "org", "fileId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/guides.runtime.record": { "post": { "operationId": "guides.runtime.record", "tags": [ "guides" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: guides.runtime.use.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "idempotencyKey": { "type": "string", "minLength": 1, "maxLength": 200 }, "events": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "object", "properties": { "schema_version": { "type": "number", "const": 1 }, "event_id": { "type": "string", "minLength": 1, "maxLength": 100 }, "type": { "type": "string", "minLength": 1, "maxLength": 100 } }, "required": [ "schema_version", "event_id", "type" ], "additionalProperties": {} } } }, "required": [ "org", "idempotencyKey", "events" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "outcomes": { "type": "array", "items": { "type": "object", "properties": { "event_id": { "type": "string" }, "status": { "type": "string", "enum": [ "applied", "duplicate" ] }, "guide_key": { "type": [ "string", "null" ] }, "progress_revision": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "progress_epoch": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] } }, "required": [ "event_id", "status", "guide_key", "progress_revision", "progress_epoch" ], "additionalProperties": false } } }, "required": [ "outcomes" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/guides.runtime.uploadFile": { "put": { "operationId": "guides.runtime.uploadFile", "tags": [ "guides" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: guides.runtime.use.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." }, { "name": "org", "in": "query", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, { "name": "guideKey", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 200 } }, { "name": "guideVersion", "in": "query", "required": true, "schema": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } }, { "name": "questionId", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 40 } }, { "name": "name", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 255 } }, { "name": "contentType", "in": "query", "required": true, "schema": { "type": "string", "minLength": 1, "maxLength": 255 } }, { "name": "size", "in": "query", "required": true, "schema": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } } ], "requestBody": { "required": true, "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } }, "description": "The bytes, sent as they are. Their length must be the one the upload declared." }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "file_id": { "type": "string" }, "name": { "type": "string" }, "content_type": { "type": "string" }, "size_bytes": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "file_id", "name", "content_type", "size_bytes" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 104857600 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notes.attachment.add": { "post": { "operationId": "notes.attachment.add", "tags": [ "notes" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: notes.attachment.write.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "noteId": { "type": "string" }, "fileId": { "type": "string" } }, "required": [ "org", "workspace", "project", "noteId", "fileId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "attachmentId": { "type": "string" }, "fileId": { "type": "string" }, "filename": { "type": "string" }, "contentType": { "type": "string" }, "size": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "attachedAt": { "type": "string" } }, "required": [ "attachmentId", "fileId", "filename", "contentType", "size", "attachedAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notes.attachment.remove": { "post": { "operationId": "notes.attachment.remove", "tags": [ "notes" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: notes.attachment.write.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "noteId": { "type": "string" }, "attachmentId": { "type": "string" } }, "required": [ "org", "workspace", "project", "noteId", "attachmentId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notes.note.create": { "post": { "operationId": "notes.note.create", "tags": [ "notes" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: notes.note.write.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "body": { "type": "string", "maxLength": 20000 } }, "required": [ "org", "workspace", "project", "title", "body" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "noteId": { "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "version": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "attachmentCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "noteId", "title", "body", "version", "createdBy", "createdAt", "updatedAt", "attachmentCount" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notes.note.delete": { "post": { "operationId": "notes.note.delete", "tags": [ "notes" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: notes.note.delete.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "noteId": { "type": "string" } }, "required": [ "org", "workspace", "project", "noteId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notes.note.get": { "post": { "operationId": "notes.note.get", "tags": [ "notes" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: notes.note.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "noteId": { "type": "string" } }, "required": [ "org", "workspace", "project", "noteId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "note": { "type": "object", "properties": { "noteId": { "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "version": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "attachmentCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "noteId", "title", "body", "version", "createdBy", "createdAt", "updatedAt", "attachmentCount" ], "additionalProperties": false }, "attachments": { "type": "array", "items": { "type": "object", "properties": { "attachmentId": { "type": "string" }, "fileId": { "type": "string" }, "filename": { "type": "string" }, "contentType": { "type": "string" }, "size": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "attachedAt": { "type": "string" } }, "required": [ "attachmentId", "fileId", "filename", "contentType", "size", "attachedAt" ], "additionalProperties": false } }, "attachmentsEnabled": { "type": "boolean" } }, "required": [ "note", "attachments", "attachmentsEnabled" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notes.note.getMany": { "post": { "operationId": "notes.note.getMany", "tags": [ "notes" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: notes.note.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "ids": { "minItems": 1, "maxItems": 100, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 64 } } }, "required": [ "org", "workspace", "project", "ids" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "noteId": { "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "version": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "attachmentCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "noteId", "title", "body", "version", "createdBy", "createdAt", "updatedAt", "attachmentCount" ], "additionalProperties": false } } }, "required": [ "items" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notes.note.list": { "post": { "operationId": "notes.note.list", "tags": [ "notes" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: notes.note.read. Exposed as an MCP tool.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 200 } }, "required": [ "org", "workspace", "project" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "notes": { "type": "array", "items": { "type": "object", "properties": { "noteId": { "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "version": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "attachmentCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "noteId", "title", "body", "version", "createdBy", "createdAt", "updatedAt", "attachmentCount" ], "additionalProperties": false } }, "cursor": { "type": "string" }, "hasMore": { "type": "boolean" } }, "required": [ "notes", "hasMore" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notes.note.update": { "post": { "operationId": "notes.note.update", "tags": [ "notes" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: notes.note.write.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string" }, "workspace": { "type": "string" }, "project": { "type": "string" }, "noteId": { "type": "string" }, "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "body": { "type": "string", "maxLength": 20000 }, "expectedVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } }, "required": [ "org", "workspace", "project", "noteId", "title", "body", "expectedVersion" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "noteId": { "type": "string" }, "title": { "type": "string" }, "body": { "type": "string" }, "version": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" }, "attachmentCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "noteId", "title", "body", "version", "createdBy", "createdAt", "updatedAt", "attachmentCount" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notifications.inbox.list": { "post": { "operationId": "notifications.inbox.list", "tags": [ "notifications" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: notifications.inbox.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "minLength": 1 }, "unread": { "default": false, "type": "boolean" }, "cursor": { "type": "string", "maxLength": 16384 }, "limit": { "default": 25, "type": "integer", "minimum": 1, "maximum": 50 } }, "required": [ "org" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "createdAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "updatedAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "orgId": { "type": "string" }, "recipientId": { "type": "string" }, "key": { "type": "string", "minLength": 1, "maxLength": 200 }, "category": { "type": "string", "enum": [ "invitation", "job", "notice" ] }, "code": { "type": "string", "enum": [ "organization_ready", "member_joined", "access_changed", "invitation_accepted", "job_completed", "job_failed", "custom" ] }, "title": { "type": [ "string", "null" ] }, "description": { "type": [ "string", "null" ] }, "href": { "anyOf": [ { "type": "string", "maxLength": 1024 }, { "type": "null" } ] }, "readAt": { "anyOf": [ { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, { "type": "null" } ] }, "expiresAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" } }, "required": [ "id", "version", "createdAt", "updatedAt", "orgId", "recipientId", "key", "category", "code", "title", "description", "href", "readAt", "expiresAt" ], "additionalProperties": false } }, "cursor": { "type": "string" }, "hasMore": { "type": "boolean" }, "unreadCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "items", "hasMore", "unreadCount" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notifications.inbox.markAllRead": { "post": { "operationId": "notifications.inbox.markAllRead", "tags": [ "notifications" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: notifications.inbox.write.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "minLength": 1 } }, "required": [ "org" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "unreadCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "unreadCount" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notifications.inbox.markRead": { "post": { "operationId": "notifications.inbox.markRead", "tags": [ "notifications" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: notifications.inbox.write.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "minLength": 1 }, "id": { "type": "string" } }, "required": [ "org", "id" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "unreadCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "unreadCount" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/notifications.inbox.summary": { "post": { "operationId": "notifications.inbox.summary", "tags": [ "notifications" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: notifications.inbox.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "minLength": 1 } }, "required": [ "org" ], "additionalProperties": false } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "unreadCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "unreadCount" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/proposals.proposal.approve": { "post": { "operationId": "proposals.proposal.approve", "tags": [ "proposals" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: proposals.proposal.approve.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "proposalId": { "type": "string", "minLength": 1, "maxLength": 64 }, "expectedVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "changeHash": { "type": "string", "minLength": 1 } }, "required": [ "org", "workspace", "project", "proposalId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "proposalId": { "type": "string" }, "version": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "targetKey": { "type": "string", "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }, "targetRecordId": { "type": [ "string", "null" ] }, "writtenRecordId": { "type": [ "string", "null" ] }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "evidence": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "minLength": 1, "maxLength": 64 }, "page": { "type": "integer", "minimum": 1, "maximum": 100000 }, "blockId": { "type": "string", "minLength": 1, "maxLength": 64 }, "box": { "type": "object", "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 }, "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }, "height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, "quote": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "fileId" ], "additionalProperties": false } }, "model": { "type": "string" }, "promptVersion": { "type": "string" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "editedBy": { "type": [ "string", "null" ] }, "editedAt": { "type": [ "string", "null" ] }, "decidedBy": { "type": [ "string", "null" ] }, "decidedAt": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "proposalId", "version", "status", "targetKey", "targetRecordId", "writtenRecordId", "change", "evidence", "model", "promptVersion", "createdBy", "createdAt", "editedBy", "editedAt", "decidedBy", "decidedAt", "reason" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/proposals.proposal.approveMany": { "post": { "operationId": "proposals.proposal.approveMany", "tags": [ "proposals" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: proposals.proposal.approve.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "proposalIds": { "minItems": 1, "maxItems": 500, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 64 } }, "expectations": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "object", "properties": { "expectedVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "changeHash": { "type": "string", "minLength": 1 } } } } }, "required": [ "org", "workspace", "project", "proposalIds", "expectations" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "proposals": { "type": "array", "items": { "type": "object", "properties": { "proposalId": { "type": "string" }, "version": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "targetKey": { "type": "string", "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }, "targetRecordId": { "type": [ "string", "null" ] }, "writtenRecordId": { "type": [ "string", "null" ] }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "evidence": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "minLength": 1, "maxLength": 64 }, "page": { "type": "integer", "minimum": 1, "maximum": 100000 }, "blockId": { "type": "string", "minLength": 1, "maxLength": 64 }, "box": { "type": "object", "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 }, "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }, "height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, "quote": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "fileId" ], "additionalProperties": false } }, "model": { "type": "string" }, "promptVersion": { "type": "string" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "editedBy": { "type": [ "string", "null" ] }, "editedAt": { "type": [ "string", "null" ] }, "decidedBy": { "type": [ "string", "null" ] }, "decidedAt": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "proposalId", "version", "status", "targetKey", "targetRecordId", "writtenRecordId", "change", "evidence", "model", "promptVersion", "createdBy", "createdAt", "editedBy", "editedAt", "decidedBy", "decidedAt", "reason" ], "additionalProperties": false } } }, "required": [ "proposals" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/proposals.proposal.create": { "post": { "operationId": "proposals.proposal.create", "tags": [ "proposals" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: proposals.proposal.create. Takes an Idempotency-Key header.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": true, "schema": { "type": "string", "minLength": 8, "maxLength": 200 }, "description": "The first answer for this key is replayed, so a retry is a retry and not a second write." }, { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "targetKey": { "type": "string", "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }, "targetRecordId": { "type": "string", "minLength": 1, "maxLength": 64 }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "evidence": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "minLength": 1, "maxLength": 64 }, "page": { "type": "integer", "minimum": 1, "maximum": 100000 }, "blockId": { "type": "string", "minLength": 1, "maxLength": 64 }, "box": { "type": "object", "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 }, "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }, "height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, "quote": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "fileId" ], "additionalProperties": false } }, "model": { "type": "string", "minLength": 1, "maxLength": 128 }, "promptVersion": { "type": "string", "minLength": 1, "maxLength": 64 } }, "required": [ "org", "workspace", "project", "targetKey", "change", "evidence", "model", "promptVersion" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "proposalId": { "type": "string" }, "version": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "targetKey": { "type": "string", "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }, "targetRecordId": { "type": [ "string", "null" ] }, "writtenRecordId": { "type": [ "string", "null" ] }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "evidence": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "minLength": 1, "maxLength": 64 }, "page": { "type": "integer", "minimum": 1, "maximum": 100000 }, "blockId": { "type": "string", "minLength": 1, "maxLength": 64 }, "box": { "type": "object", "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 }, "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }, "height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, "quote": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "fileId" ], "additionalProperties": false } }, "model": { "type": "string" }, "promptVersion": { "type": "string" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "editedBy": { "type": [ "string", "null" ] }, "editedAt": { "type": [ "string", "null" ] }, "decidedBy": { "type": [ "string", "null" ] }, "decidedAt": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "proposalId", "version", "status", "targetKey", "targetRecordId", "writtenRecordId", "change", "evidence", "model", "promptVersion", "createdBy", "createdAt", "editedBy", "editedAt", "decidedBy", "decidedAt", "reason" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/proposals.proposal.edit": { "post": { "operationId": "proposals.proposal.edit", "tags": [ "proposals" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: proposals.proposal.edit.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "proposalId": { "type": "string", "minLength": 1, "maxLength": 64 }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "expectedVersion": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 } }, "required": [ "org", "workspace", "project", "proposalId", "change", "expectedVersion" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "proposalId": { "type": "string" }, "version": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "targetKey": { "type": "string", "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }, "targetRecordId": { "type": [ "string", "null" ] }, "writtenRecordId": { "type": [ "string", "null" ] }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "evidence": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "minLength": 1, "maxLength": 64 }, "page": { "type": "integer", "minimum": 1, "maximum": 100000 }, "blockId": { "type": "string", "minLength": 1, "maxLength": 64 }, "box": { "type": "object", "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 }, "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }, "height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, "quote": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "fileId" ], "additionalProperties": false } }, "model": { "type": "string" }, "promptVersion": { "type": "string" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "editedBy": { "type": [ "string", "null" ] }, "editedAt": { "type": [ "string", "null" ] }, "decidedBy": { "type": [ "string", "null" ] }, "decidedAt": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "proposalId", "version", "status", "targetKey", "targetRecordId", "writtenRecordId", "change", "evidence", "model", "promptVersion", "createdBy", "createdAt", "editedBy", "editedAt", "decidedBy", "decidedAt", "reason" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/proposals.proposal.get": { "post": { "operationId": "proposals.proposal.get", "tags": [ "proposals" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: proposals.proposal.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "proposalId": { "type": "string", "minLength": 1, "maxLength": 64 } }, "required": [ "org", "workspace", "project", "proposalId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "proposalId": { "type": "string" }, "version": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "targetKey": { "type": "string", "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }, "targetRecordId": { "type": [ "string", "null" ] }, "writtenRecordId": { "type": [ "string", "null" ] }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "evidence": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "minLength": 1, "maxLength": 64 }, "page": { "type": "integer", "minimum": 1, "maximum": 100000 }, "blockId": { "type": "string", "minLength": 1, "maxLength": 64 }, "box": { "type": "object", "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 }, "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }, "height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, "quote": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "fileId" ], "additionalProperties": false } }, "model": { "type": "string" }, "promptVersion": { "type": "string" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "editedBy": { "type": [ "string", "null" ] }, "editedAt": { "type": [ "string", "null" ] }, "decidedBy": { "type": [ "string", "null" ] }, "decidedAt": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "proposalId", "version", "status", "targetKey", "targetRecordId", "writtenRecordId", "change", "evidence", "model", "promptVersion", "createdBy", "createdAt", "editedBy", "editedAt", "decidedBy", "decidedAt", "reason" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/proposals.proposal.list": { "post": { "operationId": "proposals.proposal.list", "tags": [ "proposals" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: proposals.proposal.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "cursor": { "type": "string" }, "limit": { "type": "integer", "minimum": 1, "maximum": 200 } }, "required": [ "org", "workspace", "project" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "proposals": { "type": "array", "items": { "type": "object", "properties": { "proposalId": { "type": "string" }, "version": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "targetKey": { "type": "string", "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }, "targetRecordId": { "type": [ "string", "null" ] }, "writtenRecordId": { "type": [ "string", "null" ] }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "evidence": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "minLength": 1, "maxLength": 64 }, "page": { "type": "integer", "minimum": 1, "maximum": 100000 }, "blockId": { "type": "string", "minLength": 1, "maxLength": 64 }, "box": { "type": "object", "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 }, "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }, "height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, "quote": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "fileId" ], "additionalProperties": false } }, "model": { "type": "string" }, "promptVersion": { "type": "string" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "editedBy": { "type": [ "string", "null" ] }, "editedAt": { "type": [ "string", "null" ] }, "decidedBy": { "type": [ "string", "null" ] }, "decidedAt": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "proposalId", "version", "status", "targetKey", "targetRecordId", "writtenRecordId", "change", "evidence", "model", "promptVersion", "createdBy", "createdAt", "editedBy", "editedAt", "decidedBy", "decidedAt", "reason" ], "additionalProperties": false } }, "cursor": { "type": "string" }, "hasMore": { "type": "boolean" } }, "required": [ "proposals", "hasMore" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/proposals.proposal.reject": { "post": { "operationId": "proposals.proposal.reject", "tags": [ "proposals" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: proposals.proposal.reject.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "proposalId": { "type": "string", "minLength": 1, "maxLength": 64 }, "reason": { "type": "string", "minLength": 1, "maxLength": 1000 } }, "required": [ "org", "workspace", "project", "proposalId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "proposalId": { "type": "string" }, "version": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, "status": { "type": "string", "enum": [ "pending", "approved", "rejected" ] }, "targetKey": { "type": "string", "maxLength": 128, "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }, "targetRecordId": { "type": [ "string", "null" ] }, "writtenRecordId": { "type": [ "string", "null" ] }, "change": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "evidence": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "type": "object", "properties": { "fileId": { "type": "string", "minLength": 1, "maxLength": 64 }, "page": { "type": "integer", "minimum": 1, "maximum": 100000 }, "blockId": { "type": "string", "minLength": 1, "maxLength": 64 }, "box": { "type": "object", "properties": { "x": { "type": "number", "minimum": 0, "maximum": 1 }, "y": { "type": "number", "minimum": 0, "maximum": 1 }, "width": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }, "height": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 } }, "required": [ "x", "y", "width", "height" ], "additionalProperties": false }, "quote": { "type": "string", "minLength": 1, "maxLength": 2000 } }, "required": [ "fileId" ], "additionalProperties": false } }, "model": { "type": "string" }, "promptVersion": { "type": "string" }, "createdBy": { "type": "string" }, "createdAt": { "type": "string" }, "editedBy": { "type": [ "string", "null" ] }, "editedAt": { "type": [ "string", "null" ] }, "decidedBy": { "type": [ "string", "null" ] }, "decidedAt": { "type": [ "string", "null" ] }, "reason": { "type": [ "string", "null" ] } }, "required": [ "proposalId", "version", "status", "targetKey", "targetRecordId", "writtenRecordId", "change", "evidence", "model", "promptVersion", "createdBy", "createdAt", "editedBy", "editedAt", "decidedBy", "decidedAt", "reason" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/support.projectProcessingStatus.get": { "post": { "operationId": "support.projectProcessingStatus.get", "tags": [ "support" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: support.chat.use. Exposed as an MCP tool.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org", "workspace", "project" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "state": { "type": "string", "enum": [ "empty", "processing", "ready", "failed" ] }, "processing": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "extracted": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "failed": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "state", "processing", "extracted", "failed" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/support.widget.config": { "post": { "operationId": "support.widget.config", "tags": [ "support" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: support.chat.use.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "oneOf": [ { "type": "object", "properties": { "mode": { "type": "string", "const": "platform" }, "channel": { "type": "string", "minLength": 1 } }, "required": [ "mode", "channel" ], "additionalProperties": false }, { "type": "object", "properties": { "mode": { "type": "string", "const": "unavailable" }, "reason": { "type": "string", "enum": [ "offline", "unconfigured" ] } }, "required": [ "mode", "reason" ], "additionalProperties": false } ] } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/support.widgetSession.mint": { "post": { "operationId": "support.widgetSession.mint", "tags": [ "support" ], "summary": "effect procedure on the org scope", "description": "Kind: effect. Scope: org. Permission: support.chat.use.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "token": { "type": "string", "format": "starts_with", "pattern": "^sws_.*" }, "expires_at": { "type": "string" } }, "required": [ "token", "expires_at" ], "additionalProperties": {} } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.invitation.accept": { "post": { "operationId": "tenancy.invitation.accept", "tags": [ "tenancy" ], "summary": "write procedure on the user scope", "description": "Kind: write. Scope: user. Permission: none. Audit event: tenancy.member_joined.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "token": { "type": "string", "minLength": 16, "maxLength": 128 } }, "required": [ "org", "token" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "orgId": { "type": "string" }, "role": { "type": "string", "enum": [ "viewer", "member", "admin", "owner" ] }, "workspace": { "type": "string" } }, "required": [ "orgId", "role", "workspace" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.invitation.list": { "post": { "operationId": "tenancy.invitation.list", "tags": [ "tenancy" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: tenancy.invitation.list.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "invitations": { "type": "array", "items": { "type": "object", "properties": { "invitationId": { "type": "string" }, "email": { "type": "string" }, "role": { "type": "string", "enum": [ "viewer", "member", "admin", "owner" ] }, "roleKey": { "type": "string" }, "workspaceId": { "type": [ "string", "null" ] }, "workspaceRole": { "anyOf": [ { "type": "string", "enum": [ "viewer", "editor", "admin" ] }, { "type": "null" } ] }, "expiresAt": { "type": "string" }, "expiry": { "type": "string" }, "invitedBy": { "type": "string" }, "inviter": { "type": "object", "properties": { "userId": { "type": "string" }, "email": { "type": "string" }, "displayName": { "type": "string" } }, "required": [ "userId", "email", "displayName" ], "additionalProperties": false } }, "required": [ "invitationId", "email", "role", "roleKey", "expiresAt", "expiry", "invitedBy", "inviter" ], "additionalProperties": false } } }, "required": [ "invitations" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.invitation.read": { "post": { "operationId": "tenancy.invitation.read", "tags": [ "tenancy" ], "summary": "read procedure on the public scope", "description": "Kind: read. Scope: public. Permission: none.", "security": [ {} ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "token": { "type": "string", "minLength": 16, "maxLength": 128 } }, "required": [ "org", "token" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "invitationId": { "type": "string" }, "state": { "type": "string", "enum": [ "open", "used", "revoked", "expired" ] }, "email": { "type": "string" }, "organization": { "type": "object", "properties": { "slug": { "type": "string" }, "name": { "type": "string" } }, "required": [ "slug", "name" ], "additionalProperties": false }, "role": { "type": "string", "enum": [ "viewer", "member", "admin", "owner" ] }, "roleKey": { "type": "string" }, "expiresAt": { "type": "string" } }, "required": [ "invitationId", "state", "email", "organization", "role", "roleKey", "expiresAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.invitation.resend": { "post": { "operationId": "tenancy.invitation.resend", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.member.invite. Audit event: tenancy.member_invited.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "invitationId": { "type": "string" } }, "required": [ "org", "invitationId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "invitationId": { "type": "string" }, "email": { "type": "string" }, "token": { "type": "string" }, "expiresAt": { "type": "string" } }, "required": [ "invitationId", "email", "token", "expiresAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.invitation.revoke": { "post": { "operationId": "tenancy.invitation.revoke", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.member.manage. Audit event: tenancy.invitation_revoked.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "invitationId": { "type": "string" } }, "required": [ "org", "invitationId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.me.get": { "post": { "operationId": "tenancy.me.get", "tags": [ "tenancy" ], "summary": "read procedure on the user scope", "description": "Kind: read. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "userId": { "type": "string" }, "email": { "type": "string" }, "displayName": { "type": "string" }, "locale": { "type": "string" }, "organizations": { "type": "array", "items": { "type": "object", "properties": { "slug": { "type": "string" }, "name": { "type": "string" }, "role": { "type": "string", "enum": [ "viewer", "member", "admin", "owner" ] } }, "required": [ "slug", "name", "role" ], "additionalProperties": false } } }, "required": [ "userId", "email", "displayName", "locale", "organizations" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.me.permissions": { "post": { "operationId": "tenancy.me.permissions", "tags": [ "tenancy" ], "summary": "read procedure on the user scope", "description": "Kind: read. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "permissions": { "type": "array", "items": { "type": "string" } }, "revision": { "type": "string" } }, "required": [ "permissions", "revision" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.me.update": { "post": { "operationId": "tenancy.me.update", "tags": [ "tenancy" ], "summary": "write procedure on the user scope", "description": "Kind: write. Scope: user. Permission: none.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "locale": { "type": "string", "minLength": 2, "maxLength": 35, "pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{1,8})*$" } }, "required": [ "locale" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "locale": { "type": "string" } }, "required": [ "locale" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.member.assign": { "post": { "operationId": "tenancy.member.assign", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.member.manage. Audit event: tenancy.member_role_changed.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "userId": { "type": "string" }, "level": { "type": "string", "enum": [ "org", "workspace", "project" ] }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "roleKey": { "type": "string", "pattern": "^(?:viewer|editor|admin|owner|custom:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$" } }, "required": [ "org", "userId", "level", "roleKey" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "userId": { "type": "string" }, "level": { "type": "string", "enum": [ "org", "workspace", "project" ] }, "workspace": { "type": "string" }, "project": { "type": "string" }, "roleKey": { "type": "string" } }, "required": [ "userId", "level", "roleKey" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.member.change-role": { "post": { "operationId": "tenancy.member.change-role", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.member.manage. Audit event: tenancy.member_role_changed.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "userId": { "type": "string" }, "role": { "type": "string", "enum": [ "viewer", "member", "admin", "owner" ] } }, "required": [ "org", "userId", "role" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "userId": { "type": "string" }, "role": { "type": "string", "enum": [ "viewer", "member", "admin", "owner" ] } }, "required": [ "userId", "role" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.member.invite": { "post": { "operationId": "tenancy.member.invite", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.member.invite. Audit event: tenancy.member_invited.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "email": { "type": "string", "minLength": 3, "maxLength": 320 }, "role": { "type": "string", "enum": [ "viewer", "member", "admin", "owner" ] }, "roleKey": { "type": "string", "pattern": "^custom:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspaceRole": { "type": "string", "enum": [ "viewer", "editor", "admin" ] } }, "required": [ "org", "email", "role" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "invitationId": { "type": "string" }, "token": { "type": "string" }, "expiresAt": { "type": "string" } }, "required": [ "invitationId", "token", "expiresAt" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.member.leave": { "post": { "operationId": "tenancy.member.leave", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.member.leave. Audit event: tenancy.member_removed.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.member.list": { "post": { "operationId": "tenancy.member.list", "tags": [ "tenancy" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: tenancy.member.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "members": { "type": "array", "items": { "type": "object", "properties": { "userId": { "type": "string" }, "email": { "type": "string" }, "displayName": { "type": "string" }, "role": { "type": "string", "enum": [ "viewer", "member", "admin", "owner" ] }, "roleKey": { "type": [ "string", "null" ] } }, "required": [ "userId", "email", "displayName", "role", "roleKey" ], "additionalProperties": false } } }, "required": [ "members" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.member.remove": { "post": { "operationId": "tenancy.member.remove", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.member.manage. Audit event: tenancy.member_removed.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "userId": { "type": "string" } }, "required": [ "org", "userId" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.org.create": { "post": { "operationId": "tenancy.org.create", "tags": [ "tenancy" ], "summary": "write procedure on the user scope", "description": "Kind: write. Scope: user. Permission: none. Audit event: tenancy.organization_created.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "slug": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "workspace": { "type": "object", "properties": { "slug": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "name": { "type": "string", "minLength": 1, "maxLength": 120 } }, "required": [ "slug", "name" ] } }, "required": [ "slug", "name" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "orgId": { "type": "string" }, "slug": { "type": "string" }, "workspaceSlug": { "type": "string" } }, "required": [ "orgId", "slug", "workspaceSlug" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.org.get": { "post": { "operationId": "tenancy.org.get", "tags": [ "tenancy" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: tenancy.org.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "orgId": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "string" }, "branding": { "anyOf": [ {}, { "type": "null" } ] }, "settings": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "orgId", "slug", "name", "status", "branding", "settings", "version" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.org.update": { "post": { "operationId": "tenancy.org.update", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.org.update. Audit event: tenancy.organization_updated.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "settings": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "expectedVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "slug": { "type": "string" } }, "required": [ "org", "expectedVersion" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "orgId": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, "settings": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "orgId", "slug", "name", "settings", "version" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.project.archive": { "post": { "operationId": "tenancy.project.archive", "tags": [ "tenancy" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: tenancy.project.manage. Audit event: tenancy.project_archived.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "expectedVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "org", "workspace", "project", "expectedVersion" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "projectId": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "moduleKey": { "type": "string" }, "archived": { "type": "boolean" }, "visibility": { "type": "string", "enum": [ "workspace", "restricted" ] }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "updatedAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "topic": { "type": "object", "properties": { "ws": { "type": "string" }, "project": { "type": "string" } }, "required": [ "ws", "project" ], "additionalProperties": false } }, "required": [ "projectId", "slug", "name", "description", "moduleKey", "archived", "visibility", "version", "updatedAt", "topic" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.project.create": { "post": { "operationId": "tenancy.project.create", "tags": [ "tenancy" ], "summary": "write procedure on the workspace scope", "description": "Kind: write. Scope: workspace. Permission: tenancy.project.manage. Audit event: tenancy.project_created.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "slug": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "moduleKey": { "type": "string", "minLength": 1, "maxLength": 64 }, "visibility": { "type": "string", "enum": [ "workspace", "restricted" ] }, "description": { "type": "string", "maxLength": 4000 } }, "required": [ "org", "workspace", "slug", "name", "moduleKey" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "projectId": { "type": "string" }, "slug": { "type": "string" }, "topic": { "type": "object", "properties": { "ws": { "type": "string" }, "project": { "type": "string" } }, "required": [ "ws", "project" ], "additionalProperties": false } }, "required": [ "projectId", "slug", "topic" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.project.get": { "post": { "operationId": "tenancy.project.get", "tags": [ "tenancy" ], "summary": "read procedure on the project scope", "description": "Kind: read. Scope: project. Permission: tenancy.project.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org", "workspace", "project" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "projectId": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "moduleKey": { "type": "string" }, "archived": { "type": "boolean" }, "visibility": { "type": "string", "enum": [ "workspace", "restricted" ] }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "updatedAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "topic": { "type": "object", "properties": { "ws": { "type": "string" }, "project": { "type": "string" } }, "required": [ "ws", "project" ], "additionalProperties": false } }, "required": [ "projectId", "slug", "name", "description", "moduleKey", "archived", "visibility", "version", "updatedAt", "topic" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.project.list": { "post": { "operationId": "tenancy.project.list", "tags": [ "tenancy" ], "summary": "read procedure on the workspace scope", "description": "Kind: read. Scope: workspace. Permission: tenancy.project.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "sort": { "type": "string", "enum": [ "updatedAt", "name", "slug" ] }, "direction": { "type": "string", "enum": [ "asc", "desc" ] } }, "required": [ "org", "workspace" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "projects": { "type": "array", "items": { "type": "object", "properties": { "projectId": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "moduleKey": { "type": "string" }, "archived": { "type": "boolean" }, "visibility": { "type": "string", "enum": [ "workspace", "restricted" ] }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "updatedAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "topic": { "type": "object", "properties": { "ws": { "type": "string" }, "project": { "type": "string" } }, "required": [ "ws", "project" ], "additionalProperties": false } }, "required": [ "projectId", "slug", "name", "description", "moduleKey", "archived", "visibility", "version", "updatedAt", "topic" ], "additionalProperties": false } } }, "required": [ "projects" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.project.set-member": { "post": { "operationId": "tenancy.project.set-member", "tags": [ "tenancy" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: tenancy.project-member.manage. Audit event: tenancy.project_member_set.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "userId": { "type": "string" }, "roleKey": { "anyOf": [ { "type": "string", "pattern": "^(?:viewer|editor|admin|owner|custom:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$" }, { "type": "null" } ] } }, "required": [ "org", "workspace", "project", "userId", "roleKey" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.project.unarchive": { "post": { "operationId": "tenancy.project.unarchive", "tags": [ "tenancy" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: tenancy.project.manage. Audit event: tenancy.project_unarchived.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "expectedVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "org", "workspace", "project", "expectedVersion" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "projectId": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "moduleKey": { "type": "string" }, "archived": { "type": "boolean" }, "visibility": { "type": "string", "enum": [ "workspace", "restricted" ] }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "updatedAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "topic": { "type": "object", "properties": { "ws": { "type": "string" }, "project": { "type": "string" } }, "required": [ "ws", "project" ], "additionalProperties": false } }, "required": [ "projectId", "slug", "name", "description", "moduleKey", "archived", "visibility", "version", "updatedAt", "topic" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.project.update": { "post": { "operationId": "tenancy.project.update", "tags": [ "tenancy" ], "summary": "write procedure on the project scope", "description": "Kind: write. Scope: project. Permission: tenancy.project.manage. Audit event: tenancy.project_updated.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "project": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "expectedVersion": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "description": { "anyOf": [ { "type": "string", "maxLength": 4000 }, { "type": "null" } ] }, "slug": { "type": "string" } }, "required": [ "org", "workspace", "project", "expectedVersion" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "projectId": { "type": "string" }, "slug": { "type": "string" }, "name": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "moduleKey": { "type": "string" }, "archived": { "type": "boolean" }, "visibility": { "type": "string", "enum": [ "workspace", "restricted" ] }, "version": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "updatedAt": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" }, "topic": { "type": "object", "properties": { "ws": { "type": "string" }, "project": { "type": "string" } }, "required": [ "ws", "project" ], "additionalProperties": false } }, "required": [ "projectId", "slug", "name", "description", "moduleKey", "archived", "visibility", "version", "updatedAt", "topic" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.role.create": { "post": { "operationId": "tenancy.role.create", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.role.manage. Audit event: tenancy.role_created.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "level": { "type": "string", "enum": [ "org", "workspace", "project" ] }, "permissions": { "maxItems": 1000, "type": "array", "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*\\.[a-z][a-z0-9-]*\\.[a-z][a-z0-9-]*$" } } }, "required": [ "org", "name", "level", "permissions" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "key": { "type": "string" }, "name": { "type": "string" }, "level": { "type": "string", "enum": [ "org", "workspace", "project" ] }, "builtIn": { "type": "boolean" }, "permissions": { "type": "array", "items": { "type": "string" } }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "newPermissions": { "type": "array", "items": { "type": "string" } } }, "required": [ "key", "name", "level", "builtIn", "permissions", "revision", "newPermissions" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.role.delete": { "post": { "operationId": "tenancy.role.delete", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.role.manage. Audit event: tenancy.role_deleted.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "key": { "type": "string", "pattern": "^custom:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }, "reassignTo": { "type": "string", "pattern": "^(?:viewer|editor|admin|owner|custom:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$" } }, "required": [ "org", "key", "reassignTo" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": {}, "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.role.get": { "post": { "operationId": "tenancy.role.get", "tags": [ "tenancy" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: tenancy.role.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "key": { "type": "string", "pattern": "^(?:viewer|editor|admin|owner|custom:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$" } }, "required": [ "org", "key" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "key": { "type": "string" }, "name": { "type": "string" }, "level": { "type": "string", "enum": [ "org", "workspace", "project" ] }, "builtIn": { "type": "boolean" }, "permissions": { "type": "array", "items": { "type": "string" } }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "newPermissions": { "type": "array", "items": { "type": "string" } } }, "required": [ "key", "name", "level", "builtIn", "permissions", "revision", "newPermissions" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.role.list": { "post": { "operationId": "tenancy.role.list", "tags": [ "tenancy" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: tenancy.role.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "builtIn": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "name": { "type": "string" }, "level": { "type": "string", "enum": [ "org", "workspace", "project" ] }, "builtIn": { "type": "boolean" }, "permissions": { "type": "array", "items": { "type": "string" } }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "newPermissions": { "type": "array", "items": { "type": "string" } } }, "required": [ "key", "name", "level", "builtIn", "permissions", "revision", "newPermissions" ], "additionalProperties": false } }, "custom": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "name": { "type": "string" }, "level": { "type": "string", "enum": [ "org", "workspace", "project" ] }, "builtIn": { "type": "boolean" }, "permissions": { "type": "array", "items": { "type": "string" } }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "newPermissions": { "type": "array", "items": { "type": "string" } } }, "required": [ "key", "name", "level", "builtIn", "permissions", "revision", "newPermissions" ], "additionalProperties": false } }, "declarations": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string" }, "role": { "type": "string", "enum": [ "viewer", "editor", "admin", "owner" ] }, "label": { "type": "string" }, "sensitive": { "type": "boolean" }, "reserved": { "type": "boolean" }, "agent": { "type": "boolean" } }, "required": [ "key", "role" ], "additionalProperties": false } } }, "required": [ "builtIn", "custom", "declarations" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.role.update": { "post": { "operationId": "tenancy.role.update", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.role.manage. Audit event: tenancy.role_updated.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "key": { "type": "string", "pattern": "^custom:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }, "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "permissions": { "maxItems": 1000, "type": "array", "items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*\\.[a-z][a-z0-9-]*\\.[a-z][a-z0-9-]*$" } }, "revision": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } }, "required": [ "org", "key", "revision" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "key": { "type": "string" }, "name": { "type": "string" }, "level": { "type": "string", "enum": [ "org", "workspace", "project" ] }, "builtIn": { "type": "boolean" }, "permissions": { "type": "array", "items": { "type": "string" } }, "revision": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "newPermissions": { "type": "array", "items": { "type": "string" } } }, "required": [ "key", "name", "level", "builtIn", "permissions", "revision", "newPermissions" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.workspace.create": { "post": { "operationId": "tenancy.workspace.create", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.workspace.manage. Audit event: tenancy.workspace_created.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "slug": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "visibility": { "type": "string", "enum": [ "org", "restricted" ] } }, "required": [ "org", "slug", "name", "visibility" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "workspaceId": { "type": "string" }, "slug": { "type": "string" } }, "required": [ "workspaceId", "slug" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.workspace.list": { "post": { "operationId": "tenancy.workspace.list", "tags": [ "tenancy" ], "summary": "read procedure on the org scope", "description": "Kind: read. Scope: org. Permission: tenancy.workspace.read.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" } }, "required": [ "org" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "workspaces": { "type": "array", "items": { "type": "object", "properties": { "slug": { "type": "string" }, "name": { "type": "string" }, "isDefault": { "type": "boolean" }, "visibility": { "type": "string", "enum": [ "org", "restricted" ] } }, "required": [ "slug", "name", "isDefault", "visibility" ], "additionalProperties": false } } }, "required": [ "workspaces" ], "additionalProperties": false } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } }, "/api/v1/tenancy.workspace.set-member": { "post": { "operationId": "tenancy.workspace.set-member", "tags": [ "tenancy" ], "summary": "write procedure on the org scope", "description": "Kind: write. Scope: org. Permission: tenancy.workspace.manage. Audit event: tenancy.workspace_member_set.", "security": [ { "session": [] }, { "bearer": [] }, { "apiKey": [] } ], "parameters": [ { "name": "X-CSRF-Token", "in": "header", "required": false, "schema": { "type": "string" }, "description": "Required when the credential is the session cookie; not used by bearer or API-key callers." } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "org": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "workspace": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,46}[a-z0-9])?$" }, "userId": { "type": "string" }, "role": { "type": "string", "enum": [ "viewer", "editor", "admin" ] } }, "required": [ "org", "workspace", "userId", "role" ] } } } }, "responses": { "200": { "description": "The procedure's output.", "content": { "application/json": { "schema": { "$schema": "https://json-schema.org/draft/2020-12/schema" } } } }, "400": { "description": "The request could not be read.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "401": { "description": "No credential, or one that is no longer valid.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "404": { "description": "No such procedure in this scope: another tenant's ids answer the same way as a missing permission.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "409": { "description": "A conflict, such as a taken slug or a stale version.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "413": { "description": "The request body is larger than 1048576 bytes.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "422": { "description": "The input does not match the procedure's schema.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } }, "429": { "description": "Rate limited; Retry-After says when.", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/Problem" } } } } } } } }, "components": { "schemas": { "Problem": { "type": "object", "required": [ "type", "title", "status", "code" ], "properties": { "type": { "type": "string", "description": "An app-relative URI reference, /problems/." }, "title": { "type": "string" }, "status": { "type": "integer" }, "code": { "type": "string" }, "detail": { "type": "string" }, "errors": { "type": "array", "items": { "type": "object", "required": [ "path", "message" ], "properties": { "path": { "type": "string" }, "message": { "type": "string" } } } }, "retryAfter": { "type": "integer", "description": "Seconds, for 429 and 503." } } } }, "securitySchemes": { "session": { "type": "apiKey", "in": "cookie", "name": "conusai_session", "description": "The sealed session cookie a browser holds." }, "bearer": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "An OIDC access token for this app's audience." }, "apiKey": { "type": "http", "scheme": "bearer", "description": "An organization API key, cak__." } } } }