Use the Apono Query Language (AQL) to create Access Flows with a simple and intuitive syntax for querying resources, integrations, permissions, and more.
Customer Documentation: Apono Query Language
Welcome to the Apono Query Language (AQL) documentation! This guide explains how to use the query language to filter, search, and manage resources effectively within the Apono platform.
The Apono Query Language (AQL) provides a simple and intuitive syntax for querying resources, integrations, permissions, and more. It supports various operators and field types to allow precise and flexible querying capabilities.
A query consists of a field, an operator, and a value. For example:
Field: Specifies the attribute or tag to query (e.g., resource_tag["env"]
).
Operator: Defines the condition (e.g., =
for equality).
Value: The expected value for the field (e.g., "prd"
).
ID Fields
These fields represent core resource attributes:
resource_type
integration
resource
resource_status
resource_risk_level
permission
permission_risk_level
Name Fields
These fields support detailed matching based on names and tags:
integration_name
resource_name
permission_name
resource_tag["<key>"]
resource_context["<key>"]
permission_tag["<key>"]
permission_context["<key>"]
Equality Operators
=
: Equals
!=
: Not Equals
Substring Operators
contains
: Field contains the specified value.
not_contains
: Field does not contain the specified value.
starts_with
: Field starts with the specified value.
ends_with
: Field ends with the specified value.
Set Operators
in
: Field matches any value in a list.
not_in
: Field does not match any value in a list.
Logical Operators
and
/ AND
: Combine multiple conditions (all must be true).
or
/ OR
: Combine multiple conditions (any can be true).
not
/ NOT
: Negate a condition.
Basic Queries
Filter resources tagged with env
as prd
:
Find resources with the type database
:
Exclude resources tagged as test
:
Complex Queries
Resources with env
as prd
and type database
:
Permissions containing admin
in their name or tagged with critical
:
Negating conditions:
Using a list of values:
Parentheses can be used to group conditions and define precedence:
Be Specific: Use precise fields and values to narrow down your results.
Combine Conditions: Leverage and
, or
, and parentheses for complex queries.
Use Tags Effectively: Tags like resource_tag
and permission_tag
are powerful for categorizing and filtering.
Test Incrementally: Start with simple queries and build complexity as needed.
Invalid Syntax: Ensure your query follows the grammar rules, including proper use of quotes and parentheses.
No Results: Verify the field names and values are correct.
Unexpected Results: Check operator precedence and use parentheses to clarify.