source: DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/webapp/index.jsp @ 4407

Last change on this file since 4407 was 4407, checked in by olhsha, 10 years ago

Updating JSP page

File size: 6.6 KB
Line 
1<%--
2
3    Copyright (C) 2013 DASISH
4
5    This program is free software; you can redistribute it and/or
6    modify it under the terms of the GNU General Public License
7    as published by the Free Software Foundation; either version 2
8    of the License, or (at your option) any later version.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13    GNU General Public License for more details.
14
15    You should have received a copy of the GNU General Public License
16    along with this program; if not, write to the Free Software
17    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19--%>
20<html>
21    <body>
22        <h2>DASISH REST API</h2>
23        <p><a href="api/myresource">Jersey resource</a>
24        <p><a href="https://trac.clarin.eu/wiki/DASISH/SpecificationDocument#RESTAPI">https://trac.clarin.eu/wiki/DASISH/SpecificationDocument#RESTAPI</a></p>
25        <!--        <b>Notebooks</b><br>
26              api/notebooks<br>
27                POST api/annotations and PUT /notebooks/_nid_?annotation=_aid_.<br>
28                <br>
29                GET <a href="api/notebooks">api/notebooks</a> Returns notebook-infos for the notebooks accessible to the current user.<br>
30                GET <a href="api/notebooks/owned">api/notebooks/owned</a> Returns the list of all notebooks owned by the current logged user.<br>
31                GET <a href="api/notebooks/_nid_/readers">api/notebooks/_nid_/readers</a> Returns the list of _uid_ who allowed to read the annotations from notebook.<br>
32                GET <a href="api/notebooks/_nid_/writers">api/notebooks/_nid_/writers</a> Returns the list of _uid_ that can add annotations to the notebook.<br>
33                GET <a href="api/notebooks/_nid_/metadata">api/notebooks/_nid_/metadata</a> Get all metadata about a specified notebook _nid_, including the information if it is private or not.<br>
34                GET <a href="api/notebooks/_nid_?maximumAnnotations=100&startAnnotation=5&orderby=1&orderingMode=0">api/notebooks/_nid_?maximumAnnotations=limit&startAnnotation=offset&orderby=orderby&orderingMode=1|0</a> Get the list of all annotations _aid_-s contained within a Notebook with related metadata. Parameters: _nid_, optional maximumAnnotations specifies the maximum number of annotations to retrieve (default -1, all annotations), optional startAnnotation specifies the starting point from which the annotations will be retrieved (default: -1, start from the first annotation), optional orderby, specifies the RDF property used to order the annotations (default: dc:created ), optional orderingMode specifies if the results should be sorted using a descending order desc=1 or an ascending order desc=0 (default: 0 ).<br>
35                PUT <form action="api/notebooks/_nid_" method="put"><input type="submit" /></form>/notebooks/_nid_      Modify metadata of _nid_. The new notebook?s name must be sent in request?s body.<br>
36                PUT /notebooks/_nid_/_aid_      Adds an annotation _aid_ to the list of annotations of _nid_.<br>       
37        --        PUT <form action="api/notebooks/_nid_/setPrivate=true" method="put"><input type="submit" /></form>api/notebooks/_nid_/setPrivate=[true, false]        Sets the specified Notebook as private or not private.<br>--
38                POST api/notebooks/     Creates a new notebook. This API returns the _nid_ of the created Notebook in response?s payload and the full URL of the notebook adding a Location header into the HTTP response. The name of the new notebook can be specified sending a specific payload.<br>
39                POST api/notebooks/_nid_        Creates a new annotation in _nid_. The content of an annotation is given in the request body. In fact this is a short cut of two actions:<br>
40                DELETE <form action="api/notebooks/_nid_" method="DELETE"><input type="submit" /></form>api/notebooks/_nid_     Delete _nid_. Annotations stay, they just lose connection to _nid_.<br>
41        -->
42        <!--  <br>
43         <a href="spring_security_login"> Login</a> <br>
44         <br>
45         <a href="j_spring_security_logout"> Logout</a> <br> -->
46        <br> 
47        <b>Test URI-s</b><br>
48        <b>All output xml-s are valid w.r.t. the schema</b><br>
49        GET <a href="api/users/00000000-0000-0000-0000-0000000000112">api/users/00000000-0000-0000-0000-0000000000112</a> <br> 
50        GET <a href="api/users/00000000-0000-0000-0000-0000000000112/current">api/users/00000000-0000-0000-0000-0000000000112/current</a>  !Problem: how to ask the servlet if the given user is logged in, may be by some other running somewhere client<br> 
51        GET <a href="api/users/info?email=twagoo@mpi.nl">api/users/info?email=twagoo@mpi.nl</a>  <br>
52        GET <a href="api/annotations?link=Sagrada">api/annotations/info?link=Sagrada</a>  <br>
53        GET <a href="api/annotations?link=Gaud">api/annotations/info?link=Gaud</a>  <br>
54        GET <a href="api/annotations?after=2014-01-28 15:57:58.046908&before=2014-01-30 10:08:16.213186">api/annotations?after=2014-01-28 15:57:58.046908&before=2014-01-30 10:08:16.213186</a> <br>
55        !Comment: What is "namespace" query parameter? Must be implemented and tested <br>
56        GET <a href="api/annotations/00000000-0000-0000-0000-000000000021">api/annotations/00000000-0000-0000-0000-000000000021</a>  </br>
57        GET <a href="api/annotations/00000000-0000-0000-0000-000000000021/targets">api/annotations/00000000-0000-0000-0000-000000000021/targets</a>  </br>
58        GET <a href="api/annotations/00000000-0000-0000-0000-000000000021/permissions">api/annotations/00000000-0000-0000-0000-000000000021/permissions</a><br>
59        GET <a href="api/targets/00000000-0000-0000-0000-000000000032">api/targets/00000000-0000-0000-0000-000000000032</a>  <br>
60        GET <a href="api/targets/00000000-0000-0000-0000-000000000032/versions">api/targets/00000000-0000-0000-0000-000000000032/versions</a>   <br>
61        GET <a href="api/cached/00000000-0000-0000-0000-000000000051/metadata">api/cached/00000000-0000-0000-0000-000000000051/metadata</a><br>
62        GET <a href="api/cached/00000000-0000-0000-0000-000000000051/content">api/cached/00000000-0000-0000-0000-000000000051/content</a> !Problem: works only on image.jpeg, end maps png-blobs to jpegs.
63        <br> 
64        <br>
65        <b>Debugging URI's (only for developers)</b><br>
66        GET <a href="api/debug/remoteID">api/debug/remoteID</a> <br>
67        GET <a href="api/debug/annotations">api/debug/annotations</a> <br>
68        GET <a href="api/debug/logDatabase/32">api/debug/logDatabase/32</a> <br>
69        GET <a href="api/debug/logServer/32">api/debug/logServer/32</a> <br>
70    </body>
71</html>
Note: See TracBrowser for help on using the repository browser.