curl --request POST \
--url https://api.osohq.com/api/evaluate_query_local \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": {
"predicate": [
"<unknown>"
],
"calls": [
[
"<unknown>"
]
],
"constraints": {},
"context_facts": [
{
"predicate": "<string>",
"args": [
{
"type": "<string>",
"id": "<string>"
}
]
}
]
},
"data_bindings": "<string>",
"mode": {
"mode": "select",
"query_vars_to_output_column_names": {}
}
}
'{
"sql": "<string>"
}Fetches a SQL query that can be run against your database to answer arbitrary questions about authorization.
curl --request POST \
--url https://api.osohq.com/api/evaluate_query_local \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": {
"predicate": [
"<unknown>"
],
"calls": [
[
"<unknown>"
]
],
"constraints": {},
"context_facts": [
{
"predicate": "<string>",
"args": [
{
"type": "<string>",
"id": "<string>"
}
]
}
]
},
"data_bindings": "<string>",
"mode": {
"mode": "select",
"query_vars_to_output_column_names": {}
}
}
'{
"sql": "<string>"
}Requires an API key to access. Signup at https://ui.osohq.com/
A generic query comprising 1+ predicates conjuncted together.
Show child attributes
Predicate name and variable names.
INVARIANT: all variable names must exist in constraints. This ensures that all variables at least have a type.
2 elementsPredicate name and variable names.
INVARIANT: all variable names must exist in constraints. This ensures that all variables at least have a type.
2 elementsMap of variable names to their type and value(s). Every variable is at least typed and may also be constrained to a set of values.
Show child attributes
Constraints on a variable. All variables must have a type, and they may also be constrained to a set of values.
Show child attributes
The type of the variable.
The possible values of the variable. None means the variable can be any value. Some(["foo"]) means the variable must be exactly "foo". Some(["foo", "bar"]) means the variable can be either "foo" or "bar". The latter is how we represent In expressions in the new Query API.
Was this page helpful?