Query Options

limit

Type: number defines the maximum number of documents that the API will return for your query. default: 25 max: 1000

Example usage:

const api = Comfortable.api('<repository-api-id>', '<api-key>');

api.getDocuments({
  limit: 25
})
  .then(result => {
    // futher implementation
  })
  .catch(err => {
    throw err;
  })

Available for:

offset

Type: number defines the number of documents which gets skipped in the datasets. default: 0

Example usage:

Available for:

locale

Type: string set the Language for the receiving documents. locale: 'en' to receive all languages, set locale: 'all'

Example usage:

Available for:

includes

Type: number or Comfortable.Include defines the aggregation level of related documents or pick specific relations which should be aggregated in the query results

Example picking specific relations:

Example with aggregation level:

Available for:

includeTags

Type: array include documents with certain tags to the query results.

Example usage:

Available for:

excludeTags

Type: array exclude documents with certain tags from the query results.

Example usage:

Available for:

fields

Type: string hiding/masking specific fields/parts from the query result.

Example usage:

Available for:

embedAssets

Type: boolean embeds assets to the document which points on them.

Example usage:

Available for:

filters

Type: Comfortable.Filter collect or reduce documents by certain field values

Example usage:

Available for:

sorting

Type: Comfortable.Sorting sort query results ascending or descending by certain fields

Example usage:

Available for:

Type: string

Example usage:

Available for:

Last updated