Let the platform do the work

/collection/:collection_name GET

Overview

Lists records from multiple modules at a time.

Summary

This endpoint will return a set of records fetched from multiple modules defined by :collection_name. The records will be filtered, sorted and truncated to max_num as a single collection. Collections may use a field mapping. For instance, the due_date of Tasks may be referred to as date_end. In this case the alias (date_end) should be used in filter and order_by expressions instead of real field name. Note that response data still contains the original fields for the module.

Request Arguments

Name Type Description Required
fields String See Filter API. If the collection definition uses aliases, then aliases should be used instead of real field names. False
max_num Integer See Filter API. False
filter String See Filter API. If collection definition uses aliases, then aliases should be used instead of real field names. False
order_by String See Filter API. If collection definition uses aliases, then aliases should be used instead of real field names. False
offset Map Individual offset for each module which the collection consists of. -1 (or any negative value) denotes that the module should be skipped. If module offset is not specified, it defaults to 0. False

Response Arguments

Name Type Description
next_offset Map The next offset to retrieve records. -1 will be returned for the given module when there are no more records.
records Array The record result set.

Response

{
   "next_offset": {
      "Calls": 1,
      "Meetings": -1,
      "Tasks": -2,
   },
   "records": [
      {
         "_module": "Calls",
         "id": "8703fbf3-0ffa-c288-8d2c-512f943ecdc3",
         "name": "Discuss review process",
         "date_end": "2014-02-26T19:12:00+00:00"
      },
      {
         "_module": "Tasks",
         "id": "e1c495cb-af17-1b37-dd66-512f934fe155",
         "name": "Introduce all players",
         "due_date": "2014-02-26T19:12:00+00:00"
      },
      {
         "_module": "Tasks",
         "id": "456b7848-9959-5a64-cd34-512d0938addd",
         "name": "Follow-up on proposal",
         "due_date": "2014-02-26T19:12:00+00:00"
      }
   ]
}

Change Log

Version Change
v10 Added /collection/:collection_name GET endpoint.