Access Control API Schemas
Violations over time (/api/v1/data-consumer/requests)

* params
    * date range (actual datetime)
    * policy (/api/v1/policy)
    * data_uses (/api/v1/taxonomy/data_use)


Violation rate (/api/v1/data-consumer/requests)

* violations
* total_requests
* [{“timestamp”: ..., “requests”: ..., “violations”: ...}]


Data consumers (/api/v1/data_consumer/requests)

* order by (violation count, request count)
* name (data_consumer.name)
* violations
* total_requests
* [{“name”: ..., “requests”: ..., “violations”: ...}]


Findings /api/v1/policy/violations (paginated aggregate view)

* Filter by policy, control
    Sort by violation_count, last_violation
* policy (policy name)
* control (control name)
* violation_count
* last_violation
* page ...
      items: [{“policy”: ..., “control”: ..., “violation_count”: ... “last_violation” ...}]

/api/v1/policy/violations/logs

* timestamp
* consumer (data_consumer.name)
* policy (policy.name)
* dataset
* data_use
* page ...
      items: [{“timestamp”: ..., “consumer”: ..., “policy”: ... “dataset” ..., “data_use”: ...}]


/api/v1/policy/violations/{id}/reason (generated on-demand)

/api/v1/policy/violations/{id}

{
  "data_consumer": {
    "name": ...
    "email": ...
    "type": 
  },
  "details": {
    "timestamp" ...,
    "system": ...,
    "dataset": ...,
    "collection" ...,
  "request_context": "RAW SQL",
  "policy": {
    "name": ...,
    "description": ...,
    "policy_id" ...
}

