Skip to content

Query JSON Examples

Literals

TRUE Literal

true

FALSE Literal

false

Primitive Terms

Binary Comparison Operators

Available Operators; eq, ne, gt, ge, lt, le

With Instant

{
  "locator": "field",
  "eq": "2025-08-12T23:41:30.399755Z"
}

With Boolean

{
  "locator": "field",
  "eq": true
}

With Number

{
  "locator": "field",
  "eq": 42
}

With String

{
  "locator": "field",
  "eq": "value"
}

Collection Operators

IN Operator with Numbers

{
  "in": {
    "locator": "field",
    "values": [
      1,
      2,
      3
    ]
  }
}

IN Operator with Strings

{
  "in": {
    "locator": "field",
    "values": [
      "a",
      "b",
      "c"
    ]
  }
}

NOT IN Operator

{
  "notIn": {
    "locator": "field",
    "values": [
      "x",
      "y"
    ]
  }
}

NULL Checks

IS NULL Operator

{
  "isNull": "field"
}

IS NOT NULL Operator

{
  "isNotNull": "field"
}

REGEX Operator with Pattern

{
  "locator": "field",
  "regex": "^abc.*"
}

Composite Operators

AND Composite

{
  "and": [
    true,
    false
  ]
}

OR Composite

{
  "or": [
    true,
    false
  ]
}

NOT Operator

{
  "not": true
}

Sorting

{
  "entries": [
    {
      "key": "fieldNameA",
      "direction": "ASC"
    },
    {
      "key": "fieldNameB",
      "direction": "DESC"
    }
  ]
}

Pagination

{
  "index": 12,
  "size": 50
}

Query

{
  "filter": {
    "and": [
      {
        "locator": "status",
        "eq": "active"
      },
      {
        "or": [
          {
            "in": {
              "locator": "category",
              "values": [
                "A",
                "B",
                "C"
              ]
            }
          },
          {
            "notIn": {
              "locator": "type",
              "values": [
                "X",
                "Y"
              ]
            }
          }
        ]
      },
      {
        "not": {
          "isNull": "lastUpdated"
        }
      }
    ]
  },
  "sort": {
    "entries": [
      {
        "key": "location",
        "direction": "ASC"
      }
    ]
  },
  "paginate": {
    "index": 0,
    "size": 25
  }
}

Comments