Provides current and historical information for the first document and segment level comments in the scope.
URL
(POST) /resources/timeline/scope
PARAMETERS
The parameters are a JSON object included in the request body:
scope | The scope object. The segment must be within the scope. | Mandatory |
query | An optional query object. This allows to constrain the segments to fetch comments for. | Mandatory |
locales | Optional filter on languages of comments. If null then comments will be retrieved for all scope languages. | Optional |
skip | Used for pagination. 0 = get comments from the start. If not specified, value will be 0. | Optional |
take | Used for pagination. Number of pages to retrieve. If not set, value will be 30. | Optional |
knownPersons | Optional array of person/user ids for which we do not need name and company, since we already have this information. Try to provide the person ids if you already have details as this will speed up performance. | Optional |
asc | Optional sort order. False (default) = sort with most recent comments on top. True = Oldest comments on top. | Optional |
RESULTS
A JSON with these properties:
scomments | An array of segment level comments. See Comment (Object) for details. |
dcomments | An array of document level comments. See Comment (Object) for details. |
persons | An object containing the persons referred to by comments or revisions. Note:
See Persons List (Object) for details. |
locales | A list of all locales available for this segment and which are within the scope. You can use these in a comments/revisions language filter. |
rights | A few access rights that are specifically useful when working with the results:
Note: When using the APIs to add/edit/delete comments, you may obtain a not authorized information even when the edit, canAdd or canSendEmail properties are true. The reason for this is that further detailed access rights check are done upon those advanced operations. |
ACCESS RIGHTS
When working with the timeline of a segment, you should always read out these properties:
- comments.[].edit: Tells if a comment can be edited or deleted.
- rights.canAdd: Tells if a new comment can be added to the segment.
- rights.canSendEmail: Tells if a newly added comment can be notified by email to people involved with this segment.
EXAMPLE
-