Search for Annotated Documents

All annotations (bookmarks, comments, likes, and tags) are linked to external documents.

Retrieve a list of documents that have been annotated, according to some search criteria. Without any parameters, the 10 most recently annotated documents are retrieved.

A document has been annotated if it has been tagged, bookmarked, "liked", or commented on.

Method and resource URI

The method and resource URI are:

  • GET /twigkit/api/social/annotated: Retrieves a list of documents that have been annotated, according to some search criteria.

Parameters

from
optional
Returns documents that have been annotated at or later than the given date. The date needs to be formatted according to the pattern "yyyy-MM-dd HH:mm:ss".
Example value: 1999-07:23 22:10:04

to
optional
Returns documents that have been annotated at or earlier than the given date. The date needs to be formatted according to the pattern "yyyy-MM-dd HH:mm:ss".
Example value: 1999-07:23 22:10:04

userId
optional
Returns documents that have been annotated by the user with the specified numerical ID.
Example value: 123

topicId
optional
Returns documents that have been annotated in the context of the topic with the specified numerical ID. Example value: 456

Example request

Find all documents that have been annotated by user 1 since 14:10 on November 3, 2001:

XML

GET /twigkit/api/social/annotated?userId=1&from=2001-11-03%2014:10:00 HTTP/1.1
Accept: application/xml
<annotated from="2001-11-03 14:10:00" user-id="1">
    <target>document2</target>
    <target>document2</target>
</annotated>

JSON

The same request, now calling for a response in JSON format:

GET /twigkit/api/social/annotated?userId=1&from=2001-11-03%2014:10:00 HTTP/1.1
Accept: application/jsonrequest
{
    "target":["document1", "document2"],
    "user-id":"1",
    "from":"2001-11-03 14:10:00"
}