Issue Activities Page
This resource provides access to issue-related activity that is wrapped inside a page object. The main advantage of the page in comparison to a list of activities is cursors. The page provides boundary marks that supports iteration over the activities from the place the page is finished.
Resource | /api/activitiesPage |
Returned entity | ActivityCursorPage. For the description of the entity attributes, see Supported Fields section. |
Supported methods |
|
ActivityCursorPage attributes
Represents a page object that wraps a list of issue activities. The main advantage of the page in comparison to a list of activities is cursors. The page provides boundary marks that allow continuous iteration over the activities from the place the page is finished.
Related Resources
Below you can find the list of resources that let you work with this entity.
Attributes
This table describes attributes of the ActivityCursorPage
entity.
To receive an attribute in the response from the server, specify it explicitly in the
fields
request parameter.To update an attribute, provide it in the body of a POST request.
Field | Type | Description |
---|---|---|
id | String | The ID of the activity cursor page. |
activities | Array of ActivityItems | The list of activities in the page. |
afterCursor | String | A string value that is required to retrieve the next page of activities. |
beforeCursor | String | A string value that is required to retrieve the previous page of activities. |
hasAfter | Boolean | Indicates if the next page exists. |
hasBefore | Boolean | Indicates if the previous page exists. |
reverse | Boolean | Indicates whether the order of returning activities on the page is from newest to oldest or the opposite. If |
Read a Specific ActivityCursorPage
Read a page of activities.
Request syntax
Request parameters
Parameter | Type | Description |
---|---|---|
fields | String | A list of ActivityCursorPage attributes that should be returned in the response. If no field is specified, only the |
categories | String | Mandatory. Parameter filters returned activities by categories. You must specify at least one category per request. You can specify the
See this table for mapping between available categories and returned types of activity items. |
reverse | Boolean | Indicates whether the order of returning activities is from newest to oldest or the opposite. If |
start | String | Start timestamp of the time interval the activity timestamp belongs to. If the parameter is not set, it is considered to be 0. |
end | String | End timestamp of the time interval the activity timestamp belongs to. If the parameter is not set, it is considered as |
author | String | Parameter to filter activities by the author. You can specify one of the following parameters: the database ID, login, Hub ID, or |
issueQuery | String | Issues search query. Read more about search syntax. |
cursor | String | The main application for the cursor is the pagination of activities. The Activities is a frequently changing collection, and new activities might be created between two requests. In this case, the general approach to pagination using
If the Use case: Let's consider the following statements as initial conditions for the example:
Mentioned page can be presented by the following JSON (see: ActivityCursorPage):
{
"activities": [B]
"cursorBefore": "A^B" // the value differs from the real one and only used for the demonstration
"cursorAfter": "B^C" // the value differs from the real one and only used for the demonstration
"hasBefore": true
"hasAfter": true
"reverse": false
}
Such page could be received by a request to the following endpoint:
/api/activitiesPage?activityId=B&$top=1
The real value of the cursor is a complication string. Used notation "A^B" shows that the cursor points to the gap between items A and B. In order to request nearby pages of activities we can use the cursors of received page and request the page starting from the cursor to different directions. The following combinations a possible:
|
activityId | String | ID of the activity that should be included in the page. The activity is allocated to the middle of the page. |