Query Parameters

API calls can contain different query parameters: skip, filter, orderby, limit, fields.

Skip

Used to skip x items in a list of data (Like OFFSET in SQL).

Type: Number

Default: 0

Examples

  • 2

Filter

Used to filter in a list of data.

Type: String

AND

Compute the logical β€œand” of one or more values.

and(VARIABLE.gt(VALUE),VARIABLE.lt(VALUE))

OR

Compute the logical β€œor” of one or more values.

or(VARIABLE.e(VALUE),VARIABLE.e(VALUE))

E

Test if variable and a value are equal.

VARIABLE.e(VALUE)

NE

Test if variable and a value are not equal.

VARIABLE.ne(VALUE)

GT

Compare values, testing if the left-hand value is greater than the right-hand.

VARIABLE.gt(VALUE)

GTE

Compare values, testing if the left-hand value is greater than or equal to the right-hand.

VARIABLE.gte(VALUE)

LT

Compare values, testing if the left-hand value is less than the right-hand.

VARIABLE.lt(VALUE)

LTE

Compare values, testing if the left-hand value is less than or equal to the right-hand.

VARIABLE.lte(VALUE)

LIKE

Act as the LIKE in SQL

VARIABLE.like(VALUE%VALUE)

NLIKE

Not like

VARIABLE.nlike(VALUE)

Examples

  • or(name.e(oocar),name.like(smarto))

  • and(mileage.gt(534005),mileage.lte(734005))

  • lang.ne(fr)

  • avg_score_trip.gt(67)

  • organisations.name.nlike(Ph%ny)

Orderby

Used to sort a list of data.

Type: String

Examples

  • name

  • -name

Limit

Used to limit number of data in list.

Type: Number

Default: 20

Examples

  • 15

Fields

Used to show optional fields, deep data or only some fields.

Type: String

  • $all : Show default fields

  • {variable}.fields($all) : Show all fields of a relationship

Examples

  • users.fields($all)

  • $all,users,vehicle_count

  • name,type,vehicle_count,users.fields(uuid,name,vehicles.fields($all,vehicle_data))

Last updated

Was this helpful?