//:record/collection/:collection_name GET
Overview
Lists related records from multiple links at a time.
Summary
This endpoint will return a set of related records fetched from multiple links 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 collection definition uses aliases, then aliases should be used instead of real field names.
|
False |
view |
String |
See Filter API.
|
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 link which the collection consists of.
-1 (or any negative value) denotes that the link should be skipped.
If link 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 link when there are no more records.
|
records |
Array |
The record result set. |
errors |
Map |
Errors encountered while making requests for the individual links. These errors are returned for the client to consume, but do not affect the response status of the request. |
Response
{
"next_offset": {
"calls": 1,
"meetings": -1,
"tasks": -1,
},
"records": [
{
"_module": "Calls",
"_link": "calls",
"id": "8703fbf3-0ffa-c288-8d2c-512f943ecdc3",
"name": "Discuss review process",
"date_end": "2014-02-26T19:12:00+00:00"
},
{
"_module": "Tasks",
"_link": "tasks",
"id": "e1c495cb-af17-1b37-dd66-512f934fe155",
"name": "Introduce all players",
"due_date": "2014-02-26T19:12:00+00:00"
},
{
"_module": "Tasks",
"_link": "tasks",
"id": "456b7848-9959-5a64-cd34-512d0938addd",
"name": "Follow-up on proposal",
"due_date": "2014-02-26T19:12:00+00:00"
}
],
"errors": {
"meetings": {
"code": 403,
"error": "not_authorized",
"error_message": "You are not authorized to perform this action. Contact your administrator if you need access."
}
}
}
Change Log
Version |
Change |
v10
|
Added /<module>/:record/collection/:collection_name GET endpoint.
|