Push all active Rego policies into OPA (admin only)
POST
/api/v1/policies/sync-opa
const url = 'https://example.com/api/v1/policies/sync-opa';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/policies/sync-opa \ --header 'Authorization: Bearer <token>'Push shared Rego libraries and all active policies into OPA.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
object
success
required
boolean
data
required
Response Sync Opa Api V1 Policies Sync Opa Post
object
key
additional properties
integer
Example
{ "success": true}Unauthorized
Media typeapplication/json
ErrorResponse
object
Example
{ "error": { "code": "not_found", "correlation_id": "0f4b9a2e-6c2b-4f0e-9a4a-1c2b3d4e5f60", "message": "AI system not found." }}Forbidden
Media typeapplication/json
ErrorResponse
object
Example
{ "error": { "code": "not_found", "correlation_id": "0f4b9a2e-6c2b-4f0e-9a4a-1c2b3d4e5f60", "message": "AI system not found." }}Not Found
Media typeapplication/json
ErrorResponse
object
Example
{ "error": { "code": "not_found", "correlation_id": "0f4b9a2e-6c2b-4f0e-9a4a-1c2b3d4e5f60", "message": "AI system not found." }}