get__policy
⚠️ TEST ENVIRONMENT ONLY
GET /policy
List AI Policies
Retrieve a list of AI governance policies based on filtering criteria. This endpoint returns policies at various scope levels (organization, workspace, or repository) that the user has permission to view.
Query Filtering:
Required:
orgId- Organization identifierOptional:
workspaceId- Filter by workspaceOptional:
repoId- Filter by repository
Policy Hierarchy:
The endpoint returns policies based on the specified scope:
Organization-level policies (when only
orgIdis provided)Workspace-level policies (when
orgIdandworkspaceIdare provided)Repository-level policies (when
orgId,workspaceId, andrepoIdare provided)
Important Notes:
Only returns policies the user has permission to view
Results are automatically filtered based on user's workspace access
Organization admin users see all organization policies
Non-admin users only see policies for workspaces they can access
Deleted policies are excluded from results
Use Cases:
Display policies in admin dashboards
Audit and compliance reporting
Policy management interfaces
Understanding which policies apply to specific resources
TypeScript Client Library
Code Samples
Parameters
orgId
query
string
true
Organization ID to filter policies
workspaceId
query
string
false
Workspace ID to filter policies (optional)
repoId
query
string
false
Repository ID to filter policies (optional)
Example responses
200 Response
Responses
Response Schema
Status Code 200
» success
boolean
false
none
Operation success status
» policies
[object]
false
none
Array of policy objects
»» id
string
false
none
Unique identifier for the policy
»» orgId
string
false
none
Organization ID
»» name
string
false
none
Policy name
»» content
string
false
none
Policy content/rules
»» riskType
string
false
none
Risk classification (LOW, MEDIUM, HIGH)
»» actionType
integer
false
none
Action type (0=log, 1=alert, 2=block)
»» createdBy
object
false
none
User who created the policy
»»» id
string
false
none
User ID
»»» name
string
false
none
User first name
»»» lastName
string
false
none
User last name
string
false
none
User email
»» createdAt
string
false
none
ISO 8601 timestamp
»» lastUpdatedBy
object
false
none
User who last updated the policy
»»» id
string
false
none
User ID
»»» name
string
false
none
User first name
»»» lastName
string
false
none
User last name
string
false
none
User email
»» lastUpdatedAt
string
false
none
ISO 8601 timestamp
»» workspaceId
string
false
none
Workspace ID (null for org-level)
»» repoId
string
false
none
Repository ID (null for workspace/org-level)
»» workspace
object
false
none
Workspace details (if applicable)
»»» id
string
false
none
Workspace ID
»»» name
string
false
none
Workspace name
»» repo
object
false
none
Repository details (if applicable)
»»» id
string
false
none
Repository ID
»»» name
string
false
none
Repository name
Status Code 400
» success
boolean
false
none
none
» message
string
false
none
Error message
Status Code 403
» success
boolean
false
none
none
» message
string
false
none
Error message
Status Code 500
» success
boolean
false
none
none
» message
string
false
none
Error message
To perform this operation, you must be authenticated by means of one of the following methods: BearerAuth
Last updated
Was this helpful?