Get Policy Dashboard
Sprint 3
Get policy dashboard summary with statistics grouped by policy type.
Endpoint
GET /api/v1/policies/dashboard
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <access_token> |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspace_id | integer | No | Filter by workspace ID |
Response
Success (200)
{
"success": true,
"data": {
"row_level_security": {
"type": "row_level_security",
"name": "Row-Level Security",
"description": "Filter rows based on user context",
"total_policies": 5,
"active_policies": 3,
"is_active": true
},
"data_masking": {
"type": "data_masking",
"name": "Data Masking",
"description": "Mask sensitive data in query results",
"total_policies": 3,
"active_policies": 2,
"is_active": true
},
"query_limits": {
"type": "query_limit",
"name": "Query Limits",
"description": "Limit query execution",
"total_policies": 2,
"active_policies": 1,
"is_active": true
}
},
"message": "Policy dashboard summary retrieved successfully"
}
Error Codes
| Status | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Invalid or missing authentication token |
| 500 | INTERNAL_SERVER_ERROR | Internal server error |
Features
- Statistics grouped by policy type
- Total and active policy counts per type
- Optional workspace filtering
- Organization-scoped
Example
curl -X GET "https://api.rivergen.com/api/v1/policies/dashboard?workspace_id=1" \
-H "Authorization: Bearer <access_token>"
Related Endpoints
- List Policies - List all policies