BPQL Object Syntax

BigPanda uses a JSON Object form of its BPQL string for API body parameters. When using the API, this format needs to be followed where appropriate.

BigPanda's APIs utilizes the BPQL object syntax when used for querying, which should not be confused with the string formatted BPQL when searching or filtering inside the UI itself.

The below BPQL object cheatsheets explain how a conventional BPQL string is represented as a JSON object instead. Again, use this format whenever a certain API requires filling in a bpql parameter, like Create a Plan.

{<operator>: [<tag>, <value/values>]}
CommandBPQL StringBPQL Object
equal =host = prod-api-1{ "=": [ "host", "prod-api-1" ]}
not equal !=host != prod-api-1{ "!=": [ "host", "prod-api-1" ]}
strong equal ===host === prod-api-1{ "===": [ "host", "prod-api-1" ]}
in operator INhost IN [prod-api-1,prod-api-2]{ "IN": [ "host", [ "prod-api-1", "prod-api-2" ]]}
not in operator NOT INhost NOT IN [prod-api-1,prod-api-2]{ "NOT IN": [ "host", [ "prod-api-1", "prod-api-2" ]]}
{<operator>: [<sub_query#1>,<sub_query#2>,...]}
CommandBPQL StringBPQL Object
ANDhost = prod-api-1 AND check = cpu{ "AND": [{ "=": [ "host", "prod-api-1" ]}, { "=": [ "check", "cpu" ]}]}
ORhost = prod-api-1 OR check = cpu{ "OR": [{ "=": [ "host", "prod-api-1" ]}, { "=": [ "check", "cpu" ]}]}

Special Values

For commands with special values, the value will be represented inside an object. Here are two examples.

CommandBPQL StringBPQL Object
wildcard *host = prod-api-*{ "=": [ "host", { "type": "regex", "value": "prod-api-*" }]}
Formal Regex Searchhost = /prod-api-.*/{ "=": [ "host", { "type": "formal-regex", "value": "prod-api-.*" }]}