Base URL
http://localhost:8004/api/v1/comply
Endpoints
/api/v1/comply/healthHealth check — returns service status
/api/v1/comply/frameworksList all compliance frameworks
/api/v1/comply/frameworks/{id}Get framework details with requirements
/api/v1/comply/assessRun a compliance assessment
/api/v1/comply/reportsList all assessment reports
/api/v1/comply/reports/{id}Get a specific assessment report
/api/v1/comply/gapsGet compliance gaps from a report
/api/v1/comply/certificateGenerate a compliance certificate
GET /api/v1/comply/frameworks
List all available compliance frameworks.
curl http://localhost:8004/api/v1/comply/frameworks
Returns an array of framework summaries including ID, name, version, region, and requirement count.
GET /api/v1/comply/frameworks/{id}
Get full framework details including all requirements with categories, weights, and descriptions.
curl http://localhost:8004/api/v1/comply/frameworks/uae-ai-ethics
POST /api/v1/comply/assess
Run a compliance assessment against one or more frameworks.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
framework_ids | string[] | Yes | Framework IDs to assess against (pass multiple times for multi-framework) |
Request:
{
"system_name": "Anar Chat",
"system_type": "conversational_ai",
"risk_level": "medium",
"data_types": ["personal_data", "government_data"],
"deployment_region": "uae",
"features": {
"has_audit_trail": true,
"has_bias_detection": true,
"has_human_oversight": true,
"has_data_encryption": true,
"has_consent_mechanism": false,
"has_explainability": true
}
}
Response:
{
"id": "rpt-001",
"system_name": "Anar Chat",
"overall_score": 78.5,
"framework_scores": {
"uae-ai-ethics": 82.0,
"sdaia-ai-ethics": 75.0
},
"total_requirements": 24,
"met_requirements": 19,
"gap_count": 5,
"assessed_at": "2024-01-15T10:30:00Z"
}
GET /api/v1/comply/reports
List all assessment reports.
curl http://localhost:8004/api/v1/comply/reports
GET /api/v1/comply/reports/{id}
Get a specific assessment report with full scoring details.
curl http://localhost:8004/api/v1/comply/reports/rpt-001
GET /api/v1/comply/gaps
Retrieve compliance gaps from a specific report. Supports filtering by framework and severity.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
report_id | string | Yes | Assessment report ID |
framework_id | string | No | Filter gaps to a specific framework |
severity | string | No | Filter by severity: critical, high, medium, low |
curl "http://localhost:8004/api/v1/comply/gaps?report_id=rpt-001&severity=high"
Response:
[
{
"requirement_id": "req-005",
"framework_id": "uae-ai-ethics",
"requirement": "Consent mechanism for data collection",
"severity": "high",
"status": "not_met",
"remediation": "Implement explicit user consent flow before data collection"
}
]
POST /api/v1/comply/certificate
Generate a compliance certificate from an assessment report.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
report_id | string | Yes | Assessment report to base the certificate on |
Request:
{
"organization": "Abu Dhabi Government",
"issued_to": "Anar Chat System",
"valid_months": 12
}
Response:
{
"certificate_id": "cert-001",
"organization": "Abu Dhabi Government",
"system_name": "Anar Chat",
"frameworks": ["uae-ai-ethics", "sdaia-ai-ethics"],
"overall_score": 78.5,
"issued_at": "2024-01-15T10:30:00Z",
"valid_until": "2025-01-15T10:30:00Z"
}
Certificate Validity
The default validity period is 12 months. Adjust valid_months based on your organization's compliance review cadence and regulatory requirements.
Environment Variables
| Variable | Default | Description |
|---|---|---|
COMPLY_FRAMEWORKS_DIR | <project>/frameworks | Directory containing framework JSON definitions |
COMPLY_CORS_ORIGINS | ["http://localhost:3004","http://localhost:3000"] | Allowed CORS origins |
MCP Server
Comply exposes a Model Context Protocol server at /mcp, enabling integration with AI assistants and development tools that support the MCP specification.