v5
latestOpenAPI 3.1.02026-07-31151195455.5 KBopal-queries
Run an ad-hoc OpalQuery
Runs an ad-hoc OpalQuery and returns the results. Supports NODE queries (users, resources, groups) and ACCESS_PATH queries (principal-to-entitlement access edges). This endpoint is only available to our OpalQuery beta group. Please contact Opal support if you'd like to be added to the beta.
post/queries/run
Request body
Example request
{
"type": "NODE",
"query": {
"nodeFilters": {
"entityTypes": [
"RESOURCE"
],
"entityTag": {
"key": "env",
"value": "prod"
}
},
"accessFilters": {
"isAccessibleBy": {
"entityTypes": [
"USER"
],
"entityTag": {
"key": "contractor"
}
}
}
},
"first": 50
}Response
The results of the OpalQuery.
Example response
{
"edges": [
{
"node": {
"entityItemType": "OPAL_ROLE"
}
}
]
}