NOÉ is searching for a volunteer dev ! Interested ? Send an email to hello@noe-app.io.
Skip to main content

Pagination and Sorting

The LIST endpoints of the NOÉ API support sorting and pagination parameters to efficiently manage large collections of entities.

📋 Main Parameters

ParameterTypeDescriptionExample
sortSorting instructions separated by commasDefine the order of the resultssort=-createdAt,+name
limitNumberMaximum number of results returnedlimit=10
skipNumberOffset of the results for paginationskip=20

🔧 Parameter Details

Sort

Allows sorting results by one or more fields.

  • Prefix + → ascending order
  • Prefix - → descending order
  • Multiple fields: separate with a comma ,
# Sort by creation date ascending, then by name descending
GET /projects/:projectId/activities?sort=+createdAt,-name

Limit

Limits the number of documents returned by the request. Helps control server load and implement pagination.

# Returns the first 10 results
GET /projects/:projectId/activities?limit=10

Skip

Allows skipping a number of results to implement pagination. Often used in combination with limit.

# Returns 10 results starting from the 21st result
GET /projects/:projectId/activities?limit=10&skip=20

📦 Combination with Filters

All pagination and sorting parameters can be combined with filters defined via filter:

GET /projects/:projectId/activities?
filter[tags][$in]=musique,art
&sort=+createdAt,-name
&limit=10
&skip=20
  • Filter: activities with the tags "musique" or "art"
  • Sort: first by creation date ascending, then by name descending
  • Pagination: page 3 (items 21 to 30)