Repository navigation
Expand file tree
/
Copy pathopenapi.json
More file actions
1 lines (1 loc) · 72.9 KB
/
Copy pathopenapi.json
File metadata and controls
1 lines (1 loc) · 72.9 KB
1
{"openapi":"3.1.0","info":{"title":"Partly HTTP API","description":"Dashboard administration and SDK policy/usage transport. Evaluation runs locally in SDKs. JSON request bodies are limited to 16 KiB; policies to 1 MiB. Sessions expire after 12 hours or server restart. Cross-site API requests are rejected; HTTPS adds Secure to session cookies. Host and Origin checks use the actual listener, never forwarded headers.","license":{"name":"Elastic-2.0","identifier":"Elastic-2.0"},"version":"0.1.0-alpha.1"},"paths":{"/api/environments":{"get":{"tags":["Session"],"summary":"List environments and the signed-in account permissions.","operationId":"environments","parameters":[],"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environments"}}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/api/environments/{env}/apps":{"get":{"tags":["Applications"],"summary":"List applications and keys; secrets are null for viewers/editors and revoked keys.","operationId":"applications","parameters":[{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Applications"}}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]},"post":{"tags":["Applications"],"summary":"Create an application with selected flags and its first named API Key.","operationId":"create_application","parameters":[{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Partly-Request","in":"header","description":"Must equal dashboard for every dashboard write, including setup/login/logout.","required":true,"schema":{"type":"string","enum":["dashboard"]},"example":"dashboard"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationInput"}}},"required":true},"responses":{"201":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"400":{"description":"Malformed JSON or invalid request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Conflict, duplicate, or stale flag impact token","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"413":{"description":"Request exceeds 16 KiB","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected JSON content type","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"JSON does not match the request schema","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/api/environments/{env}/apps/{id}":{"put":{"tags":["Applications"],"summary":"Update application name and selected flags; keep the permanent ID.","operationId":"save_application","parameters":[{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Partly-Request","in":"header","description":"Must equal dashboard for every dashboard write, including setup/login/logout.","required":true,"schema":{"type":"string","enum":["dashboard"]},"example":"dashboard"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationInput"}}},"required":true},"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}}},"400":{"description":"Malformed JSON or invalid request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Requested item not found","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Conflict, duplicate, or stale flag impact token","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"413":{"description":"Request exceeds 16 KiB","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected JSON content type","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"JSON does not match the request schema","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/api/environments/{env}/apps/{id}/keys":{"post":{"tags":["Applications"],"summary":"Create an additional named API Key.","operationId":"create_key","parameters":[{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Partly-Request","in":"header","description":"Must equal dashboard for every dashboard write, including setup/login/logout.","required":true,"schema":{"type":"string","enum":["dashboard"]},"example":"dashboard"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyName"}}},"required":true},"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SdkKey"}}}},"400":{"description":"Malformed JSON or invalid request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Requested item not found","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"413":{"description":"Request exceeds 16 KiB","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected JSON content type","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"JSON does not match the request schema","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/api/environments/{env}/audits":{"get":{"tags":["Audits"],"summary":"Read at most 100 audit entries, newest first; use the last ID as before for the next page.","operationId":"audits","parameters":[{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"before","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"action","in":"query","required":false,"schema":{"type":"string"}},{"name":"application_id","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Audits"}}}},"400":{"description":"Malformed parameters or invalid request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/api/environments/{env}/flags":{"get":{"tags":["Flags"],"summary":"List shared flags in an environment.","operationId":"flags","parameters":[{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Flag"},"propertyNames":{"type":"string"}}}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]},"post":{"tags":["Flags"],"summary":"Create a flag and return its saved state.","operationId":"create_flag","parameters":[{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Partly-Request","in":"header","description":"Must equal dashboard for every dashboard write, including setup/login/logout.","required":true,"schema":{"type":"string","enum":["dashboard"]},"example":"dashboard"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFlag"}}},"required":true},"responses":{"201":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFlag"}}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Conflict, duplicate, or stale flag impact token","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"413":{"description":"Request exceeds 16 KiB","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected JSON content type","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"Invalid JSON shape, condition or number","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/api/environments/{env}/flags/{key}":{"put":{"tags":["Flags"],"summary":"Save a flag after reviewing affected applications and confirming the exact environment/flag name.","operationId":"save_flag","parameters":[{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Partly-Confirm","in":"header","description":"Exact case-sensitive environment/flag_name","required":true,"schema":{"type":"string"}},{"name":"X-Partly-Impact","in":"header","description":"Token returned by the impact endpoint; stale previews return 409","required":true,"schema":{"type":"string"}},{"name":"X-Partly-Request","in":"header","description":"Must equal dashboard for every dashboard write, including setup/login/logout.","required":true,"schema":{"type":"string","enum":["dashboard"]},"example":"dashboard"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Flag"}}},"required":true},"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedFlag"}}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Requested item not found","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Conflict, duplicate, or stale flag impact token","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"413":{"description":"Request exceeds 16 KiB","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected JSON content type","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"Invalid JSON shape, condition or number","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]},"delete":{"tags":["Flags"],"summary":"Delete a flag after reviewing affected applications and confirming the exact environment/flag name.","operationId":"delete_flag","parameters":[{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Partly-Confirm","in":"header","description":"Exact case-sensitive environment/flag_name","required":true,"schema":{"type":"string"}},{"name":"X-Partly-Impact","in":"header","description":"Token returned by the impact endpoint; stale previews return 409","required":true,"schema":{"type":"string"}},{"name":"X-Partly-Request","in":"header","description":"Must equal dashboard for every dashboard write, including setup/login/logout.","required":true,"schema":{"type":"string","enum":["dashboard"]},"example":"dashboard"}],"responses":{"204":{"description":"No content","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Requested item not found","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Conflict, duplicate, or stale flag impact token","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/api/environments/{env}/flags/{key}/impact":{"get":{"tags":["Flags"],"summary":"Read affected applications and the current confirmation token.","operationId":"flag_impact","parameters":[{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Impact"}}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Requested item not found","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/api/environments/{env}/types":{"get":{"tags":["Types"],"summary":"List named result types in this environment.","operationId":"types","parameters":[{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Named types","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TypeDefinition"},"propertyNames":{"type":"string"}}}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]},"post":{"tags":["Types"],"summary":"Create an immutable named enum or record. Names remain reserved after deletion.","operationId":"create_type","parameters":[{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Partly-Request","in":"header","description":"Must equal dashboard for every dashboard write, including setup/login/logout.","required":true,"schema":{"type":"string","enum":["dashboard"]},"example":"dashboard"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamedTypeInput"}}},"required":true},"responses":{"201":{"description":"Created type","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamedTypeInput"}}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Name already used","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/api/environments/{env}/types/{name}":{"delete":{"tags":["Types"],"summary":"Delete an unused type. Its name stays reserved to prevent changes in meaning.","operationId":"delete_type","parameters":[{"name":"env","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Partly-Request","in":"header","description":"Must equal dashboard for every dashboard write, including setup/login/logout.","required":true,"schema":{"type":"string","enum":["dashboard"]},"example":"dashboard"}],"responses":{"204":{"description":"Deleted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Unknown type","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Type still referenced","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/api/environments/{env}/usage":{"get":{"tags":["Flags"],"summary":"Read last reported usage per API Key and flag; missing reports do not prove a flag is unused.","operationId":"flag_usage","parameters":[{"name":"env","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/api/keys/{id}":{"put":{"tags":["Applications"],"summary":"Rename an active API Key.","operationId":"rename_key","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Partly-Request","in":"header","description":"Must equal dashboard for every dashboard write, including setup/login/logout.","required":true,"schema":{"type":"string","enum":["dashboard"]},"example":"dashboard"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyName"}}},"required":true},"responses":{"204":{"description":"No content","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}}},"400":{"description":"Malformed JSON or invalid request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Requested item not found","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"413":{"description":"Request exceeds 16 KiB","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected JSON content type","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"JSON does not match the request schema","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]},"delete":{"tags":["Applications"],"summary":"Revoke an API Key; connected SDKs clear policy when they next receive confirmed revocation.","operationId":"revoke_key","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Partly-Request","in":"header","description":"Must equal dashboard for every dashboard write, including setup/login/logout.","required":true,"schema":{"type":"string","enum":["dashboard"]},"example":"dashboard"}],"responses":{"204":{"description":"No content","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Requested item not found","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/api/login":{"post":{"tags":["Session"],"summary":"Sign in; five attempts per peer IP per minute.","operationId":"login","parameters":[{"name":"X-Partly-Request","in":"header","description":"Must equal dashboard for every dashboard write, including setup/login/logout.","required":true,"schema":{"type":"string","enum":["dashboard"]},"example":"dashboard"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}},"required":true},"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"},"Set-Cookie":{"schema":{"type":"string"},"description":"HttpOnly; SameSite=Strict; Path=/; Secure on HTTPS. Max-Age=43200, or 0 for logout."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResult"}}}},"400":{"description":"Malformed JSON or invalid request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Invalid credentials or disabled account","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"413":{"description":"Request exceeds 16 KiB","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected JSON content type","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"JSON does not match the request schema","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"Password workers busy or login throttled","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"},"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":0},"description":"60 seconds"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/api/logout":{"post":{"tags":["Session"],"summary":"Clear the current session.","operationId":"logout","parameters":[{"name":"X-Partly-Request","in":"header","description":"Must equal dashboard for every dashboard write, including setup/login/logout.","required":true,"schema":{"type":"string","enum":["dashboard"]},"example":"dashboard"}],"responses":{"204":{"description":"No content","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"},"Set-Cookie":{"schema":{"type":"string"},"description":"HttpOnly; SameSite=Strict; Path=/; Secure on HTTPS. Max-Age=43200, or 0 for logout."}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/api/policy":{"get":{"tags":["SDK"],"summary":"Download the application policy; authenticate before checking If-None-Match.","description":"A 200 contains the complete selected policy and a quoted SHA-256 content ETag.\nIdentical saves and changes outside the application selection keep its ETag unchanged.\nThe revision increases only when that application's selected policy changes.\nA confirmed key_revoked response clears SDK policy even if the ETag matched;\nordinary errors preserve the last accepted snapshot.","operationId":"policy","parameters":[{"name":"If-None-Match","in":"header","description":"Previously accepted quoted ETag; weak tags, lists and wildcard are supported","required":false,"schema":{"type":["string","null"]}},{"name":"X-Partly-Environment","in":"header","description":"Exact environment bound to the API Key","required":true,"schema":{"type":"string"}},{"name":"X-Partly-Application","in":"header","description":"Exact application ID bound to the API Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"},"ETag":{"schema":{"type":"string"},"description":"Quoted SHA-256 content hash"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}}},"304":{"description":"Unchanged policy; no body","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"},"ETag":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Invalid key/scope, or confirmed revocation with code key_revoked and X-Partly-Error header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"},"X-Partly-Error":{"schema":{"type":"string"},"description":"key_revoked only for confirmed revocation"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"api_key":[]}]}},"/api/setup":{"post":{"tags":["Session"],"summary":"Complete first setup and start an administrator session.","operationId":"setup","parameters":[{"name":"X-Partly-Request","in":"header","description":"Must equal dashboard for every dashboard write, including setup/login/logout.","required":true,"schema":{"type":"string","enum":["dashboard"]},"example":"dashboard"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}},"required":true},"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"},"Set-Cookie":{"schema":{"type":"string"},"description":"HttpOnly; SameSite=Strict; Path=/; Secure on HTTPS. Max-Age=43200, or 0 for logout."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResult"}}}},"400":{"description":"Malformed JSON or invalid request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"text/plain":{"schema":{"type":"string"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Conflict, duplicate, or stale flag impact token","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"413":{"description":"Request exceeds 16 KiB","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected JSON content type","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"JSON does not match the request schema","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"Password workers busy or login throttled","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"},"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":0},"description":"60 seconds"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/api/status":{"get":{"tags":["Session"],"summary":"Read setup and session state.","operationId":"status","parameters":[],"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/api/usage":{"post":{"tags":["SDK"],"summary":"Report distinct known flag checks; ignore names no longer assigned; receipt time is stored without changing policy or audits.","operationId":"report_usage","parameters":[{"name":"X-Partly-Environment","in":"header","description":"Exact environment bound to the API Key","required":true,"schema":{"type":"string"}},{"name":"X-Partly-Application","in":"header","description":"Exact application ID bound to the API Key","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageInput"}}},"required":true},"responses":{"204":{"description":"No content","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Invalid key/scope, or confirmed revocation with code key_revoked and X-Partly-Error header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"},"X-Partly-Error":{"schema":{"type":"string"},"description":"key_revoked only for confirmed revocation"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"413":{"description":"Request exceeds 16 KiB","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"api_key":[]}]}},"/api/users":{"get":{"tags":["Users"],"summary":"List accounts and permissions.","operationId":"users","parameters":[],"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users"}}}},"400":{"description":"Invalid request or missing/invalid Host header","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]},"post":{"tags":["Users"],"summary":"Create an account; password is required.","operationId":"create_user","parameters":[{"name":"X-Partly-Request","in":"header","description":"Must equal dashboard for every dashboard write, including setup/login/logout.","required":true,"schema":{"type":"string","enum":["dashboard"]},"example":"dashboard"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserInput"}}},"required":true},"responses":{"201":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Malformed JSON or invalid request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Conflict, duplicate, or stale flag impact token","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"413":{"description":"Request exceeds 16 KiB","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected JSON content type","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"JSON does not match the request schema","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"Password workers busy or login throttled","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"},"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":0},"description":"60 seconds"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}},"/api/users/{id}":{"put":{"tags":["Users"],"summary":"Update an account; password is optional; changes invalidate its sessions.","operationId":"update_user","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"X-Partly-Request","in":"header","description":"Must equal dashboard for every dashboard write, including setup/login/logout.","required":true,"schema":{"type":"string","enum":["dashboard"]},"example":"dashboard"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInput"}}},"required":true},"responses":{"200":{"description":"Success","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Malformed JSON or invalid request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}},"text/plain":{"schema":{"type":"string"}}}},"401":{"description":"Authentication required or credentials invalid","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"Insufficient permissions, missing dashboard header, or rejected Origin/cross-site request","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"Requested item not found","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"Conflict, duplicate, or stale flag impact token","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"413":{"description":"Request exceeds 16 KiB","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"415":{"description":"Expected JSON content type","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"421":{"description":"Hostname is not allowed","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"JSON does not match the request schema","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"Password workers busy or login throttled","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"},"Retry-After":{"schema":{"type":"integer","format":"int32","minimum":0},"description":"60 seconds"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"Internal failure; details are omitted","headers":{"Cache-Control":{"schema":{"type":"string"},"example":"no-store"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"session":[]}]}}},"components":{"schemas":{"AppReference":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"Application":{"type":"object","required":["id","name","flags","keys"],"properties":{"flags":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"keys":{"type":"array","items":{"$ref":"#/components/schemas/SdkKey"}},"name":{"type":"string"}}},"ApplicationInput":{"type":"object","required":["name","flags"],"properties":{"flags":{"type":"array","items":{"type":"string"}},"name":{"type":"string"}},"additionalProperties":false},"Applications":{"type":"object","required":["applications"],"properties":{"applications":{"type":"array","items":{"$ref":"#/components/schemas/Application"}}}},"AuditEntry":{"type":"object","required":["id","actor","action","item_type","item_id","item_name","details","created_at"],"properties":{"action":{"type":"string"},"actor":{"type":"string"},"created_at":{"type":"string","description":"Server UTC timestamp in SQLite's YYYY-MM-DD HH:MM:SS format."},"details":{"type":"object","description":"Event-specific states: before/after, affected applications, or key/account metadata.\nCreation has a null before; deletion has a null after. Never includes full credentials."},"id":{"type":"integer","format":"int64"},"item_id":{"type":"string"},"item_name":{"type":"string"},"item_type":{"type":"string"}}},"Audits":{"type":"object","required":["audits"],"properties":{"audits":{"type":"array","items":{"$ref":"#/components/schemas/AuditEntry"},"maxItems":100}}},"Condition":{"oneOf":[{"type":"object","required":["k","op","v"],"properties":{"k":{"type":"string","description":"Nonblank flat context key without control characters.","minLength":1},"op":{"type":"string","enum":["le"]},"v":{"type":"number"}},"additionalProperties":false},{"type":"object","required":["k","op","v"],"properties":{"k":{"type":"string","description":"Nonblank flat context key without control characters.","minLength":1},"op":{"type":"string","enum":["lt"]},"v":{"type":"number"}},"additionalProperties":false},{"type":"object","required":["k","op","v"],"properties":{"k":{"type":"string","description":"Nonblank flat context key without control characters.","minLength":1},"op":{"type":"string","enum":["ge"]},"v":{"type":"number"}},"additionalProperties":false},{"type":"object","required":["k","op","v"],"properties":{"k":{"type":"string","description":"Nonblank flat context key without control characters.","minLength":1},"op":{"type":"string","enum":["gt"]},"v":{"type":"number"}},"additionalProperties":false},{"type":"object","required":["k","op","v"],"properties":{"k":{"type":"string","description":"Nonblank flat context key without control characters.","minLength":1},"op":{"type":"string","enum":["eq"]},"v":{"type":"number"}},"additionalProperties":false},{"type":"object","required":["k","op","v"],"properties":{"k":{"type":"string","description":"Nonblank flat context key without control characters.","minLength":1},"op":{"type":"string","enum":["prefix"]},"v":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["k","op","v"],"properties":{"k":{"type":"string","description":"Nonblank flat context key without control characters.","minLength":1},"op":{"type":"string","enum":["suffix"]},"v":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["k","op","v"],"properties":{"k":{"type":"string","description":"Nonblank flat context key without control characters.","minLength":1},"op":{"type":"string","enum":["contains"]},"v":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["k","op","v"],"properties":{"k":{"type":"string","description":"Nonblank flat context key without control characters.","minLength":1},"op":{"type":"string","enum":["matches"]},"v":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["k","op","v"],"properties":{"k":{"type":"string","description":"Nonblank flat context key without control characters.","minLength":1},"op":{"type":"string","enum":["regex"]},"v":{"type":"string"}},"additionalProperties":false},{"type":"object","required":["k","op","v"],"properties":{"k":{"type":"string","description":"Nonblank flat context key without control characters.","minLength":1},"op":{"type":"string","enum":["is"]},"v":{"type":"boolean"}},"additionalProperties":false}]},"CreateUserInput":{"type":"object","required":["username","is_admin","enabled","permissions","password"],"properties":{"enabled":{"type":"boolean"},"is_admin":{"type":"boolean"},"password":{"type":"string","description":"Required when creating an account; omit or use null to keep it on update.","writeOnly":true},"permissions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Role"},"propertyNames":{"type":"string"}},"username":{"type":"string"}},"additionalProperties":false},"Credentials":{"type":"object","required":["username","password"],"properties":{"password":{"type":"string","writeOnly":true},"username":{"type":"string"}},"additionalProperties":false},"Environments":{"type":"object","required":["project","environments","user"],"properties":{"environments":{"type":"array","items":{"type":"string"}},"project":{"type":"string"},"user":{"$ref":"#/components/schemas/User"}}},"ErrorBody":{"type":"object","required":["error"],"properties":{"code":{"oneOf":[{"$ref":"#/components/schemas/RevocationCode"},{"type":"null"}]},"error":{"type":"string"}}},"Flag":{"oneOf":[{"type":"object","required":["result_type","selected","other","rollout","mode"],"properties":{"mode":{"type":"string","enum":["typed"]},"other":{},"result_type":{"type":"string"},"rollout":{"allOf":[{"$ref":"#/components/schemas/Flag"},{"type":"object","properties":{"mode":{"type":"string","enum":["enabled","disabled","percentage","custom"]}}}]},"selected":{}},"maxProperties":5},{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","enum":["enabled"]}},"maxProperties":1},{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","enum":["disabled"]}},"maxProperties":1},{"type":"object","required":["percentage","mode"],"properties":{"mode":{"type":"string","enum":["percentage"]},"percentage":{"type":"integer","format":"int32","maximum":100,"minimum":0}},"maxProperties":2},{"type":"object","required":["action","groups","mode"],"properties":{"action":{"$ref":"#/components/schemas/MatchAction"},"groups":{"type":"array","items":{"type":"array","items":{"$ref":"#/components/schemas/Condition"},"minItems":1},"description":"OR between groups; AND within each group. Both levels must be nonempty.","minItems":1},"mode":{"type":"string","enum":["custom"]}},"maxProperties":3}]},"FlagUsage":{"type":"object","required":["api_key_id","key_name","application_id","application_name","flag_key","last_used_at"],"properties":{"api_key_id":{"type":"string"},"application_id":{"type":"string"},"application_name":{"type":"string"},"flag_key":{"type":"string"},"key_name":{"type":"string"},"last_used_at":{"type":"string"}}},"Impact":{"type":"object","required":["applications","token"],"properties":{"applications":{"type":"array","items":{"$ref":"#/components/schemas/AppReference"}},"token":{"type":"string","description":"Supply this token unchanged as X-Partly-Impact when saving or deleting."}}},"KeyName":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}},"additionalProperties":false},"LoginResult":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"}}},"MatchAction":{"type":"string","enum":["enable","disable"]},"NamedTypeInput":{"type":"object","required":["name","definition"],"properties":{"definition":{"$ref":"#/components/schemas/TypeDefinition"},"name":{"type":"string"}},"additionalProperties":false},"Policy":{"type":"object","required":["schema_version","project","environment","application_id","revision","flags"],"properties":{"application_id":{"type":"string"},"environment":{"type":"string"},"flags":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Flag"},"propertyNames":{"type":"string"}},"project":{"type":"string"},"revision":{"type":"integer","format":"int64","minimum":0},"schema_version":{"type":"integer","format":"int32","maximum":2,"minimum":1},"types":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TypeDefinition"},"propertyNames":{"type":"string"}}},"additionalProperties":false},"RevocationCode":{"type":"string","enum":["key_revoked"]},"Role":{"type":"string","enum":["viewer","editor","manager"]},"SavedFlag":{"oneOf":[{"type":"object","required":["result_type","selected","other","rollout","mode","key"],"properties":{"key":{"type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"mode":{"type":"string","enum":["typed"]},"other":{},"result_type":{"type":"string"},"rollout":{"allOf":[{"$ref":"#/components/schemas/Flag"},{"type":"object","properties":{"mode":{"type":"string","enum":["enabled","disabled","percentage","custom"]}}}]},"selected":{}},"maxProperties":6},{"type":"object","required":["mode","key"],"properties":{"key":{"type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"mode":{"type":"string","enum":["enabled"]}},"maxProperties":2},{"type":"object","required":["mode","key"],"properties":{"key":{"type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"mode":{"type":"string","enum":["disabled"]}},"maxProperties":2},{"type":"object","required":["percentage","mode","key"],"properties":{"key":{"type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"mode":{"type":"string","enum":["percentage"]},"percentage":{"type":"integer","format":"int32","maximum":100,"minimum":0}},"maxProperties":3},{"type":"object","required":["action","groups","mode","key"],"properties":{"action":{"$ref":"#/components/schemas/MatchAction"},"groups":{"type":"array","items":{"type":"array","items":{"$ref":"#/components/schemas/Condition"},"minItems":1},"description":"OR between groups; AND within each group. Both levels must be nonempty.","minItems":1},"key":{"type":"string","pattern":"^[a-z0-9_-]{1,64}$"},"mode":{"type":"string","enum":["custom"]}},"maxProperties":4}]},"SdkKey":{"type":"object","required":["id","name","secret","masked_secret","created_at","revoked_at","last_used_at"],"properties":{"created_at":{"type":"string"},"id":{"type":"string"},"last_used_at":{"type":["string","null"]},"masked_secret":{"type":"string"},"name":{"type":"string"},"revoked_at":{"type":["string","null"]},"secret":{"type":["string","null"],"description":"Null for revoked keys and for viewers/editors. Never returned after revocation."}}},"Status":{"type":"object","required":["setup_required","authenticated"],"properties":{"authenticated":{"type":"boolean"},"setup_required":{"type":"boolean"}}},"TypeDefinition":{"oneOf":[{"type":"object","required":["values","kind"],"properties":{"kind":{"type":"string","enum":["enum"]},"values":{"type":"array","items":{"type":"string"},"maxItems":64,"minItems":1}},"maxProperties":2},{"type":"object","required":["fields","kind"],"properties":{"fields":{"type":"object","additionalProperties":{"type":"string"},"maxProperties":32,"minProperties":1},"kind":{"type":"string","enum":["record"]}},"maxProperties":2}]},"Usage":{"type":"object","required":["usage"],"properties":{"usage":{"type":"array","items":{"$ref":"#/components/schemas/FlagUsage"}}}},"UsageInput":{"type":"object","required":["flags"],"properties":{"flags":{"type":"array","items":{"type":"string"},"maxItems":128}},"additionalProperties":false},"User":{"type":"object","required":["id","username","is_admin","enabled","permissions"],"properties":{"enabled":{"type":"boolean"},"id":{"type":"integer","format":"int64"},"is_admin":{"type":"boolean"},"permissions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Role"},"propertyNames":{"type":"string"}},"username":{"type":"string"}}},"UserInput":{"type":"object","required":["username","is_admin","enabled","permissions"],"properties":{"enabled":{"type":"boolean"},"is_admin":{"type":"boolean"},"password":{"type":["string","null"],"description":"Required when creating an account; omit or use null to keep it on update.","writeOnly":true},"permissions":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Role"},"propertyNames":{"type":"string"}},"username":{"type":"string"}},"additionalProperties":false},"Users":{"type":"object","required":["users"],"properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}},"securitySchemes":{"api_key":{"type":"http","scheme":"bearer"},"session":{"type":"apiKey","in":"cookie","name":"partly_session"}}},"tags":[{"name":"Session","description":"Setup and dashboard authentication"},{"name":"Types","description":"Immutable named result schemas. Viewer reads; Manager or higher creates and deletes unused types."},{"name":"Flags","description":"Viewer reads; Editor or higher writes"},{"name":"Applications","description":"Viewer reads; Manager or higher writes. Only managers and administrators receive key secrets."},{"name":"Users","description":"Instance administrator only"},{"name":"Audits","description":"Environment-scoped, read-only history; Viewer or higher"},{"name":"SDK","description":"Application-scoped API Keys. Cannot perform dashboard administration."}]}