Documentation
API Response Contract
Project-Agent / arxsec-api/API_CONTRACT.md
All JSON API endpoints follow a standardized envelope:
- Success:
{ "success": true, "error": null, "data": <payload> }- Error:
{ "success": false, "error": { "code": "...", "message": "...", "details": ..., "request_id": "..." }, "data": null }
Status Codes
200/201/202/204: successful operations400: malformed request semantics401: unauthenticated request403: unauthorized request404: resource not found409: conflict422: schema validation failures429: rate-limited request500: unhandled internal error502/504: upstream dependency failures and timeouts
Validation
- FastAPI request body, query, and path validation is schema-first via Pydantic models.
- Validation failures return
422witherror.details.
Compatibility Exceptions
The following endpoints keep protocol-specific response shapes:
- SAML endpoints (
/v1/auth/saml/*) keep XML/redirect wire contracts. - SCIM endpoints (
/v1/scim/*) keep SCIM-compatible media types and schemas. - Interactive webhook callbacks (
/integrations/slack/interactions,/v1/webhooks/slack/interactions,/v1/webhooks/teams/interactions) keep provider-required callback payloads.
All other JSON endpoints are normalized through shared contract middleware and global exception handling.