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

Last change on this file since 3949 was 3949, checked in by olhsha, 11 years ago

login/logout and secure REST-method calls works. Further: adapt getting/putting/posting according to permissions of the logged-in user. Adn next: making a list of all currently on-line (logged-in) users from different sessions.

File size: 5.9 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> !Comment: more tests are necessary to test on all query parameters  </br>
53     GET <a href="api/annotations?link=Gaud">api/annotations/info?link=Gaud</a> !Comment: more tests are necessary to test on all query parameters  </br>
54     GET <a href="api/annotations/00000000-0000-0000-0000-000000000021">api/annotations/00000000-0000-0000-0000-000000000021</a>  </br>
55     GET <a href="api/annotations/00000000-0000-0000-0000-000000000021/targets">api/annotations/00000000-0000-0000-0000-000000000021/targets</a>  </br>
56     GET <a href="api/annotations/00000000-0000-0000-0000-000000000021/permissions">api/annotations/00000000-0000-0000-0000-000000000021/permissions</a><br>
57     GET <a href="api/targets/00000000-0000-0000-0000-000000000032">api/targets/00000000-0000-0000-0000-000000000032</a>  <br>
58     GET <a href="api/targets/00000000-0000-0000-0000-000000000032/versions">api/targets/00000000-0000-0000-0000-000000000032/versions</a>   <br>
59     GET <a href="api/cached/00000000-0000-0000-0000-000000000051/metadata">api/cached/00000000-0000-0000-0000-000000000051/metadata</a><br>
60     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.
61    </body>
62        </html>
Note: See TracBrowser for help on using the repository browser.