Query API
Execute a simple query
This API queries the document at /data/system/main by default (however, you can configure OPA to use a different path to serve these queries). That document defines the response. For example, use the following in PUT /v1/policies/{path}) to define a rule that will produce a value for the /data/system/main document:
package system
main = msg {
msg := sprintf("hello, %v", input.user)
}
The server will return a not found (404) response if /data/system/main is undefined.
post/
Query parameters
prettyboolean
If true, response will be in a human-readable format.
Request body
QueryInputSchema required
Response
Success