Accelerate the Value of Data

Get Interactions for an Entity

Learn about retrieving the list of interactions for an entity.

This operation allows you to return the list of interactions for an entity (interactions, where this entity is the member). There is a possibility to sort (using the sort and order parameters) and filter (using the filter parameter) interactions in the response.

Note: Take a look at the following information:
  • By default, interactions are sorted using the timestamp property in descending order.
  • There is a limit for reading interactions from the database. You can set the limit using the maxInteractionsToFetchPerEntity parameter. Only the first maxInteractionsToFetchPerEntity interactions are read from the database and only these interactions participate in filtering and sorting. If there are more interactions in the database for the given entity, then it means that the fetchedAll property is set to false in the response.

Request

GET {TenantURL}/entities/{id}/_interactions
Table 1. Parameters
Parameter Name Required Details
Headers Authorization Yes This parameter provides information about the authentication access token using the format, Bearer <accessToken> (For more information see Authentication API.
Query max No This parameter represents positive integer value to identify the maximum number of interactions to return in a response. Can be used to organize pagination in combination with the offset parameter. The default value is 50.
offset No This parameter represents positive integer value to identify what element in a result set must be returned in a response. Can be used to organize pagination in combination with the max parameter. The default value is 0.
order No This parameter indicates the order of sorting and is applicable only in combination with the sort parameter. The possible values are as follows:
  • asc - Indicates that the results are shown in ascending order.
  • desc - Indicates that the results are shown in descending order.
The default sorting order is asc. For example, order=desc.
filter No This parameter enables interactions filtering by a condition. The format for filter query parameter is, filter=({Condition Type}[AND/OR {Condition Type}]*). For more information, see Filtering.

Response

JSON object with the following properties:

  • interactions - This property indicates a JSON array of interaction objects matching the filter request in the order as defined by the query parameters.
  • totalFetched - This property indicates the total number of interactions for this entity that were fetched from the database (depends on the maxInteractionsToFetchPerEntity configuration parameter).
  • fetchedAll - When this property is marked false, it means that there are more than maxInteractionsToFetchPerEntity interactions in the database.

Request

GET {TenantURL}/entities/{id}/_interactions?max=10&offset=20&filter=equals(type,'configuration/interactionTypes/Meeting'))&sort=attributes.Place&order=desc
Headers: Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512

Response

Response

{
  "interactions": [
    {
      "URI": "interactions/hg45Jlg",
     ...
    }
  ],
  "totalFetched": 1,
  "fetchedAll": true
}            

Search by Members

You can search for members in the following ways:

  • Search by members' IDs through all member types using equals(members,7fpyJI3).
  • Search by members' IDs with the specified member type using equals(members.Individual.id,7fpyJI3).
  • Search by members' types using equals(members.types,'Organization').