{"components":{"schemas":{"Error":{"properties":{"error":{"type":"string"}},"required":["error"],"type":"object"},"IssuedLlmToken":{"properties":{"created":{"format":"date-time","type":"string"},"header":{"type":"string"},"label":{"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"},"subject":{"type":"string"},"token":{"type":"string"},"tokenId":{"type":"string"},"workspace":{"type":"string"}},"required":["token","tokenId","header","subject","workspace","label","scopes","created"],"type":"object"},"LlmTokenSummary":{"properties":{"created":{"format":"date-time","type":"string"},"label":{"type":"string"},"lastUsed":{"format":"date-time","type":["string","null"]},"revoked":{"type":"boolean"},"scopes":{"items":{"type":"string"},"type":"array"},"subject":{"type":"string"},"tokenId":{"type":"string"},"workspace":{"type":"string"}},"required":["tokenId","subject","workspace","label","scopes","created","revoked"],"type":"object"},"NewLlmToken":{"properties":{"label":{"type":"string"}},"type":"object"},"NewTask":{"properties":{"title":{"minLength":1,"type":"string"}},"required":["title"],"type":"object"},"Principal":{"properties":{"authMode":{"type":"string"},"authorizedParty":{"type":["string","null"]},"entitled":{"type":"boolean"},"subject":{"type":"string"},"workspace":{"type":["string","null"]}},"required":["authMode","subject","entitled"],"type":"object"},"Task":{"properties":{"created":{"format":"date-time","type":"string"},"done":{"type":"boolean"},"id":{"format":"uuid","type":"string"},"title":{"type":"string"}},"required":["id","title","done","created"],"type":"object"}},"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"}}},"info":{"description":"Shared toy todo engine exposed through REST and MCP.","title":"Todo Playground API","version":"0.1.0"},"openapi":"3.1.0","paths":{"/api/v1/llm-tokens":{"get":{"operationId":"listLlmTokens","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LlmTokenSummary"},"type":"array"}}},"description":"LLM tokens returned."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid bearer token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authenticated workspace is not entitled."}},"security":[{"bearerAuth":[]}],"summary":"List LLM install tokens for the authenticated subject"},"post":{"operationId":"createLlmToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewLlmToken"}}},"required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedLlmToken"}}},"description":"LLM token created."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid bearer token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authenticated workspace is not entitled."}},"security":[{"bearerAuth":[]}],"summary":"Create a long-lived LLM install token from the current principal"}},"/api/v1/llm-tokens/{tokenId}":{"delete":{"operationId":"revokeLlmToken","parameters":[{"in":"path","name":"tokenId","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"LLM token revoked."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid bearer token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authenticated workspace is not entitled."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"LLM token not found."}},"security":[{"bearerAuth":[]}],"summary":"Revoke an LLM install token"}},"/api/v1/tasks":{"get":{"operationId":"listTasks","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Task"},"type":"array"}}},"description":"Tasks returned."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid bearer token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authenticated workspace is not entitled."}},"security":[{"bearerAuth":[]}],"summary":"List tasks"},"post":{"operationId":"createTask","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTask"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"description":"Task created."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid bearer token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authenticated workspace is not entitled."}},"security":[{"bearerAuth":[]}],"summary":"Create a task"}},"/api/v1/tasks/{id}":{"delete":{"operationId":"deleteTask","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"204":{"description":"Task deleted."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid bearer token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authenticated workspace is not entitled."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Task not found."}},"security":[{"bearerAuth":[]}],"summary":"Delete a task"},"get":{"operationId":"getTask","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"description":"Task returned."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid bearer token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authenticated workspace is not entitled."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Task not found."}},"security":[{"bearerAuth":[]}],"summary":"Get a task"}},"/api/v1/tasks/{id}/complete":{"patch":{"operationId":"completeTask","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"description":"Task completed."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid bearer token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authenticated workspace is not entitled."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Task not found."}},"security":[{"bearerAuth":[]}],"summary":"Mark a task complete"}},"/api/v1/tasks/{id}/rename":{"patch":{"operationId":"renameTask","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewTask"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"description":"Task renamed."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid bearer token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authenticated workspace is not entitled."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Task not found."}},"security":[{"bearerAuth":[]}],"summary":"Rename a task"}},"/api/v1/tasks/{id}/reopen":{"patch":{"operationId":"reopenTask","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}},"description":"Task reopened."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid input."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid bearer token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authenticated workspace is not entitled."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Task not found."}},"security":[{"bearerAuth":[]}],"summary":"Mark a completed task open again"}},"/api/v1/whoami":{"get":{"operationId":"whoami","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Principal"}}},"description":"Authenticated principal returned."},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Missing or invalid bearer token."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Authenticated workspace is not entitled."}},"security":[{"bearerAuth":[]}],"summary":"Show authenticated principal"}}},"security":[{"bearerAuth":[]}],"servers":[{"url":"https://api.badbank.ai"}]}