-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.json
More file actions
1 lines (1 loc) · 4.24 KB
/
openapi.json
File metadata and controls
1 lines (1 loc) · 4.24 KB
1
{"openapi":"3.1.0","info":{"title":"GovernsAI Precheck","description":"Policy evaluation and PII redaction service for GovernsAI","version":"0.1.0"},"paths":{"/v1/health":{"get":{"summary":"Health","description":"Health check endpoint","operationId":"health_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/ready":{"get":{"summary":"Ready","description":"Readiness check endpoint\n\nPerforms comprehensive checks to ensure the service is ready to handle requests:\n- Presidio analyzer and anonymizer initialization\n- Policy file parsing and validation\n- Core dependencies availability","operationId":"ready_v1_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/metrics":{"get":{"summary":"Metrics","description":"Prometheus metrics endpoint\n\nReturns metrics in Prometheus text format for monitoring and alerting.\nIncludes counters, histograms, and gauges for request tracking, performance\nmonitoring, and system health.","operationId":"metrics_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/u/{user_id}/precheck":{"post":{"summary":"Precheck","description":"Precheck endpoint for policy evaluation and PII redaction","operationId":"precheck_v1_u__user_id__precheck_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"X-Governs-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Governs-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrePostCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/u/{user_id}/postcheck":{"post":{"summary":"Postcheck","description":"Postcheck endpoint for post-execution validation","operationId":"postcheck_v1_u__user_id__postcheck_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"X-Governs-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Governs-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrePostCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DecisionResponse":{"properties":{"decision":{"type":"string","title":"Decision"},"payload_out":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload Out"},"reasons":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Reasons"},"policy_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Id"},"ts":{"type":"integer","title":"Ts"}},"type":"object","required":["decision","ts"],"title":"DecisionResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PrePostCheckRequest":{"properties":{"tool":{"type":"string","title":"Tool"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"corr_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Corr Id"}},"type":"object","required":["tool","payload"],"title":"PrePostCheckRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}