<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to AnnotationAPI</title><link>https://sourceforge.net/p/tradamus/wiki/AnnotationAPI/</link><description>Recent changes to AnnotationAPI</description><atom:link href="https://sourceforge.net/p/tradamus/wiki/AnnotationAPI/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 06 Oct 2015 19:22:44 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/tradamus/wiki/AnnotationAPI/feed" rel="self" type="application/rss+xml"/><item><title>AnnotationAPI modified by Domhnall101</title><link>https://sourceforge.net/p/tradamus/wiki/AnnotationAPI/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Domhnall101</dc:creator><pubDate>Tue, 06 Oct 2015 19:22:44 -0000</pubDate><guid>https://sourceforge.netd35ad26e3b78e72013a7bd065cb7f752bb5a2ae2</guid></item><item><title>Annotation API modified by Eric Smith</title><link>https://sourceforge.net/p/tradamus/wiki/Annotation%2520API/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,4 +1,4 @@
-Draft 2015-06-04
+Draft 2015-06-05

 ### Get annotation details ###
 Endpoint:  /annotation/*annID*
@@ -16,6 +16,38 @@
 Status:  204 on success, 404 if *annID* does not exist.
 Comments:
 The JSON object in the request body should contain all fields which are to be modified; fields which aren't being changed can be omitted.
+
+
+### Add a sub-annotation ###
+Endpoint: /annotation/*annID₁*/annotations
+Method: POST
+Request content-type: application/json
+Request body: {"type":"colour","content":"turquoise"}
+Response body: none
+Response location: /annotation/*annID₂*
+Status: 201 on success, 404 if *annID₁* does not exist.
+Comments:
+The request body should contain a single annotation object.  The Location header of the response gives the caller the ID of the newly-created annotation.
+
+
+### Get sub-annotations ###
+Endpoint:  /annotation/*annID*/annotations
+Method: GET
+Request body:  none
+Response body: Array of annotations attached to *annID*.
+Status:  200 on success, 404 if *annID* does not exist.
+Comments:
+Response contains an array with all annotations attached the given annotation.
+
+### Set sub-annotations ###
+Endpoint:  /annotation/*annID*/annotations
+Method: PUT
+Request body:  Array of new annotations to be attached to *annID*.
+Request parameters:  `merge=true|false` (default `true`)
+Response body:  none
+Status:  204 on success, 404 if *annID* does not exist.
+Comments:
+The JSON array in the request body should contain new values for the annotation's sub-annotations.  If the `merge` parameter is `false`, the existing sub-annotations will be completely replaced; if it is `true` or omitted, only annotations mentioned in the request body will be affected.

 ### Approve an annotation ###
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eric Smith</dc:creator><pubDate>Fri, 05 Jun 2015 23:55:06 -0000</pubDate><guid>https://sourceforge.net258f60e969fc6304b9780ee87d7458a578b4dda4</guid></item><item><title>Annotation API modified by Eric Smith</title><link>https://sourceforge.net/p/tradamus/wiki/Annotation%2520API/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Draft 2015-06-04&lt;/p&gt;
&lt;h3 id="get-annotation-details"&gt;Get annotation details&lt;/h3&gt;
&lt;p&gt;Endpoint:  /annotation/&lt;em&gt;annID&lt;/em&gt;&lt;br /&gt;
Method:  GET&lt;br /&gt;
Request body:  none&lt;br /&gt;
Response body:  {"id":81538,"startOffset":1938,"endOffset":1938,"target":null,"selector":null,"type":"g","purpose":"NONE","content":null,"attributes":"{\"ref\":\"#slash\"}","modifiedBy":0,"approvedBy":0,"startPage":17000,"endPage":17000,"bounds":null,"canvas":null}&lt;br /&gt;
Status:  200 on success, 404 if &lt;em&gt;annID&lt;/em&gt; does not exist.&lt;/p&gt;
&lt;h3 id="set-annotation-details"&gt;Set annotation details&lt;/h3&gt;
&lt;p&gt;Endpoint:  /annotation/&lt;em&gt;annID&lt;/em&gt;&lt;br /&gt;
Method: PUT&lt;br /&gt;
Request body:  {"content":"/"}&lt;br /&gt;
Response body:  none&lt;br /&gt;
Status:  204 on success, 404 if &lt;em&gt;annID&lt;/em&gt; does not exist.&lt;br /&gt;
Comments:&lt;br /&gt;
The JSON object in the request body should contain all fields which are to be modified; fields which aren't being changed can be omitted.&lt;/p&gt;
&lt;h3 id="approve-an-annotation"&gt;Approve an annotation&lt;/h3&gt;
&lt;p&gt;Endpoint: /annotation/&lt;em&gt;annID&lt;/em&gt;/approval&lt;br /&gt;
Method: PUT&lt;br /&gt;
Request body: none&lt;br /&gt;
Response body: none&lt;br /&gt;
Status: 204 on success, 403 if the user does not have &lt;code&gt;EDITOR&lt;/code&gt; permission on &lt;em&gt;annID&lt;/em&gt;, 404 if &lt;em&gt;annID&lt;/em&gt; does not exist.&lt;br /&gt;
Comments:&lt;br /&gt;
Sets the &lt;code&gt;approvedBy&lt;/code&gt; field of the annotation to the ID of the current user.&lt;/p&gt;
&lt;h3 id="delete-an-annotation"&gt;Delete an annotation&lt;/h3&gt;
&lt;p&gt;Endpoint:  /annotation/&lt;em&gt;annID&lt;/em&gt;&lt;br /&gt;
Method: DELETE&lt;br /&gt;
Request body:  none&lt;br /&gt;
Response body:  none&lt;br /&gt;
Status:  204 on success.&lt;br /&gt;
Comments:&lt;br /&gt;
Deletes the single annotation identified by &lt;em&gt;annID&lt;/em&gt;.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eric Smith</dc:creator><pubDate>Thu, 04 Jun 2015 17:28:56 -0000</pubDate><guid>https://sourceforge.net657f62e73eb59195cd10c46fda582354ef1cf084</guid></item></channel></rss>