Skip to content

Latest commit

 

History

History
64 lines (55 loc) · 2.27 KB

ws-aero-usage.md

File metadata and controls

64 lines (55 loc) · 2.27 KB

AERO Web Services

AERO

These web services implement the aero protocol. Here are the calls avalaible to the users.

List Projects
curl -u aae_root:Tadmin -w "%{http_code}" http://localhost:8080/alvisae-ws/api/projects
Create a project named with the creator named Ba
curl -u aae_root:Tadmin -w "%{http_code}" -X POST -d 'name=new project&creator=Ba' http://localhost:8080/alvisae-ws/api/projects
Delete the project 1
curl -u aae_root:Tadmin -w "%{http_code}" -X DELETE http://localhost:8080/alvisae-ws/api/projects/1
JSON export
curl -u aae_root:Tadmin -w "\n%{http_code}\n" http://localhost:8080/alvisae-ws/api/projects/5/zipExport > export.zip
List documents of project 4
curl -u aae_root:Tadmin -w "%{http_code}" http://localhost:8080/alvisae-ws/api/projects/4/documents
Create a document into the project 1
curl -u aae_root:Tadmin -w "%{http_code}" -X POST -d 'name=new document&format=text&content=some content&creator' http://localhost:8080/alvisae/api/projects/1/documents
Delete Document
curl -u aae_root:Tadmin -w "%{http_code}" -X DELETE http://localhost:8080/alvisae-ws/api/projects/1/documents/3
List Annotations
curl -u aae_root:Tadmin -w "%{http_code}" http://localhost:8080/alvisae-ws/api/projects/4/documents/4/annotations
Create Annotation
curl -u aae_root:Tadmin -w "%{http_code}" -X POST \
-d 'format=json&content=[{"id":"946b5154-6b47-4e72-86cb-9f9096e7475f","propes":{},"text":[[0,28]],"type":"","kind":0}]&state=NEW' \
http://localhost:8080/alvisae-ws/api/projects/4/documents/4/annotations/1
Delete Annotation
curl -u aae_root:Tadmin -w "%{http_code}" -X DELETE http://localhost:8080/alvisae-ws/api/projects/4/documents/4/annotations/1

PubAnnotation: doc import/export

The web service implements import of a PubAnnotation JSON document and export of PubAnnotation JSON document

Export
curl -u aae_root:Tadmin -w "%{http_code}" http://localhost:8080/alvisae/alvisae-ws/api/projects/4/documents/16
Import
curl -u aae_root:Tadmin -w "\n%{http_code}\n" -T anyPubAnnotationDoc.json http://localhost:8080/alvisae/alvisae-ws/api/user/4/projects/1/document