Multi-Org Data Isolator
API Contract
REST
/api/v1/org-isolation
7 endpoints
GET
/api/v1/org-isolation/api/v1/org-isolation
List isolation audit logs — records of org-scope validations performed
Public
Response Example
{
"data": [
{
"id": "iso-log-041",
"org_id": "org-bufdir-42",
"operation": "assertOrgIsolation",
"result": "passed",
"record_count": 274,
"violations": 0,
"checked_at": "2025-01-05T08:02:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 18
}
}
GET
/api/v1/org-isolation/api/v1/org-isolation/:id
Get a specific isolation audit log entry
Public
Response Example
{
"id": "iso-log-041",
"org_id": "org-bufdir-42",
"operation": "assertOrgIsolation",
"result": "passed",
"record_count": 274,
"violations": 0,
"violation_details": [],
"checked_at": "2025-01-05T08:02:00Z"
}
POST
/api/v1/org-isolation/api/v1/org-isolation
Run an org isolation assertion on a result set or record
Public
Request Example
{
"org_id": "org-bufdir-42",
"operation": "assertOrgIsolation",
"result_set": [
{
"record_id": "act-091",
"org_id": "org-bufdir-42"
},
{
"record_id": "act-092",
"org_id": "org-bufdir-42"
}
]
}
Response Example
{
"id": "iso-log-055",
"org_id": "org-bufdir-42",
"operation": "assertOrgIsolation",
"result": "passed",
"record_count": 2,
"violations": 0,
"violation_details": [],
"checked_at": "2025-03-26T09:00:00Z"
}
PUT
/api/v1/org-isolation/api/v1/org-isolation/:id
Re-run an isolation check and update the log entry
Public
Request Example
{
"org_id": "org-bufdir-42",
"result_set": [
{
"record_id": "act-091",
"org_id": "org-bufdir-42"
}
]
}
Response Example
{
"id": "iso-log-041",
"org_id": "org-bufdir-42",
"operation": "assertOrgIsolation",
"result": "passed",
"record_count": 1,
"violations": 0,
"checked_at": "2025-03-26T09:30:00Z"
}
DELETE
/api/v1/org-isolation/api/v1/org-isolation/:id
Delete an isolation audit log entry
Public
Response Example
{
"deleted": true,
"id": "iso-log-041"
}
GET
/api/v1/org-isolation/api/v1/org-isolation/current-org
Resolve and return the current organization ID from the request context
Public
Response Example
{
"org_id": "org-bufdir-42",
"resolved_from": "jwt_claims",
"resolved_at": "2025-03-26T09:00:00Z"
}
POST
/api/v1/org-isolation/api/v1/org-isolation/validate-record
Validate that a single record belongs to the specified org
Public
Request Example
{
"org_id": "org-bufdir-42",
"record": {
"record_id": "act-091",
"org_id": "org-bufdir-42",
"activity_type": "peer_support_group"
}
}
Response Example
{
"record_id": "act-091",
"org_id": "org-bufdir-42",
"ownership_valid": true,
"checked_at": "2025-03-26T09:00:00Z"
}