{"info":{"title":"Counted API","version":"1","description":"Manage workspaces, projects, dashboards, insights, and monitors. Query your events through the same API used by the Counted app. Use a service key for integrations, or open the API Explorer in the app to send requests with your signed-in account."},"servers":[{"url":"https://api.counted.dev"}],"tags":[{"name":"account","description":"Who the caller is."},{"name":"workspaces","description":"The billing and membership boundary."},{"name":"members","description":"Workspace members and their roles."},{"name":"projects","description":"Where events land, claimed or not."},{"name":"credentials","description":"API keys, their issuance and rotation."},{"name":"events","description":"Durable event ingestion and per-event receipts."},{"name":"dashboards","description":"Dashboards, their readouts and share links."},{"name":"insights","description":"The analyses presented on a dashboard."},{"name":"monitors","description":"Scalar questions watched against a threshold."},{"name":"queries","description":"Running a question directly."},{"name":"share","description":"Public, read-only dashboard links."},{"name":"billing","description":"Plans, checkout and the billing portal."}],"paths":{"/v1/events":{"post":{"operationId":"events.ingest","tags":["events"],"summary":"Ingest events","description":"Write a batch to the credential’s project. A 202 is returned after group commit is durable; inspect rejected and outcomes because valid events may be accepted alongside invalid ones. Use a project ingest key, or a project-bound service key with events:write. Console sessions and workspace-wide keys cannot ingest. Default limits are 250 events and 1 MiB per batch. Keep idempotencyKey and occurredAt unchanged when retrying. The beacon query-key option supports clients that cannot set Authorization headers.","security":[{"ingestKey":[]},{"serviceKey":[]},{"ingestBeacon":[]}],"x-counted-transport":"group-commit","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestRequest"},"example":{"events":[{"name":"page_view","visitId":"ephemeral-visit","properties":{"url":"/pricing","source":"docs"}}]}}}},"responses":{"202":{"description":"The receipt follows a durable commit. Accepted plus deduplicated plus rejected equals the submitted event count.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestReceipt"},"examples":{"accepted":{"summary":"All events stored","value":{"accepted":2,"deduplicated":0,"rejected":0}},"retry":{"summary":"A previously committed event","value":{"accepted":0,"deduplicated":1,"rejected":0}},"partial":{"summary":"One invalid event","value":{"accepted":1,"deduplicated":0,"rejected":1,"outcomes":[{"index":1,"accepted":false,"reason":"MalformedEvent"}]}}}}}},"400":{"description":"The body must be JSON with an events array.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestFailure"},"example":{"code":"BAD_REQUEST","detail":"The body must be JSON with an events array.","retryable":false}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestFailure"},"example":{"code":"UNAUTHORIZED","detail":"No usable credential was presented.","retryable":false}}}},"402":{"description":"The workspace event quota refuses further ingestion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestFailure"},"example":{"code":"PAYMENT_REQUIRED","detail":"The workspace event quota refuses further ingestion.","retryable":false,"reason":"PlanExceeded"}}}},"403":{"description":"This credential cannot write events to a project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestFailure"},"example":{"code":"FORBIDDEN","detail":"This credential cannot write events to a project.","retryable":false,"reason":"NotPermitted"}}}},"404":{"description":"No such project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestFailure"},"example":{"code":"NOT_FOUND","detail":"No such project.","retryable":false}}}},"413":{"description":"The event count or body size exceeds the configured limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestFailure"},"example":{"code":"PAYLOAD_TOO_LARGE","detail":"The event count or body size exceeds the configured limit.","retryable":false}}}},"429":{"description":"Too many requests. Back off before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestFailure"},"example":{"code":"TOO_MANY_REQUESTS","detail":"Too many requests. Back off before retrying.","retryable":true,"reason":"RateLimited"}}},"headers":{"Retry-After":{"description":"Minimum seconds to wait before retrying.","schema":{"type":"string","pattern":"^[0-9]+$"}}}},"503":{"description":"The event store is unavailable. Retry with the same event keys and timestamps.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestFailure"},"example":{"code":"SERVICE_UNAVAILABLE","detail":"The event store is unavailable. Retry with the same event keys and timestamps.","retryable":true,"reason":"SinkUnavailable"}}}}}}},"/v1/me":{"get":{"operationId":"account.me","summary":"Read the calling account","description":"A service key answers as the account that issued it, which is what makes an audit trail possible without a session.","tags":["account"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/Account"},"workspaces":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceSummary"}}},"required":["account","workspaces"],"additionalProperties":false}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such account.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"account"}}},"/v1/workspaces":{"get":{"operationId":"workspaces.list","summary":"List the workspaces this credential reaches","description":"A console session lists every workspace the account belongs to. A service key lists the one workspace it was issued in.","tags":["workspaces"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceSummary"}}},"required":["items"],"additionalProperties":false}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"principal","permission":"workspace:read"}},"post":{"operationId":"workspaces.create","summary":"Create a workspace","description":"Requires an authenticated account and no permission: there is no workspace yet to hold one in.","tags":["workspaces"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"$ref":"#/components/schemas/Workspace"}},"required":["workspace"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The workspace is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"account"}}},"/v1/workspaces/{workspaceId}":{"get":{"operationId":"workspaces.get","summary":"Read a workspace","tags":["workspaces"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"$ref":"#/components/schemas/Workspace"}},"required":["workspace"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The workspace is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"workspace:read","resource":"workspace","param":"workspaceId"}},"patch":{"operationId":"workspaces.rename","summary":"Rename a workspace","tags":["workspaces"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"$ref":"#/components/schemas/Workspace"}},"required":["workspace"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The workspace is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"workspace:admin","resource":"workspace","param":"workspaceId"}}},"/v1/workspaces/{workspaceId}/members":{"get":{"operationId":"workspaces.members","summary":"List workspace members","description":"Read-only. Membership is written through the auth provider's own endpoints, not here — one table, one writer.","tags":["members"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Member"}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The workspace is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"workspace:read","resource":"workspace","param":"workspaceId"}}},"/v1/workspaces/{workspaceId}/usage":{"get":{"operationId":"workspaces.usage","summary":"Read this period's usage against the plan","tags":["workspaces"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"usage":{"$ref":"#/components/schemas/Usage"}},"required":["usage"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The workspace is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"workspace:read","resource":"workspace","param":"workspaceId"}}},"/v1/workspaces/{workspaceId}/members/{accountId}/role":{"put":{"operationId":"workspaces.changeRole","summary":"Change a member's role","description":"The last owner cannot be demoted; the refusal is `LastOwner`, not a 500 from a foreign key.","tags":["members"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}},{"in":"path","required":true,"name":"accountId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Account id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member"],"description":"A workspace role."}},"required":["role"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"$ref":"#/components/schemas/Member"}},"required":["member"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The workspace is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"workspace:admin","resource":"workspace","param":"workspaceId"}}},"/v1/workspaces/{workspaceId}/members/{accountId}":{"delete":{"operationId":"workspaces.removeMember","summary":"Remove a member","tags":["members"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}},{"in":"path","required":true,"name":"accountId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Account id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"boolean","const":true},"account":{"type":"string","minLength":1,"maxLength":128,"description":"Account id."}},"required":["removed","account"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The workspace is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"workspace:admin","resource":"workspace","param":"workspaceId"}}},"/v1/workspaces/{workspaceId}/leave":{"post":{"operationId":"workspaces.leave","summary":"Leave a workspace","description":"Removes only the calling account. A workspace's last owner must transfer ownership first.","tags":["members"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"left":{"type":"boolean","const":true}},"required":["left"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The workspace is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"workspace:read","resource":"workspace","param":"workspaceId"}}},"/v1/workspaces/{workspaceId}/projects":{"get":{"operationId":"projects.list","summary":"List a workspace's projects","tags":["projects"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}},{"in":"query","name":"includeArchived","schema":{"description":"Query parameters arrive as strings; `true` and `1` both mean yes.","type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ProjectSummary"}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow another project.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The project is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"projects:read","resource":"workspace","param":"workspaceId"}},"post":{"operationId":"projects.create","summary":"Create a project","description":"Returns the project and its initial ingest key. Copy credential.secret now; it is returned only once. This key can send events to this project, not read analytics or manage resources.","tags":["projects"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"},"credential":{"$ref":"#/components/schemas/IssuedCredential"}},"required":["project","credential"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow another project.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The project is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"projects:write","resource":"workspace","param":"workspaceId"}}},"/v1/projects/{projectId}":{"get":{"operationId":"projects.get","summary":"Read a project","tags":["projects"],"parameters":[{"in":"path","required":true,"name":"projectId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow another project.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The project is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"projects:read","resource":"project","param":"projectId"}},"patch":{"operationId":"projects.rename","summary":"Rename a project","tags":["projects"],"parameters":[{"in":"path","required":true,"name":"projectId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow another project.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The project is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"projects:write","resource":"project","param":"projectId"}},"delete":{"operationId":"projects.delete","summary":"Delete a project and its events","description":"Irreversible, and owner-only: `projects:delete` is a separate permission from `projects:write`, because deletion and renaming are not the same authority.","tags":["projects"],"parameters":[{"in":"path","required":true,"name":"projectId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"project":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}},"required":["deleted","project"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow another project.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The project is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"projects:delete","resource":"project","param":"projectId"}}},"/v1/projects/{projectId}/archive":{"post":{"operationId":"projects.archive","summary":"Archive a project","description":"Archiving stops ingest and frees the project's slot against the plan's cap. Events are kept until retention expires them.","tags":["projects"],"parameters":[{"in":"path","required":true,"name":"projectId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow another project.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The project is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"projects:write","resource":"project","param":"projectId"}}},"/v1/projects/{projectId}/restore":{"post":{"operationId":"projects.restore","summary":"Restore an archived project","description":"Re-checks the plan's project cap: archive-then-restore would otherwise be a way past it.","tags":["projects"],"parameters":[{"in":"path","required":true,"name":"projectId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow another project.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The project is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"projects:write","resource":"project","param":"projectId"}}},"/v1/projects/{projectId}/retention":{"put":{"operationId":"projects.setRetention","summary":"Set how long this project's events are kept","tags":["projects"],"parameters":[{"in":"path","required":true,"name":"projectId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"retention":{"$ref":"#/components/schemas/RetentionPolicyInput"}},"required":["retention"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow another project.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The project is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"projects:write","resource":"project","param":"projectId"}}},"/v1/projects/provision":{"post":{"operationId":"projects.provision","summary":"Provision an unclaimed project","description":"Takes no credential. Returns a project with no workspace, an ingest key that works immediately, and a claim grant. This is the whole of the no-signup path; send events first and decide about an account later.","tags":["projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"},"credential":{"$ref":"#/components/schemas/IssuedCredential"},"claim":{"$ref":"#/components/schemas/ClaimGrant"}},"required":["project","credential","claim"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[],"x-counted-authorization":{"kind":"anonymous"}}},"/v1/projects/{projectId}/claim":{"post":{"operationId":"projects.claim","summary":"Claim a provisioned project into a workspace","description":"Callable with a service key, which is what closes the agent path. The authorization is on the destination workspace: the claim grant proves the caller provisioned the project, and `projects:write` proves they may put a project in that workspace.","tags":["projects"],"parameters":[{"in":"path","required":true,"name":"projectId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."},"claimToken":{"type":"string","minLength":1}},"required":["workspaceId","claimToken"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}},"required":["project"],"additionalProperties":false}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"402":{"description":"The workspace plan does not allow another project.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PaymentRequired2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The claim was refused.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The project has already been claimed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"410":{"description":"The claim grant has expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Gone"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"projects:write","resource":"workspace","param":"workspaceId"}}},"/v1/projects/{projectId}/credentials":{"get":{"operationId":"credentials.list","summary":"List a project's API keys","description":"Includes revoked keys: an audit needs them. Each entry carries its derived status, so nothing downstream recomputes expiry.","tags":["credentials"],"parameters":[{"in":"path","required":true,"name":"projectId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Credential"}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential may not be issued.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The credential is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"410":{"description":"The credential is no longer usable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Gone2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"credentials:read","resource":"project","param":"projectId"}},"post":{"operationId":"credentials.issue","summary":"Issue an API key","description":"The secret is in the response and nowhere else. `permissions` is a request for a ceiling, not a grant: the issued set is the intersection with what the issuer holds, and asking for more than that is refused rather than quietly trimmed.","tags":["credentials"],"parameters":[{"in":"path","required":true,"name":"projectId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["ingest","service"]},"name":{"type":"string","minLength":1,"maxLength":200},"permissions":{"type":"array","items":{"type":"string","enum":["events:write","queries:run","projects:read","projects:write","projects:delete","dashboards:read","dashboards:write","monitors:read","monitors:write","credentials:read","credentials:write","workspace:read","workspace:admin","billing:read","billing:write"],"description":"A permission."}},"expiresInMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A length of time in milliseconds."}},"required":["kind","name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"issued":{"$ref":"#/components/schemas/IssuedCredential"}},"required":["issued"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential may not be issued.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The credential is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"410":{"description":"The credential is no longer usable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Gone2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"credentials:write","resource":"project","param":"projectId"}}},"/v1/projects/{projectId}/credentials/{credentialId}/rotate":{"post":{"operationId":"credentials.rotate","summary":"Rotate an API key with an overlap window","description":"Creates a replacement and gives the old key a short expiry rather than killing it, so a deploy can roll without dropping events. The window defaults to 24 hours and is clamped to 7 days.","tags":["credentials"],"parameters":[{"in":"path","required":true,"name":"projectId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}},{"in":"path","required":true,"name":"credentialId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Credential id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"overlapMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A length of time in milliseconds."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"rotated":{"$ref":"#/components/schemas/RotatedCredential"}},"required":["rotated"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential may not be issued.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The credential is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"410":{"description":"The credential is no longer usable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Gone2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"credentials:write","resource":"project","param":"projectId"}}},"/v1/projects/{projectId}/credentials/{credentialId}":{"delete":{"operationId":"credentials.revoke","summary":"Revoke an API key","description":"Refused with `LastIngestCredential` if it would leave the project unable to receive events. A key inside a rotation's grace window counts as cover, so the leaked half of a rotation can still be killed.","tags":["credentials"],"parameters":[{"in":"path","required":true,"name":"projectId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}},{"in":"path","required":true,"name":"credentialId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Credential id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"type":"boolean","const":true},"credential":{"type":"string","minLength":1,"maxLength":128,"description":"Credential id."}},"required":["revoked","credential"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential may not be issued.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The credential is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"410":{"description":"The credential is no longer usable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Gone2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"credentials:write","resource":"project","param":"projectId"}}},"/v1/me/credential":{"get":{"operationId":"credentials.self","summary":"Describe the calling credential","description":"Reachable by any live key, including an ingest key, which holds no permission that would let it read anything else. This is how a freshly provisioned agent discovers its project id.","tags":["credentials"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"credential":{"$ref":"#/components/schemas/CredentialIdentity"}},"required":["credential"],"additionalProperties":false}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"ingestKey":[]}],"x-counted-authorization":{"kind":"credential"}}},"/v1/workspaces/{workspaceId}/credentials":{"post":{"operationId":"credentials.issueForWorkspace","summary":"Issue a workspace-wide service key","description":"A service key that reaches every project in the workspace, and the workspace itself — which is what a key needs in order to claim a provisioned project. Ingest keys are always project-bound and cannot be issued here. The secret is in the response and nowhere else.","tags":["credentials"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"permissions":{"type":"array","items":{"type":"string","enum":["events:write","queries:run","projects:read","projects:write","projects:delete","dashboards:read","dashboards:write","monitors:read","monitors:write","credentials:read","credentials:write","workspace:read","workspace:admin","billing:read","billing:write"],"description":"A permission."}},"expiresInMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A length of time in milliseconds."}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"issued":{"$ref":"#/components/schemas/IssuedCredential"}},"required":["issued"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential may not be issued.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The credential is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"410":{"description":"The credential is no longer usable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Gone2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"credentials:write","resource":"workspace","param":"workspaceId"}},"get":{"operationId":"credentials.listForWorkspace","summary":"List every API key in a workspace","description":"Includes each project's keys and the workspace-wide ones, including revoked keys. grantablePermissions describes the service-key permissions the caller may delegate. A project-scoped listing does not expose workspace-wide keys.","tags":["credentials"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Credential"}},"grantablePermissions":{"type":"array","items":{"type":"string","enum":["events:write","queries:run","projects:read","projects:write","projects:delete","dashboards:read","dashboards:write","monitors:read","monitors:write","credentials:read","credentials:write","workspace:read","workspace:admin","billing:read","billing:write"],"description":"A permission."}}},"required":["items","grantablePermissions"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential may not be issued.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The credential is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"410":{"description":"The credential is no longer usable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Gone2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"credentials:read","resource":"workspace","param":"workspaceId"}}},"/v1/workspaces/{workspaceId}/credentials/{credentialId}/rotate":{"post":{"operationId":"credentials.rotateForWorkspace","summary":"Rotate a workspace service key","description":"Preserves the key's permissions. The caller must hold all of them. The old key expires after the overlap window (24 hours by default, at most 7 days). Project-bound keys must use the project route.","tags":["credentials"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}},{"in":"path","required":true,"name":"credentialId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Credential id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"overlapMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A length of time in milliseconds."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"rotated":{"$ref":"#/components/schemas/RotatedCredential"}},"required":["rotated"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential may not be issued.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The credential is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"410":{"description":"The credential is no longer usable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Gone2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"credentials:write","resource":"workspace","param":"workspaceId"}}},"/v1/workspaces/{workspaceId}/credentials/{credentialId}":{"delete":{"operationId":"credentials.revokeForWorkspace","summary":"Revoke a workspace service key","description":"Immediately stops a workspace-wide service key. Project-bound keys must use the project route.","tags":["credentials"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}},{"in":"path","required":true,"name":"credentialId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Credential id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"type":"boolean","const":true},"credential":{"type":"string","minLength":1,"maxLength":128,"description":"Credential id."}},"required":["revoked","credential"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential may not be issued.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The credential is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"410":{"description":"The credential is no longer usable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Gone2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"credentials:write","resource":"workspace","param":"workspaceId"}}},"/v1/workspaces/{workspaceId}/dashboards":{"get":{"operationId":"dashboards.list","summary":"List a workspace's dashboards","tags":["dashboards"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DashboardSummary"}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The dashboard is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"dashboards:read","resource":"workspace","param":"workspaceId"}},"post":{"operationId":"dashboards.create","summary":"Create a dashboard","tags":["dashboards"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dashboard":{"$ref":"#/components/schemas/Dashboard"}},"required":["dashboard"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The dashboard is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"dashboards:write","resource":"workspace","param":"workspaceId"}}},"/v1/dashboards/{dashboardId}":{"get":{"operationId":"dashboards.get","summary":"Read a dashboard and its insights","tags":["dashboards"],"parameters":[{"in":"path","required":true,"name":"dashboardId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dashboard":{"$ref":"#/components/schemas/Dashboard"}},"required":["dashboard"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The dashboard is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"dashboards:read","resource":"dashboard","param":"dashboardId"}},"patch":{"operationId":"dashboards.rename","summary":"Rename a dashboard","tags":["dashboards"],"parameters":[{"in":"path","required":true,"name":"dashboardId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dashboard":{"$ref":"#/components/schemas/Dashboard"}},"required":["dashboard"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The dashboard is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"dashboards:write","resource":"dashboard","param":"dashboardId"}},"delete":{"operationId":"dashboards.delete","summary":"Delete a dashboard","tags":["dashboards"],"parameters":[{"in":"path","required":true,"name":"dashboardId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"dashboard":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}},"required":["deleted","dashboard"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The dashboard is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"dashboards:write","resource":"dashboard","param":"dashboardId"}}},"/v1/dashboards/{dashboardId}/layout":{"put":{"operationId":"dashboards.layout","summary":"Arrange and resize the insights on a dashboard","description":"Replace every insight's grid position, width and height in one transaction. The complete layout must fit the twelve-column grid without overlaps. Repeating the same layout succeeds.","tags":["dashboards"],"parameters":[{"in":"path","required":true,"name":"dashboardId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"placements":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":11},"y":{"type":"integer","minimum":0,"maximum":1000},"height":{"type":"integer","minimum":3,"maximum":20},"id":{"type":"string","minLength":1,"maxLength":128,"description":"Tile id."},"width":{"type":"integer","minimum":1,"maximum":12}},"required":["x","y","height","id","width"]}}},"required":["placements"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dashboard":{"$ref":"#/components/schemas/Dashboard"}},"required":["dashboard"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The dashboard is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"dashboards:write","resource":"dashboard","param":"dashboardId"}}},"/v1/dashboards/{dashboardId}/default":{"put":{"operationId":"dashboards.setDefault","summary":"Make this the workspace's default dashboard","description":"Clears the flag on whichever dashboard held it. A workspace has at most one.","tags":["dashboards"],"parameters":[{"in":"path","required":true,"name":"dashboardId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dashboard":{"$ref":"#/components/schemas/Dashboard"}},"required":["dashboard"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The dashboard is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"dashboards:write","resource":"dashboard","param":"dashboardId"}}},"/v1/dashboards/{dashboardId}/readouts":{"post":{"operationId":"dashboards.readouts","summary":"Run every insight on a dashboard","description":"One outcome per insight. `window` rebases every insight's question onto a different interval, which is how a range picker works without an insight storing a second copy of its question.","tags":["dashboards"],"parameters":[{"in":"path","required":true,"name":"dashboardId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"window":{"$ref":"#/components/schemas/WindowInput"},"deadlineMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A length of time in milliseconds."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"readouts":{"type":"array","items":{"$ref":"#/components/schemas/Readout"}}},"required":["readouts"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The dashboard is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"queries:run","resource":"dashboard","param":"dashboardId"}}},"/v1/dashboards/{dashboardId}/share":{"post":{"operationId":"dashboards.share","summary":"Create a read-only share link","description":"The token is returned once. A share link reaches its own dashboard by identity and may run only the queries that dashboard's insights name — it is not a workspace-wide read token.","tags":["dashboards"],"parameters":[{"in":"path","required":true,"name":"dashboardId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expiresInMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A length of time in milliseconds."}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"link":{"$ref":"#/components/schemas/ShareLink"}},"required":["link"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The dashboard is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"dashboards:write","resource":"dashboard","param":"dashboardId"}},"delete":{"operationId":"dashboards.unshare","summary":"Revoke a share link","tags":["dashboards"],"parameters":[{"in":"path","required":true,"name":"dashboardId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dashboard":{"$ref":"#/components/schemas/Dashboard"}},"required":["dashboard"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The dashboard is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"dashboards:write","resource":"dashboard","param":"dashboardId"}}},"/v1/dashboards/{dashboardId}/tiles/{tileId}":{"get":{"operationId":"tiles.get","summary":"Read one insight","tags":["insights"],"parameters":[{"in":"path","required":true,"name":"dashboardId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}},{"in":"path","required":true,"name":"tileId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Tile id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"tile":{"$ref":"#/components/schemas/Tile"}},"required":["tile"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound6"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The insight is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict6"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot be answered.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"dashboards:read","resource":"dashboard","param":"dashboardId"}},"patch":{"operationId":"tiles.update","summary":"Change an insight's title, view or question","description":"Omitted fields are left alone. Width and position have their own routes.","tags":["insights"],"parameters":[{"in":"path","required":true,"name":"dashboardId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}},{"in":"path","required":true,"name":"tileId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Tile id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"analysis":{"$ref":"#/components/schemas/AnalysisInput"},"view":{"type":"string","enum":["number","line","bar","table","funnel","retention"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dashboard":{"$ref":"#/components/schemas/Dashboard"},"tile":{"$ref":"#/components/schemas/Tile"}},"required":["dashboard","tile"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound6"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The insight is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict6"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot be answered.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"dashboards:write","resource":"dashboard","param":"dashboardId"}},"delete":{"operationId":"tiles.remove","summary":"Remove an insight","tags":["insights"],"parameters":[{"in":"path","required":true,"name":"dashboardId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}},{"in":"path","required":true,"name":"tileId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Tile id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dashboard":{"$ref":"#/components/schemas/Dashboard"},"removed":{"type":"string","minLength":1,"maxLength":128,"description":"Tile id."}},"required":["dashboard","removed"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound6"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The insight is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict6"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot be answered.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"dashboards:write","resource":"dashboard","param":"dashboardId"}}},"/v1/dashboards/{dashboardId}/tiles":{"post":{"operationId":"tiles.add","summary":"Add an insight","description":"An insight names its own project, so one dashboard can show two products side by side. Refused with `TooManyTiles` at the limit, and the dashboard is left untouched.","tags":["insights"],"parameters":[{"in":"path","required":true,"name":"dashboardId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"project":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."},"analysis":{"$ref":"#/components/schemas/AnalysisInput"},"view":{"type":"string","enum":["number","line","bar","table","funnel","retention"]},"width":{"type":"integer","minimum":1,"maximum":12}},"required":["title","project","analysis","view","width"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dashboard":{"$ref":"#/components/schemas/Dashboard"},"tile":{"$ref":"#/components/schemas/Tile"}},"required":["dashboard","tile"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound6"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The insight is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict6"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot be answered.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"dashboards:write","resource":"dashboard","param":"dashboardId"}}},"/v1/dashboards/{dashboardId}/tiles/{tileId}/width":{"put":{"operationId":"tiles.resize","summary":"Set an insight's width","description":"Twelfths of a row, 1 to 12. The only width vocabulary there is.","tags":["insights"],"parameters":[{"in":"path","required":true,"name":"dashboardId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}},{"in":"path","required":true,"name":"tileId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Tile id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"width":{"type":"integer","minimum":1,"maximum":12}},"required":["width"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dashboard":{"$ref":"#/components/schemas/Dashboard"},"tile":{"$ref":"#/components/schemas/Tile"}},"required":["dashboard","tile"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound6"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The insight is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict6"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot be answered.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"dashboards:write","resource":"dashboard","param":"dashboardId"}}},"/v1/dashboards/{dashboardId}/tiles/{tileId}/position":{"put":{"operationId":"tiles.move","summary":"Move an insight to an index","tags":["insights"],"parameters":[{"in":"path","required":true,"name":"dashboardId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}},{"in":"path","required":true,"name":"tileId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Tile id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["index"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dashboard":{"$ref":"#/components/schemas/Dashboard"}},"required":["dashboard"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound6"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The insight is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict6"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot be answered.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"dashboards:write","resource":"dashboard","param":"dashboardId"}}},"/v1/dashboards/{dashboardId}/tile-order":{"put":{"operationId":"tiles.reorder","summary":"Replace the insight order","description":"The list must name every insight on the dashboard exactly once — a partial order is a lost insight.","tags":["insights"],"parameters":[{"in":"path","required":true,"name":"dashboardId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tiles":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"description":"Tile id."}}},"required":["tiles"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dashboard":{"$ref":"#/components/schemas/Dashboard"}},"required":["dashboard"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound6"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The insight is not in a state that allows this.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict6"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot be answered.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent2"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"dashboards:write","resource":"dashboard","param":"dashboardId"}}},"/v1/workspaces/{workspaceId}/monitors":{"get":{"operationId":"monitors.list","summary":"List a workspace's monitors","tags":["monitors"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Monitor"}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound7"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The monitor is already in that state.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict7"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot drive a monitor.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"monitors:read","resource":"workspace","param":"workspaceId"}}},"/v1/projects/{projectId}/monitors":{"get":{"operationId":"monitors.listForProject","summary":"List a project's monitors","tags":["monitors"],"parameters":[{"in":"path","required":true,"name":"projectId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Monitor"}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound7"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The monitor is already in that state.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict7"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot drive a monitor.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"monitors:read","resource":"project","param":"projectId"}},"post":{"operationId":"monitors.create","summary":"Create a monitor","description":"The analysis must produce one number. A series or a breakdown is refused with `AnalysisMustBeScalar` rather than being silently reduced to its first bucket.","tags":["monitors"],"parameters":[{"in":"path","required":true,"name":"projectId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"analysis":{"$ref":"#/components/schemas/AnalysisInput"},"threshold":{"$ref":"#/components/schemas/ThresholdInput"},"cooldownMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A length of time in milliseconds."},"channels":{"default":[],"type":"array","items":{"$ref":"#/components/schemas/ChannelInput"}}},"required":["name","analysis","threshold"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"monitor":{"$ref":"#/components/schemas/Monitor"}},"required":["monitor"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound7"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The monitor is already in that state.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict7"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot drive a monitor.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"monitors:write","resource":"project","param":"projectId"}}},"/v1/monitors/{monitorId}":{"get":{"operationId":"monitors.get","summary":"Read a monitor","tags":["monitors"],"parameters":[{"in":"path","required":true,"name":"monitorId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Monitor id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"monitor":{"$ref":"#/components/schemas/Monitor"}},"required":["monitor"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound7"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The monitor is already in that state.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict7"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot drive a monitor.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"monitors:read","resource":"monitor","param":"monitorId"}},"patch":{"operationId":"monitors.update","summary":"Change a monitor","description":"Changing `analysis` or `threshold` retargets the monitor and clears its breach state. Changing `cooldownMs` or `channels` does not — muting a channel must not re-announce a breach that was already reported.","tags":["monitors"],"parameters":[{"in":"path","required":true,"name":"monitorId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Monitor id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"analysis":{"$ref":"#/components/schemas/AnalysisInput"},"threshold":{"$ref":"#/components/schemas/ThresholdInput"},"cooldownMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A length of time in milliseconds."},"channels":{"type":"array","items":{"$ref":"#/components/schemas/ChannelInput"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"monitor":{"$ref":"#/components/schemas/Monitor"}},"required":["monitor"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound7"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The monitor is already in that state.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict7"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot drive a monitor.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"monitors:write","resource":"monitor","param":"monitorId"}},"delete":{"operationId":"monitors.delete","summary":"Delete a monitor","tags":["monitors"],"parameters":[{"in":"path","required":true,"name":"monitorId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Monitor id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"monitor":{"type":"string","minLength":1,"maxLength":128,"description":"Monitor id."}},"required":["deleted","monitor"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound7"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The monitor is already in that state.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict7"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot drive a monitor.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"monitors:write","resource":"monitor","param":"monitorId"}}},"/v1/monitors/{monitorId}/enable":{"post":{"operationId":"monitors.enable","summary":"Enable a monitor","tags":["monitors"],"parameters":[{"in":"path","required":true,"name":"monitorId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Monitor id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"monitor":{"$ref":"#/components/schemas/Monitor"}},"required":["monitor"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound7"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The monitor is already in that state.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict7"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot drive a monitor.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"monitors:write","resource":"monitor","param":"monitorId"}}},"/v1/monitors/{monitorId}/disable":{"post":{"operationId":"monitors.disable","summary":"Disable a monitor","tags":["monitors"],"parameters":[{"in":"path","required":true,"name":"monitorId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Monitor id."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"monitor":{"$ref":"#/components/schemas/Monitor"}},"required":["monitor"],"additionalProperties":false}}}},"400":{"description":"The request is malformed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadRequest5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound7"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"409":{"description":"The monitor is already in that state.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Conflict7"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot drive a monitor.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"monitors:write","resource":"monitor","param":"monitorId"}}},"/v1/workspaces/{workspaceId}/billing/plans":{"get":{"operationId":"billing.plans","summary":"List the plans this workspace can move to","tags":["billing"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Plan"}},"current":{"type":"string","enum":["free","pro"]},"pricing":{"type":"string","enum":["available","unavailable","unconfigured"]},"prices":{"type":"array","items":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro"]},"cadence":{"type":"string","enum":["monthly","annual"]},"amount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Base price in the provider's currency minor unit; the hosted checkout shows the final total."},"currency":{"type":"string"}},"required":["plan","cadence","amount","currency"],"additionalProperties":false}}},"required":["items","current","pricing","prices"],"additionalProperties":false}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound8"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"That plan cannot be selected.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"502":{"description":"The billing provider failed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadGateway"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"billing:read","resource":"workspace","param":"workspaceId"}}},"/v1/workspaces/{workspaceId}/subscription":{"get":{"operationId":"billing.subscription","summary":"Read the workspace's subscription","tags":["billing"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"subscription":{"$ref":"#/components/schemas/Subscription"},"billingAvailable":{"type":"boolean"},"details":{"anyOf":[{"type":"object","properties":{"cadence":{"anyOf":[{"type":"string","enum":["monthly","annual"]},{"type":"null"}]},"price":{"anyOf":[{"type":"object","properties":{"amount":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},{"type":"null"}]},"cancelAtPeriodEnd":{"type":"boolean"},"periodEndsAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},{"type":"null"}]}},"required":["cadence","price","cancelAtPeriodEnd","periodEndsAt"],"additionalProperties":false},{"type":"null"}]},"detailsUnavailable":{"type":"boolean"}},"required":["subscription","billingAvailable","details","detailsUnavailable"],"additionalProperties":false}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound8"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"That plan cannot be selected.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"502":{"description":"The billing provider failed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadGateway"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"billing:read","resource":"workspace","param":"workspaceId"}}},"/v1/workspaces/{workspaceId}/billing/checkout":{"post":{"operationId":"billing.checkout","summary":"Open a hosted checkout session","description":"Returns a URL to send the customer to. Counted never sees a card number, which is why there is no route that takes one.","tags":["billing"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro"]},"cadence":{"type":"string","enum":["monthly","annual"]},"successUrl":{"type":"string","format":"uri"},"cancelUrl":{"type":"string","format":"uri"}},"required":["plan","cadence","successUrl","cancelUrl"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/HostedSession"}},"required":["session"],"additionalProperties":false}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound8"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"That plan cannot be selected.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"502":{"description":"The billing provider failed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadGateway"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"billing:write","resource":"workspace","param":"workspaceId"}}},"/v1/workspaces/{workspaceId}/billing/portal":{"post":{"operationId":"billing.portal","summary":"Open the provider's billing portal","description":"Fails with `NoSubscription` when the workspace has never paid — there is no portal to open for a customer that does not exist yet.","tags":["billing"],"parameters":[{"in":"path","required":true,"name":"workspaceId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"returnUrl":{"type":"string","format":"uri"}},"required":["returnUrl"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"session":{"$ref":"#/components/schemas/HostedSession"}},"required":["session"],"additionalProperties":false}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound8"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"That plan cannot be selected.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent4"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"502":{"description":"The billing provider failed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/BadGateway"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"billing:write","resource":"workspace","param":"workspaceId"}}},"/v1/projects/{projectId}/queries":{"post":{"operationId":"queries.run","summary":"Run one analysis","description":"POST because the question is a document, not a query string. It has no side effects and may be retried.","tags":["queries"],"parameters":[{"in":"path","required":true,"name":"projectId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"analysis":{"$ref":"#/components/schemas/AnalysisInput"},"deadlineMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A length of time in milliseconds."},"asOf":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["analysis"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"readout":{"$ref":"#/components/schemas/AnsweredReadout"}},"required":["readout"],"additionalProperties":false}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound9"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot be answered.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"501":{"description":"Not available yet.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotImplemented"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"503":{"description":"The analytics engine is unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ServiceUnavailable"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"504":{"description":"The analytics engine did not answer in time.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayTimeout"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"queries:run","resource":"project","param":"projectId"}}},"/v1/projects/{projectId}/schema":{"get":{"operationId":"queries.schema","summary":"List the events, dimensions and measures this project carries","description":"A dimension's `status` distinguishes one that is indexed from one that is declared but not collected yet. Filtering on a `planned` dimension is refused rather than answered with an empty chart.","tags":["queries"],"parameters":[{"in":"path","required":true,"name":"projectId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"$ref":"#/components/schemas/ProjectSchema"}},"required":["schema"],"additionalProperties":false}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound9"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot be answered.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"501":{"description":"Not available yet.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotImplemented"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"503":{"description":"The analytics engine is unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ServiceUnavailable"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"504":{"description":"The analytics engine did not answer in time.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayTimeout"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"queries:run","resource":"project","param":"projectId"}}},"/v1/projects/{projectId}/dimensions/{dimension}/values":{"get":{"operationId":"queries.dimensionValues","summary":"List the values a dimension takes","description":"`limit` is required rather than defaulted server-side, because the number of values is the number of queries a breakdown over them will cost.","tags":["queries"],"parameters":[{"in":"path","required":true,"name":"projectId","schema":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}},{"in":"path","required":true,"name":"dimension","schema":{"type":"string","minLength":1}},{"in":"query","name":"limit","schema":{"type":"integer","minimum":1,"maximum":100},"allowEmptyValue":true,"allowReserved":true,"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"values":{"type":"array","items":{"type":"string"}}},"required":["values"],"additionalProperties":false}}}},"401":{"description":"No usable credential was presented.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Unauthorized"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"403":{"description":"The credential does not reach this resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Forbidden"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"404":{"description":"No such resource.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound9"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"422":{"description":"The analysis cannot be answered.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UnprocessableContent5"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"501":{"description":"Not available yet.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotImplemented"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"503":{"description":"The analytics engine is unavailable.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ServiceUnavailable"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"504":{"description":"The analytics engine did not answer in time.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayTimeout"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"serviceKey":[]},{"consoleSession":[]}],"x-counted-authorization":{"kind":"resource","permission":"queries:run","resource":"project","param":"projectId"}}},"/v1/shared/dashboard":{"get":{"operationId":"share.view","summary":"Read a shared dashboard","description":"The link reaches exactly the dashboard it was minted for, by identity. A token for one dashboard cannot read a sibling, even one in a project the link is allowed to query.","tags":["share"],"parameters":[{"in":"query","name":"shareToken","schema":{"type":"string","minLength":1,"description":"The token from the share URL."},"allowEmptyValue":true,"allowReserved":true,"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"dashboard":{"$ref":"#/components/schemas/Dashboard"}},"required":["dashboard"],"additionalProperties":false}}}},"404":{"description":"No such share link.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound10"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"410":{"description":"The share link has expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Gone3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"shareToken":[]}],"x-counted-authorization":{"kind":"share"}}},"/v1/shared/readouts":{"get":{"operationId":"share.readouts","summary":"Run every insight on a shared dashboard","description":"One outcome per insight, exactly as the authenticated route does. A share link may run the queries the page it shows needs, and no others.","tags":["share"],"parameters":[{"in":"query","name":"shareToken","schema":{"type":"string","minLength":1,"description":"The token from the share URL."},"allowEmptyValue":true,"allowReserved":true,"required":true},{"in":"query","name":"window","allowEmptyValue":true,"allowReserved":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WindowInput"}}}},{"in":"query","name":"deadlineMs","schema":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A length of time in milliseconds."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"readouts":{"type":"array","items":{"$ref":"#/components/schemas/Readout"}}},"required":["readouts"],"additionalProperties":false}}}},"404":{"description":"No such share link.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotFound10"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"410":{"description":"The share link has expired.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Gone3"},{"$ref":"#/components/schemas/UndefinedError"}]}}}},"429":{"description":"Too many requests.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TooManyRequests"},{"$ref":"#/components/schemas/UndefinedError"}]}}}}},"security":[{"shareToken":[]}],"x-counted-authorization":{"kind":"share"}}}},"components":{"securitySchemes":{"consoleSession":{"type":"apiKey","in":"cookie","name":"better-auth.session_token","description":"The console's session cookie, issued by the auth provider at sign-in. Browser callers send it automatically; it is not something to construct by hand."},"serviceKey":{"type":"http","scheme":"bearer","bearerFormat":"sk_...","description":"A service key. Its permissions are computed at issuance from the issuing member's role and can never exceed them."},"ingestKey":{"type":"http","scheme":"bearer","bearerFormat":"ck_...","description":"An ingest key. Holds exactly `events:write`, for one project, and is safe to ship inside an application."},"ingestBeacon":{"type":"apiKey","in":"query","name":"key","description":"A project ingest key in the query string, for sendBeacon and clients unable to set an Authorization header. Prefer bearer authentication when available."},"shareToken":{"type":"apiKey","in":"query","name":"shareToken","description":"A read-only share link's token. Reaches one dashboard, by identity, and may run only the queries that dashboard's insights name."}},"schemas":{"IngestEvent":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[^\\s\\u0000-\\u001f\\u007f]+$","description":"Your event name, such as page_view. The agent_ prefix uses the published agent vocabulary."},"visitId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^\\S+$","description":"An ephemeral activity grouping held in memory, with a fresh value after 30 minutes idle. Never a persistent user or device identifier."},"userId":{"description":"Optional customer-supplied opaque identifier from an explicit identify() call. Email addresses are refused. Omit for anonymous events.","anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}]},"occurredAt":{"description":"ISO-8601 UTC or epoch milliseconds. Omit to use receipt time. Default admission allows 30 days of age and five minutes of future clock skew.","anyOf":[{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"number"}]},{"type":"null"}]},"idempotencyKey":{"description":"A unique key for this event. Reuse the same key AND occurredAt when retrying. Without both, cross-request deduplication is not guaranteed.","type":["string","null"]},"properties":{"description":"Up to 64 flat custom properties. Strings, numbers, booleans and null are supported; nested objects and arrays are rejected. Do not send PII.","anyOf":[{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":1024},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},{"type":"null"}]},"systemProperties":{"description":"Optional system dimensions; strings are trimmed and capped at 128 characters. Country is derived at the edge and cannot be supplied here.","anyOf":[{"type":"object","properties":{"os_name":{"type":["string","null"]},"os_version":{"type":["string","null"]},"locale":{"type":["string","null"]},"app_version":{"type":["string","null"]},"device_model":{"type":["string","null"]},"sdk_version":{"type":["string","null"]}},"additionalProperties":{}},{"type":"null"}]}},"required":["name","visitId"],"additionalProperties":{}},"IngestRequest":{"type":"object","properties":{"events":{"maxItems":250,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[^\\s\\u0000-\\u001f\\u007f]+$","description":"Your event name, such as page_view. The agent_ prefix uses the published agent vocabulary."},"visitId":{"type":"string","minLength":1,"maxLength":128,"pattern":"^\\S+$","description":"An ephemeral activity grouping held in memory, with a fresh value after 30 minutes idle. Never a persistent user or device identifier."},"userId":{"description":"Optional customer-supplied opaque identifier from an explicit identify() call. Email addresses are refused. Omit for anonymous events.","anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}]},"occurredAt":{"description":"ISO-8601 UTC or epoch milliseconds. Omit to use receipt time. Default admission allows 30 days of age and five minutes of future clock skew.","anyOf":[{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"number"}]},{"type":"null"}]},"idempotencyKey":{"description":"A unique key for this event. Reuse the same key AND occurredAt when retrying. Without both, cross-request deduplication is not guaranteed.","type":["string","null"]},"properties":{"description":"Up to 64 flat custom properties. Strings, numbers, booleans and null are supported; nested objects and arrays are rejected. Do not send PII.","anyOf":[{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64},"additionalProperties":{"anyOf":[{"type":"string","maxLength":1024},{"type":"number"},{"type":"boolean"},{"type":"null"}]}},{"type":"null"}]},"systemProperties":{"description":"Optional system dimensions; strings are trimmed and capped at 128 characters. Country is derived at the edge and cannot be supplied here.","anyOf":[{"type":"object","properties":{"os_name":{"type":["string","null"]},"os_version":{"type":["string","null"]},"locale":{"type":["string","null"]},"app_version":{"type":["string","null"]},"device_model":{"type":["string","null"]},"sdk_version":{"type":["string","null"]}},"additionalProperties":{}},{"type":"null"}]}},"required":["name","visitId"],"additionalProperties":{}},"description":"Up to 250 events per batch by default. The project and workspace come from the credential, never from this body."}},"required":["events"],"additionalProperties":{}},"IngestReceipt":{"type":"object","properties":{"accepted":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Events newly written durably."},"deduplicated":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Events already stored, or repeated within this batch."},"rejected":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Events rejected individually. A 202 can still contain rejections."},"outcomes":{"description":"Only rejected events are listed. Omitted when no events were rejected. Fix these events before submitting them again.","type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Zero-based position in the submitted events array."},"accepted":{"type":"boolean","const":false},"reason":{"type":"string","enum":["MalformedEvent","UnknownEventName","ClockSkew","PersonIdRequired","PersonIdTooLong","PersonIdLooksLikeEmail"]}},"required":["index","accepted","reason"],"additionalProperties":false}}},"required":["accepted","deduplicated","rejected"],"additionalProperties":false},"IngestFailure":{"type":"object","properties":{"code":{"type":"string"},"detail":{"type":"string"},"retryable":{"type":"boolean"},"reason":{"type":"string"},"required":{"type":"string"},"count":{"type":"number"},"max":{"type":"number"},"bytes":{"type":"number"},"limit":{"type":"number"},"used":{"type":"number"},"retryAfterMs":{"type":"number"}},"required":["code","detail","retryable"],"additionalProperties":{},"description":"Whole-batch failure: no event was acknowledged. Only retry when retryable is true; observe Retry-After when present."},"Account":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Account id."},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":["string","null"]},"emailVerified":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."}},"required":["id","email","name","emailVerified","createdAt"],"additionalProperties":false,"description":"A person."},"WorkspaceSummary":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"],"description":"A workspace role."},"permissions":{"type":"array","items":{"type":"string","enum":["events:write","queries:run","projects:read","projects:write","projects:delete","dashboards:read","dashboards:write","monitors:read","monitors:write","credentials:read","credentials:write","workspace:read","workspace:admin","billing:read","billing:write"],"description":"A permission."}}},"required":["id","name","role","permissions"],"additionalProperties":false,"description":"A workspace the caller reaches, and how."},"UndefinedError":{"type":"object","properties":{"defined":{"const":false},"inferable":{"type":"boolean"},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","inferable","code","status","message"]},"Unauthorized":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"NotAuthenticated"}},"required":["reason"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]},"Forbidden":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"NotPermitted"},"required":{"type":"string","enum":["events:write","queries:run","projects:read","projects:write","projects:delete","dashboards:read","dashboards:write","monitors:read","monitors:write","credentials:read","credentials:write","workspace:read","workspace:admin","billing:read","billing:write"],"description":"A permission."}},"required":["reason","required"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"OutOfBinding"},"resource":{"type":"string"}},"required":["reason","resource"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"TooManyRequests":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"TOO_MANY_REQUESTS"},"status":{"const":429},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"RateLimited"},"retryAfterMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A length of time in milliseconds."}},"required":["reason","retryAfterMs"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]},"NotFound":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"NoSuchAccount"},"account":{"type":"string","minLength":1,"maxLength":128,"description":"Account id."}},"required":["reason","account"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]},"Workspace":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."},"name":{"type":"string"},"plan":{"type":"string","enum":["free","pro"]},"payment":{"type":"string","enum":["none","active","past_due","canceled"]},"projectCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limits":{"$ref":"#/components/schemas/PlanLimits"},"inGrace":{"type":"boolean","description":"Payment has failed but the plan's limits still apply."}},"required":["id","name","plan","payment","projectCount","limits","inGrace"],"additionalProperties":false,"description":"A workspace and what its plan allows."},"PlanLimits":{"type":"object","properties":{"eventsPerMonth":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"projects":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"seats":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"retentionDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["eventsPerMonth","projects","seats","retentionDays"],"additionalProperties":false,"description":"What a plan allows. Null means unlimited."},"BadRequest":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"NameRequired"}},"required":["reason"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]},"NotFound2":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"NoSuchWorkspace"},"workspace":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}},"required":["reason","workspace"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"NotAMember"},"account":{"type":"string","minLength":1,"maxLength":128,"description":"Account id."}},"required":["reason","account"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"Conflict":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"AlreadyAMember"},"account":{"type":"string","minLength":1,"maxLength":128,"description":"Account id."}},"required":["reason","account"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"RoleUnchanged"},"account":{"type":"string","minLength":1,"maxLength":128,"description":"Account id."},"role":{"type":"string","enum":["owner","admin","member"],"description":"A workspace role."}},"required":["reason","account","role"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"LastOwner"},"account":{"type":"string","minLength":1,"maxLength":128,"description":"Account id."}},"required":["reason","account"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"PaymentRequired":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"PAYMENT_REQUIRED"},"status":{"const":402},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"SeatLimitReached"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["reason","limit"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"ProjectLimitReached"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["reason","limit"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"Member":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/Account"},"role":{"type":"string","enum":["owner","admin","member"],"description":"A workspace role."},"since":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."}},"required":["account","role","since"],"additionalProperties":false,"description":"A person's standing in one workspace."},"Usage":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro"]},"inGrace":{"type":"boolean"},"period":{"type":"object","properties":{"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},"resetsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},"measuredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."}},"required":["from","resetsAt","measuredAt"],"additionalProperties":false,"description":"Calendar month in UTC; project and seat counts do not reset."},"events":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"state":{"type":"string","enum":["ok","overage","rejected"]}},"required":["used","limit","state"],"additionalProperties":false},"projects":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["used","limit"],"additionalProperties":false},"seats":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["used","limit"],"additionalProperties":false}},"required":["plan","inGrace","period","events","projects","seats"],"additionalProperties":false,"description":"This period's consumption against the plan."},"ProjectSummary":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."},"workspace":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."},{"type":"null"}]},"name":{"type":"string"},"archived":{"type":"boolean"}},"required":["id","workspace","name","archived"],"additionalProperties":false,"description":"A project in a list."},"NotFound3":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"NoSuchProject"},"project":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}},"required":["reason","project"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"NoSuchWorkspace"},"workspace":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}},"required":["reason","workspace"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"Conflict2":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"NameUnchanged"}},"required":["reason"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"ProjectExists"},"project":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}},"required":["reason","project"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"ProjectAlreadyArchived"},"project":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}},"required":["reason","project"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"ProjectNotArchived"},"project":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}},"required":["reason","project"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"PaymentRequired2":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"PAYMENT_REQUIRED"},"status":{"const":402},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"ProjectLimitReached"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["reason","limit"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]},"Project":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."},"name":{"type":"string"},"workspace":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."},{"type":"null"}],"description":"Null until the project is claimed."},"archived":{"type":"boolean"},"retention":{"$ref":"#/components/schemas/RetentionPolicy"},"effectiveRetentionDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The policy after the plan's ceiling is applied. Null means unlimited."},"claimedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},{"type":"null"}]}},"required":["id","name","workspace","archived","retention","effectiveRetentionDays","claimedAt"],"additionalProperties":false,"description":"A project, claimed or not."},"RetentionPolicy":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"inherit"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"days"},"days":{"type":"integer","exclusiveMinimum":0,"maximum":3650}},"required":["kind","days"],"additionalProperties":false}],"description":"How long this project's events are kept."},"IssuedCredential":{"type":"object","properties":{"credential":{"$ref":"#/components/schemas/Credential"},"secret":{"type":"string","description":"Shown once, at issuance. Counted stores a hash and cannot show it again."}},"required":["credential","secret"],"additionalProperties":false,"description":"A newly minted key and its secret."},"Credential":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Credential id."},"kind":{"type":"string","enum":["ingest","service"]},"name":{"type":"string"},"hint":{"type":"string","description":"The displayable fragment. Never the key."},"workspace":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."},"project":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"description":"Project id."},{"type":"null"}]},"permissions":{"type":"array","items":{"type":"string","enum":["events:write","queries:run","projects:read","projects:write","projects:delete","dashboards:read","dashboards:write","monitors:read","monitors:write","credentials:read","credentials:write","workspace:read","workspace:admin","billing:read","billing:write"],"description":"A permission."}},"issuedBy":{"type":"string","minLength":1,"maxLength":128,"description":"Account id."},"status":{"type":"string","enum":["active","expiring","revoked","expired"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},{"type":"null"}]}},"required":["id","kind","name","hint","workspace","project","permissions","issuedBy","status","createdAt","expiresAt","lastUsedAt","revokedAt"],"additionalProperties":false,"description":"An API key, without its secret."},"RetentionPolicyInput":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"inherit"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"days"},"days":{"type":"integer","exclusiveMinimum":0,"maximum":3650}},"required":["kind","days"]}],"description":"How long this project's events are kept."},"ClaimGrant":{"type":"object","properties":{"token":{"type":"string","description":"Shown once. Present it to the claim route to take ownership."},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."}},"required":["token","expiresAt"],"additionalProperties":false,"description":"Permission to claim a provisioned project."},"Forbidden2":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"NotPermitted"},"required":{"type":"string","enum":["events:write","queries:run","projects:read","projects:write","projects:delete","dashboards:read","dashboards:write","monitors:read","monitors:write","credentials:read","credentials:write","workspace:read","workspace:admin","billing:read","billing:write"],"description":"A permission."}},"required":["reason","required"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"OutOfBinding"},"resource":{"type":"string"}},"required":["reason","resource"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"GrantMismatch"}},"required":["reason"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"Conflict3":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"AlreadyClaimed"}},"required":["reason"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]},"Gone":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"GONE"},"status":{"const":410},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"GrantExpired"}},"required":["reason"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]},"Forbidden3":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"NotPermitted"},"required":{"type":"string","enum":["events:write","queries:run","projects:read","projects:write","projects:delete","dashboards:read","dashboards:write","monitors:read","monitors:write","credentials:read","credentials:write","workspace:read","workspace:admin","billing:read","billing:write"],"description":"A permission."}},"required":["reason","required"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"OutOfBinding"},"resource":{"type":"string"}},"required":["reason","resource"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"IssuerNotAMember"},"account":{"type":"string","minLength":1,"maxLength":128,"description":"Account id."}},"required":["reason","account"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"NothingGrantable"},"account":{"type":"string","minLength":1,"maxLength":128,"description":"Account id."}},"required":["reason","account"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"PermissionEscalation"},"requested":{"type":"array","items":{"type":"string","enum":["events:write","queries:run","projects:read","projects:write","projects:delete","dashboards:read","dashboards:write","monitors:read","monitors:write","credentials:read","credentials:write","workspace:read","workspace:admin","billing:read","billing:write"],"description":"A permission."}},"held":{"type":"array","items":{"type":"string","enum":["events:write","queries:run","projects:read","projects:write","projects:delete","dashboards:read","dashboards:write","monitors:read","monitors:write","credentials:read","credentials:write","workspace:read","workspace:admin","billing:read","billing:write"],"description":"A permission."}}},"required":["reason","requested","held"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"BadRequest2":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"PermissionsRequired"}},"required":["reason"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]},"NotFound4":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"NoSuchProject"},"project":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}},"required":["reason","project"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"UnknownCredential"},"credential":{"type":"string","minLength":1,"maxLength":128,"description":"Credential id."}},"required":["reason","credential"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"Conflict4":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"CredentialExists"},"credential":{"type":"string","minLength":1,"maxLength":128,"description":"Credential id."}},"required":["reason","credential"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"LastIngestCredential"},"credential":{"type":"string","minLength":1,"maxLength":128,"description":"Credential id."}},"required":["reason","credential"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"Gone2":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"GONE"},"status":{"const":410},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"CredentialRevoked"},"credential":{"type":"string","minLength":1,"maxLength":128,"description":"Credential id."}},"required":["reason","credential"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"CredentialExpired"},"credential":{"type":"string","minLength":1,"maxLength":128,"description":"Credential id."}},"required":["reason","credential"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"UnprocessableContent":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"FirstCredentialMustIngest"}},"required":["reason"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"RotationKindMismatch"}},"required":["reason"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"RotatedCredential":{"type":"object","properties":{"issued":{"$ref":"#/components/schemas/IssuedCredential"},"retiring":{"$ref":"#/components/schemas/Credential"}},"required":["issued","retiring"],"additionalProperties":false,"description":"The replacement and the key it replaces."},"CredentialIdentity":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Credential id."},"kind":{"type":"string","enum":["ingest","service"]},"workspace":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."},"project":{"anyOf":[{"type":"string","minLength":1,"maxLength":128,"description":"Project id."},{"type":"null"}]},"permissions":{"type":"array","items":{"type":"string","enum":["events:write","queries:run","projects:read","projects:write","projects:delete","dashboards:read","dashboards:write","monitors:read","monitors:write","credentials:read","credentials:write","workspace:read","workspace:admin","billing:read","billing:write"],"description":"A permission."}},"issuedBy":{"type":"string","minLength":1,"maxLength":128,"description":"Account id."}},"required":["id","kind","workspace","project","permissions","issuedBy"],"additionalProperties":false,"description":"Who the calling credential is."},"DashboardSummary":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."},"workspace":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."},"name":{"type":"string"},"tileCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"shared":{"type":"boolean"},"isDefault":{"type":"boolean"}},"required":["id","workspace","name","tileCount","shared","isDefault"],"additionalProperties":false,"description":"A dashboard in a list."},"BadRequest3":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"NameRequired"}},"required":["reason"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"InvalidLayout"},"detail":{"type":"string"}},"required":["reason","detail"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"NotFound5":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"NoSuchDashboard"},"dashboard":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}},"required":["reason","dashboard"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"NoSuchWorkspace"},"workspace":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}},"required":["reason","workspace"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"Conflict5":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"NameUnchanged"}},"required":["reason"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]},"Dashboard":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."},"workspace":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."},"name":{"type":"string"},"tiles":{"type":"array","items":{"$ref":"#/components/schemas/Tile"}},"isDefault":{"type":"boolean"},"share":{"anyOf":[{"$ref":"#/components/schemas/ShareState"},{"type":"null"}]}},"required":["id","workspace","name","tiles","isDefault","share"],"additionalProperties":false,"description":"A dashboard and its insights, in order."},"Tile":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Tile id."},"title":{"type":"string"},"project":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."},"analysis":{"$ref":"#/components/schemas/Analysis"},"view":{"type":"string","enum":["number","line","bar","table","funnel","retention"]},"width":{"type":"integer","minimum":1,"maximum":12},"layout":{"anyOf":[{"$ref":"#/components/schemas/TileLayout"},{"type":"null"}]}},"required":["id","title","project","analysis","view","width"],"additionalProperties":false,"description":"One question on a dashboard."},"Analysis":{"oneOf":[{"type":"object","properties":{"shape":{"type":"string","const":"scalar"},"measure":{"$ref":"#/components/schemas/Measure"},"where":{"$ref":"#/components/schemas/Predicate"},"window":{"$ref":"#/components/schemas/Window"},"summary":{"type":"string","enum":["total","average","peak","low","latest"]}},"required":["shape","measure","window","summary"],"additionalProperties":false},{"type":"object","properties":{"shape":{"type":"string","const":"series"},"measure":{"$ref":"#/components/schemas/Measure"},"where":{"$ref":"#/components/schemas/Predicate"},"window":{"$ref":"#/components/schemas/Window"},"grain":{"type":"string","enum":["hour","day","week","month"]},"by":{"description":"Split the trend by one property.","$ref":"#/components/schemas/FieldRef"},"limit":{"description":"Top groups over the whole period; defaults to three.","type":"integer","minimum":1,"maximum":3}},"required":["shape","measure","window","grain"],"additionalProperties":false},{"type":"object","properties":{"shape":{"type":"string","const":"breakdown"},"measure":{"$ref":"#/components/schemas/Measure"},"where":{"$ref":"#/components/schemas/Predicate"},"window":{"$ref":"#/components/schemas/Window"},"by":{"anyOf":[{"$ref":"#/components/schemas/FieldRef"},{"minItems":1,"maxItems":3,"type":"array","items":{"$ref":"#/components/schemas/FieldRef"}}],"description":"One property or an ordered tuple of up to three properties."},"order":{"type":"string","enum":["asc","desc"]},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100}},"required":["shape","measure","window","by","order","limit"],"additionalProperties":false},{"type":"object","properties":{"shape":{"type":"string","const":"funnel"},"funnel":{"$ref":"#/components/schemas/Funnel"}},"required":["shape","funnel"],"additionalProperties":false}],"description":"What to measure, over what window, sliced how."},"Measure":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"count"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unique"},"basis":{"type":"string","enum":["visit","person"]}},"required":["kind","basis"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"sum"},"name":{"type":"string","minLength":1}},"required":["kind","name"],"additionalProperties":false}],"description":"What is being counted."},"Predicate":{"description":"A filter over dimensions and event properties.","oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"eq"},"field":{"$ref":"#/components/schemas/FieldRef"},"value":{"type":["string","number","boolean","null"]}},"required":["op","field","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"neq"},"field":{"$ref":"#/components/schemas/FieldRef"},"value":{"type":["string","number","boolean","null"]}},"required":["op","field","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"in"},"field":{"$ref":"#/components/schemas/FieldRef"},"values":{"type":"array","items":{"type":["string","number","boolean","null"]}}},"required":["op","field","values"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"notIn"},"field":{"$ref":"#/components/schemas/FieldRef"},"values":{"type":"array","items":{"type":["string","number","boolean","null"]}}},"required":["op","field","values"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"contains"},"field":{"$ref":"#/components/schemas/FieldRef"},"value":{"type":"string"}},"required":["op","field","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"startsWith"},"field":{"$ref":"#/components/schemas/FieldRef"},"value":{"type":"string"}},"required":["op","field","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"endsWith"},"field":{"$ref":"#/components/schemas/FieldRef"},"value":{"type":"string"}},"required":["op","field","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"gt"},"field":{"$ref":"#/components/schemas/FieldRef"},"value":{"type":"number"}},"required":["op","field","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"gte"},"field":{"$ref":"#/components/schemas/FieldRef"},"value":{"type":"number"}},"required":["op","field","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"lt"},"field":{"$ref":"#/components/schemas/FieldRef"},"value":{"type":"number"}},"required":["op","field","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"lte"},"field":{"$ref":"#/components/schemas/FieldRef"},"value":{"type":"number"}},"required":["op","field","value"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"exists"},"field":{"$ref":"#/components/schemas/FieldRef"}},"required":["op","field"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"notExists"},"field":{"$ref":"#/components/schemas/FieldRef"}},"required":["op","field"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"and"},"operands":{"type":"array","items":{"$ref":"#/components/schemas/Predicate"}}},"required":["op","operands"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"or"},"operands":{"type":"array","items":{"$ref":"#/components/schemas/Predicate"}}},"required":["op","operands"],"additionalProperties":false},{"type":"object","properties":{"op":{"type":"string","const":"not"},"operand":{"$ref":"#/components/schemas/Predicate"}},"required":["op","operand"],"additionalProperties":false}]},"FieldRef":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"dimension"},"key":{"type":"string","minLength":1}},"required":["source","key"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"property"},"key":{"type":"string","minLength":1}},"required":["source","key"],"additionalProperties":false}],"description":"A field to filter or slice by. Dimensions are declared and indexed; properties are whatever the event carried."},"Window":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"relative"},"amount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","enum":["hour","day","week","month"]}},"required":["kind","amount","unit"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"absolute"},"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."}},"required":["kind","from","to"],"additionalProperties":false}],"description":"The interval a question observes."},"Funnel":{"type":"object","properties":{"steps":{"minItems":2,"maxItems":10,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"events":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"where":{"$ref":"#/components/schemas/Predicate"}},"required":["events"],"additionalProperties":false}},"window":{"$ref":"#/components/schemas/Window"},"conversionWindowMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How long a person has to reach the last step after the first."},"basis":{"type":"string","enum":["visit","person"]}},"required":["steps","window","conversionWindowMs","basis"],"additionalProperties":false,"description":"An ordered sequence with a conversion deadline."},"TileLayout":{"type":"object","properties":{"x":{"type":"integer","minimum":0,"maximum":11},"y":{"type":"integer","minimum":0,"maximum":1000},"height":{"type":"integer","minimum":3,"maximum":20}},"required":["x","y","height"],"additionalProperties":false,"description":"Position and height in grid units. Width remains in twelfths."},"ShareState":{"type":"object","properties":{"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."}},"required":["expiresAt"],"additionalProperties":false,"description":"A live share link's expiry."},"WindowInput":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"relative"},"amount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"unit":{"type":"string","enum":["hour","day","week","month"]}},"required":["kind","amount","unit"]},{"type":"object","properties":{"kind":{"type":"string","const":"absolute"},"from":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},"to":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."}},"required":["kind","from","to"]}],"description":"The interval a question observes."},"Readout":{"oneOf":[{"type":"object","properties":{"ok":{"type":"boolean","const":true},"id":{"type":"string"},"tile":{"type":"string","minLength":1,"maxLength":128,"description":"Tile id."},"value":{"$ref":"#/components/schemas/ReadoutValue"},"computedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."}},"required":["ok","id","value","computedAt"],"additionalProperties":false},{"type":"object","properties":{"ok":{"type":"boolean","const":false},"id":{"type":"string"},"tile":{"type":"string","minLength":1,"maxLength":128,"description":"Tile id."},"failure":{"$ref":"#/components/schemas/ReadoutFailure"}},"required":["ok","id","failure"],"additionalProperties":false}],"description":"One insight's outcome. Carried in the body so one failure cannot fail the page."},"ReadoutValue":{"oneOf":[{"type":"object","properties":{"shape":{"type":"string","const":"scalar"},"value":{"type":"number"},"trend":{"type":"object","properties":{"current":{"type":"number"},"previous":{"type":"number"},"absoluteChange":{"type":"number"},"percentChange":{"type":["number","null"]},"direction":{"type":"string","enum":["up","down","flat"]}},"required":["current","previous","absoluteChange","percentChange","direction"],"additionalProperties":false}},"required":["shape","value"],"additionalProperties":false},{"type":"object","properties":{"shape":{"type":"string","const":"series"},"points":{"type":"array","items":{"type":"object","properties":{"bucketStart":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},"value":{"type":"number"}},"required":["bucketStart","value"],"additionalProperties":false}},"series":{"type":"array","items":{"type":"object","properties":{"key":{"type":["string","null"]},"label":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"bucketStart":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},"value":{"type":"number"}},"required":["bucketStart","value"],"additionalProperties":false}}},"required":["key","label","points"],"additionalProperties":false}},"trend":{"type":"object","properties":{"current":{"type":"number"},"previous":{"type":"number"},"absoluteChange":{"type":"number"},"percentChange":{"type":["number","null"]},"direction":{"type":"string","enum":["up","down","flat"]}},"required":["current","previous","absoluteChange","percentChange","direction"],"additionalProperties":false}},"required":["shape","points"],"additionalProperties":false},{"type":"object","properties":{"shape":{"type":"string","const":"breakdown"},"rows":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"number"},"keys":{"type":"array","items":{"type":["string","null"]}}},"required":["label","value"],"additionalProperties":false}},"dimensions":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"}},"required":["key","label"],"additionalProperties":false}}},"required":["shape","rows"],"additionalProperties":false},{"type":"object","properties":{"shape":{"type":"string","const":"funnel"},"result":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"reached":{"type":"number"},"rate":{"type":"number"},"cumulativeRate":{"type":"number"},"droppedOff":{"type":"number"}},"required":["label","reached","rate","cumulativeRate","droppedOff"],"additionalProperties":false}},"overallRate":{"type":"number"}},"required":["steps","overallRate"],"additionalProperties":false}},"required":["shape","result"],"additionalProperties":false}],"description":"An answer, shaped like the question."},"ReadoutFailure":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"Timeout"},"budgetMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A length of time in milliseconds."}},"required":["kind","budgetMs"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"Unavailable"},"detail":{"type":"string"}},"required":["kind","detail"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"InvalidQuery"},"detail":{"type":"string"}},"required":["kind","detail"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"NotImplemented"},"feature":{"type":"string","enum":["retention","group_by","nested_predicates"]}},"required":["kind","feature"],"additionalProperties":false}],"description":"Why there is no answer."},"ShareLink":{"type":"object","properties":{"token":{"type":"string","description":"Shown once, at creation. Counted stores only its digest."},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."}},"required":["token","expiresAt"],"additionalProperties":false,"description":"A newly created share link."},"BadRequest4":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"TileTitleRequired"}},"required":["reason"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"InvalidWidth"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["reason","width"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"IndexOutOfRange"},"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"size":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["reason","index","size"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"NotFound6":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"NoSuchDashboard"},"dashboard":{"type":"string","minLength":1,"maxLength":128,"description":"Dashboard id."}},"required":["reason","dashboard"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"NoSuchTile"},"tile":{"type":"string","minLength":1,"maxLength":128,"description":"Tile id."}},"required":["reason","tile"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"Conflict6":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"TileExists"},"tile":{"type":"string","minLength":1,"maxLength":128,"description":"Tile id."}},"required":["reason","tile"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"TooManyTiles"},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["reason","max"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"WidthUnchanged"},"tile":{"type":"string","minLength":1,"maxLength":128,"description":"Tile id."}},"required":["reason","tile"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"PositionUnchanged"},"tile":{"type":"string","minLength":1,"maxLength":128,"description":"Tile id."}},"required":["reason","tile"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"UnprocessableContent2":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"InvalidAnalysis"},"detail":{"type":"string"}},"required":["reason","detail"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"WindowTooLarge"},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["reason","max"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"UnknownDimension"},"dimension":{"type":"string"}},"required":["reason","dimension"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"UnknownMeasure"},"measure":{"type":"string"}},"required":["reason","measure"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"AnalysisInput":{"oneOf":[{"type":"object","properties":{"shape":{"type":"string","const":"scalar"},"measure":{"$ref":"#/components/schemas/MeasureInput"},"where":{"$ref":"#/components/schemas/PredicateInput"},"window":{"$ref":"#/components/schemas/WindowInput"},"summary":{"type":"string","enum":["total","average","peak","low","latest"]}},"required":["shape","measure","window","summary"]},{"type":"object","properties":{"shape":{"type":"string","const":"series"},"measure":{"$ref":"#/components/schemas/MeasureInput"},"where":{"$ref":"#/components/schemas/PredicateInput"},"window":{"$ref":"#/components/schemas/WindowInput"},"grain":{"type":"string","enum":["hour","day","week","month"]},"by":{"description":"Split the trend by one property.","$ref":"#/components/schemas/FieldRefInput"},"limit":{"description":"Top groups over the whole period; defaults to three.","type":"integer","minimum":1,"maximum":3}},"required":["shape","measure","window","grain"]},{"type":"object","properties":{"shape":{"type":"string","const":"breakdown"},"measure":{"$ref":"#/components/schemas/MeasureInput"},"where":{"$ref":"#/components/schemas/PredicateInput"},"window":{"$ref":"#/components/schemas/WindowInput"},"by":{"anyOf":[{"$ref":"#/components/schemas/FieldRefInput"},{"minItems":1,"maxItems":3,"type":"array","items":{"$ref":"#/components/schemas/FieldRefInput"}}],"description":"One property or an ordered tuple of up to three properties."},"order":{"type":"string","enum":["asc","desc"]},"limit":{"type":"integer","exclusiveMinimum":0,"maximum":100}},"required":["shape","measure","window","by","order","limit"]},{"type":"object","properties":{"shape":{"type":"string","const":"funnel"},"funnel":{"$ref":"#/components/schemas/FunnelInput"}},"required":["shape","funnel"]}],"description":"What to measure, over what window, sliced how."},"MeasureInput":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"count"}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","const":"unique"},"basis":{"type":"string","enum":["visit","person"]}},"required":["kind","basis"]},{"type":"object","properties":{"kind":{"type":"string","const":"sum"},"name":{"type":"string","minLength":1}},"required":["kind","name"]}],"description":"What is being counted."},"PredicateInput":{"description":"A filter over dimensions and event properties.","oneOf":[{"type":"object","properties":{"op":{"type":"string","const":"eq"},"field":{"$ref":"#/components/schemas/FieldRefInput"},"value":{"type":["string","number","boolean","null"]}},"required":["op","field","value"]},{"type":"object","properties":{"op":{"type":"string","const":"neq"},"field":{"$ref":"#/components/schemas/FieldRefInput"},"value":{"type":["string","number","boolean","null"]}},"required":["op","field","value"]},{"type":"object","properties":{"op":{"type":"string","const":"in"},"field":{"$ref":"#/components/schemas/FieldRefInput"},"values":{"type":"array","items":{"type":["string","number","boolean","null"]}}},"required":["op","field","values"]},{"type":"object","properties":{"op":{"type":"string","const":"notIn"},"field":{"$ref":"#/components/schemas/FieldRefInput"},"values":{"type":"array","items":{"type":["string","number","boolean","null"]}}},"required":["op","field","values"]},{"type":"object","properties":{"op":{"type":"string","const":"contains"},"field":{"$ref":"#/components/schemas/FieldRefInput"},"value":{"type":"string"}},"required":["op","field","value"]},{"type":"object","properties":{"op":{"type":"string","const":"startsWith"},"field":{"$ref":"#/components/schemas/FieldRefInput"},"value":{"type":"string"}},"required":["op","field","value"]},{"type":"object","properties":{"op":{"type":"string","const":"endsWith"},"field":{"$ref":"#/components/schemas/FieldRefInput"},"value":{"type":"string"}},"required":["op","field","value"]},{"type":"object","properties":{"op":{"type":"string","const":"gt"},"field":{"$ref":"#/components/schemas/FieldRefInput"},"value":{"type":"number"}},"required":["op","field","value"]},{"type":"object","properties":{"op":{"type":"string","const":"gte"},"field":{"$ref":"#/components/schemas/FieldRefInput"},"value":{"type":"number"}},"required":["op","field","value"]},{"type":"object","properties":{"op":{"type":"string","const":"lt"},"field":{"$ref":"#/components/schemas/FieldRefInput"},"value":{"type":"number"}},"required":["op","field","value"]},{"type":"object","properties":{"op":{"type":"string","const":"lte"},"field":{"$ref":"#/components/schemas/FieldRefInput"},"value":{"type":"number"}},"required":["op","field","value"]},{"type":"object","properties":{"op":{"type":"string","const":"exists"},"field":{"$ref":"#/components/schemas/FieldRefInput"}},"required":["op","field"]},{"type":"object","properties":{"op":{"type":"string","const":"notExists"},"field":{"$ref":"#/components/schemas/FieldRefInput"}},"required":["op","field"]},{"type":"object","properties":{"op":{"type":"string","const":"and"},"operands":{"type":"array","items":{"$ref":"#/components/schemas/PredicateInput"}}},"required":["op","operands"]},{"type":"object","properties":{"op":{"type":"string","const":"or"},"operands":{"type":"array","items":{"$ref":"#/components/schemas/PredicateInput"}}},"required":["op","operands"]},{"type":"object","properties":{"op":{"type":"string","const":"not"},"operand":{"$ref":"#/components/schemas/PredicateInput"}},"required":["op","operand"]}]},"FieldRefInput":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"dimension"},"key":{"type":"string","minLength":1}},"required":["source","key"]},{"type":"object","properties":{"source":{"type":"string","const":"property"},"key":{"type":"string","minLength":1}},"required":["source","key"]}],"description":"A field to filter or slice by. Dimensions are declared and indexed; properties are whatever the event carried."},"FunnelInput":{"type":"object","properties":{"steps":{"minItems":2,"maxItems":10,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"events":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"where":{"$ref":"#/components/schemas/PredicateInput"}},"required":["events"]}},"window":{"$ref":"#/components/schemas/WindowInput"},"conversionWindowMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How long a person has to reach the last step after the first."},"basis":{"type":"string","enum":["visit","person"]}},"required":["steps","window","conversionWindowMs","basis"],"description":"An ordered sequence with a conversion deadline."},"Monitor":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"description":"Monitor id."},"workspace":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."},"project":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."},"name":{"type":"string"},"analysis":{"$ref":"#/components/schemas/Analysis"},"threshold":{"$ref":"#/components/schemas/Threshold"},"cooldownMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A length of time in milliseconds."},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"enabled":{"type":"boolean"},"state":{"type":"string","enum":["ok","breaching"]},"lastNotifiedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},{"type":"null"}],"description":"When a breach notice was queued; lastDeliveredAt confirms transport acceptance."},"lastValue":{"type":["number","null"]},"lastAttemptAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},{"type":"null"}]},"lastMeasuredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},{"type":"null"}]},"evaluationError":{"type":["string","null"]},"pendingDeliveries":{"type":"integer","minimum":0,"maximum":9007199254740991},"failedDeliveries":{"type":"integer","minimum":0,"maximum":9007199254740991},"deliveryError":{"type":["string","null"]},"lastDeliveredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},{"type":"null"}]}},"required":["id","workspace","project","name","analysis","threshold","cooldownMs","channels","enabled","state","lastNotifiedAt","lastValue","lastAttemptAt","lastMeasuredAt","evaluationError","pendingDeliveries","failedDeliveries","deliveryError","lastDeliveredAt"],"additionalProperties":false,"description":"A scalar question watched against a threshold."},"Threshold":{"type":"object","properties":{"comparison":{"type":"string","enum":["above","below"]},"value":{"type":"number"}},"required":["comparison","value"],"additionalProperties":false,"description":"When a monitor is in breach."},"Channel":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"email"},"address":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["kind","address"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"webhook"},"url":{"type":"string","format":"uri"}},"required":["kind","url"],"additionalProperties":false}],"description":"Where a firing monitor is announced."},"BadRequest5":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"NameRequired"}},"required":["reason"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"NegativeCooldown"}},"required":["reason"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"NotFound7":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"NoSuchMonitor"},"monitor":{"type":"string"}},"required":["reason","monitor"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"NoSuchProject"},"project":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}},"required":["reason","project"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"Conflict7":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"AlreadyEnabled"}},"required":["reason"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"AlreadyDisabled"}},"required":["reason"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"UnprocessableContent3":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"AnalysisMustBeScalar"}},"required":["reason"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"InvalidAnalysis"},"detail":{"type":"string"}},"required":["reason","detail"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"WindowTooLarge"},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["reason","max"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"UnknownDimension"},"dimension":{"type":"string"}},"required":["reason","dimension"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"UnknownMeasure"},"measure":{"type":"string"}},"required":["reason","measure"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"ThresholdInput":{"type":"object","properties":{"comparison":{"type":"string","enum":["above","below"]},"value":{"type":"number"}},"required":["comparison","value"],"description":"When a monitor is in breach."},"ChannelInput":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"email"},"address":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["kind","address"]},{"type":"object","properties":{"kind":{"type":"string","const":"webhook"},"url":{"type":"string","format":"uri"}},"required":["kind","url"]}],"description":"Where a firing monitor is announced."},"Plan":{"type":"object","properties":{"id":{"type":"string","enum":["free","pro"]},"name":{"type":"string"},"limits":{"$ref":"#/components/schemas/PlanLimits"}},"required":["id","name","limits"],"additionalProperties":false,"description":"A published plan."},"NotFound8":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"NoSubscription"},"workspace":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}},"required":["reason","workspace"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"NoSuchWorkspace"},"workspace":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."}},"required":["reason","workspace"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"UnprocessableContent4":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"PlanUnavailable"},"plan":{"type":"string"}},"required":["reason","plan"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]},"BadGateway":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"BAD_GATEWAY"},"status":{"const":502},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"ProviderUnavailable"},"detail":{"type":"string"}},"required":["reason","detail"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]},"Subscription":{"type":"object","properties":{"workspace":{"type":"string","minLength":1,"maxLength":128,"description":"Workspace id."},"plan":{"type":"string","enum":["free","pro"]},"payment":{"type":"string","enum":["none","active","past_due","canceled"]},"renewsAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},{"type":"null"}]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},"hasBillingAccount":{"type":"boolean","description":"Whether a billing portal session can be opened for this workspace."}},"required":["workspace","plan","payment","renewsAt","updatedAt","hasBillingAccount"],"additionalProperties":false,"description":"What the workspace is paying for."},"HostedSession":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."},{"type":"null"}]}},"required":["url","expiresAt"],"additionalProperties":false,"description":"A hosted checkout or billing-portal URL."},"AnsweredReadout":{"type":"object","properties":{"id":{"type":"string"},"value":{"$ref":"#/components/schemas/ReadoutValue"},"computedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"An instant in time, ISO-8601 with a trailing Z."}},"required":["id","value","computedAt"],"additionalProperties":false,"description":"A question that was answered."},"NotFound9":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"NoSuchProject"},"project":{"type":"string","minLength":1,"maxLength":128,"description":"Project id."}},"required":["reason","project"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]},"UnprocessableContent5":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"UNPROCESSABLE_CONTENT"},"status":{"const":422},"message":{"type":"string"},"data":{"oneOf":[{"type":"object","properties":{"reason":{"type":"string","const":"InvalidAnalysis"},"detail":{"type":"string"}},"required":["reason","detail"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"WindowTooLarge"},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["reason","max"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"UnknownDimension"},"dimension":{"type":"string"}},"required":["reason","dimension"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"UnknownMeasure"},"measure":{"type":"string"}},"required":["reason","measure"],"additionalProperties":false},{"type":"object","properties":{"reason":{"type":"string","const":"InvalidQuery"},"detail":{"type":"string"}},"required":["reason","detail"],"additionalProperties":false}]}},"required":["defined","inferable","code","status","message","data"]},"NotImplemented":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"NOT_IMPLEMENTED"},"status":{"const":501},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"NotImplemented"},"feature":{"type":"string","enum":["retention","group_by","nested_predicates"]}},"required":["reason","feature"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]},"ServiceUnavailable":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"SERVICE_UNAVAILABLE"},"status":{"const":503},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"Unavailable"},"detail":{"type":"string"}},"required":["reason","detail"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]},"GatewayTimeout":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"GATEWAY_TIMEOUT"},"status":{"const":504},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"Timeout"},"budgetMs":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"A length of time in milliseconds."}},"required":["reason","budgetMs"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]},"ProjectSchema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"string"}},"dimensions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"status":{"type":"string","enum":["indexed","planned","scanned","unknown"]},"source":{"type":"string","enum":["dimension","property"]}},"required":["name","label","status"],"additionalProperties":false}},"measures":{"type":"array","items":{"type":"string"},"description":"Declared numeric measures available for sum. A numeric event property is not automatically a measure."},"capabilities":{"type":"object","properties":{"personAnalytics":{"type":"boolean","description":"Whether distinct-person counts and person-based funnels can execute. Accepting identify() does not imply query support."},"numericPropertyAggregations":{"type":"boolean","description":"Whether arbitrary numeric event properties can be summed. Otherwise sum accepts only names in measures."}},"required":["personAnalytics","numericPropertyAggregations"],"additionalProperties":false}},"required":["events","dimensions","measures","capabilities"],"additionalProperties":false,"description":"The vocabulary a project's events carry."},"NotFound10":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"NotShared"}},"required":["reason"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]},"Gone3":{"type":"object","properties":{"defined":{"const":true},"inferable":{"type":"boolean"},"code":{"const":"GONE"},"status":{"const":410},"message":{"type":"string"},"data":{"type":"object","properties":{"reason":{"type":"string","const":"ShareGrantExpired"}},"required":["reason"],"additionalProperties":false}},"required":["defined","inferable","code","status","message","data"]}}},"openapi":"3.1.2"}