Using filters in Skyone Studio

To perform advanced queries in the Skyone Studio API, use the query parameter. The value of this parameter must be a valid JSON object sent in the underline query pattern.

Base JSON Structure

Below is the complete structure that includes sorting, date range filtering, and pagination:

{
  "sort": {
    "startTimeUTC": -1
  },
  "filter": {
    "startTimeUTC": {
      "_period_greater_equal": "2026-01-01T00:00:00Z",
      "_period_smaller_equal": "2026-01-06T23:59:59Z"
    }
  },
  "pagination": {
    "limit": 10,
    "skip": 0
  }
}

Read below for a better understanding of the items:

Pagination

Controls the amount of data returned per request to optimize performance.

  • limit: Defines the maximum number of items per page.

  • skip: Defines how many items should be skipped (offset) to access the next pages.

Example:

Filter

The filter object allows you to refine your search using specific keys and comparison operators.

Operator

Description

Use Example

_equal

Filters records where the column value exactly matches the specified value, respecting characters and case sensitivity (uppercase/lowercase).

"status": {"_equal": "active"}

_diff

Filters records where the column value does not match the specified value.

"id": {"_diff": 0}

_like

Filters records in which the column value contains the searched term, allowing for partial searches.

"name": {"_like": "Sky"}

_greater

Filters records where the column value is greater than the specified value.

"price": {"_greater": 50}

_smaller

Filters records where the value is less than the specified limit.

"stock": {"_smaller": 10}

_greater_equal

Filters records where the value is greater than or equal to the specified limit.

"age": {"_greater_equal": 18}

_smaller_equal

Filters records where the value is less than or equal to the specified limit.

"limit": {"_smaller_equal": 100}

_exists

Filters records based on the existence of the field/column in the document, returning those where the field is present (true) or absent (false), regardless of its value.

"tag": {"_exists": true}

_not_exists

Filters records where the field/column does not exist in the document, regardless of the value.

"deletedAt": {"_not_exists": true}

_in

Filters records where the column value is contained within a provided list (array) of values.

"role": {"_in": ["admin", "editor"]}

Date Range Filters (Date/Time)

For date fields such as startTimeUTC, use the following period prefixes:

  • _period_greater: Date after.

  • _period_smaller: Date before.

  • _period_greater_equal: Start date (inclusive).

  • _period_smaller_equal: End date (inclusive).

In the scenario below, the filter acts as an && (and) operator:

Sort

Defines the direction in which results are returned based on a key:

  • -1: Descending Order (default).

  • 1: Ascending Order.

Example:

Last updated

Was this helpful?