Skip to content

Commit cb6cb7e

Browse files
committed
Adding endpoint documentation
1 parent 114f102 commit cb6cb7e

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ which will use this Dockerfile [docker/sas-tomcat/Dockerfile](docker/sas-tomcat/
9898
* [Developing with SimpleAnnotationServer](doc/DevGuide.md)
9999
* Developing locally, Docker installs, deployment tricks and Jetty config
100100
* [Connecting Fuseki with Jena to view triple store](doc/FusekiJena.md)
101+
* [SAS Endpoints](doc/Endpoints.md)
101102
* [Deploying to tomcat](doc/tomcat.md)
102103
* [Using the Sesame RDF store](doc/Sesame.md)
103104
* **DEPERICATED**

doc/Endpoints.md

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# SimpleAnnotationServer endpoints
2+
3+
Below are a list of SAS endpoints but note they assume SAS is running as a root application. For the tomcat docker deployment you would need to add `/sas/` to the start of the URL. For example the create annotation endpoint would be:
4+
5+
```
6+
/sas/annotation/create
7+
```
8+
9+
# Search API endpoint (GET)
10+
The endpoint for the IIIF Search implementation:
11+
12+
```
13+
/search-api/_manifest_short_id/search
14+
```
15+
16+
where `_manifest_short_id` is a URL safe nickname for the manifest. This is currently built in the following method:
17+
18+
https://github.com/glenrobson/SimpleAnnotationServer/blob/114f1024af86b03acc20cdc89682bcd4c11c2318/src/main/java/uk/org/llgc/annotation/store/adapters/AbstractStoreAdapter.java#L265
19+
20+
# Show annotations for a canvas (GET)
21+
Returns annotations for a canvas:
22+
23+
```
24+
/annotation/search?uri=
25+
```
26+
27+
Parameters are:
28+
* `uri` is the canvas URI
29+
30+
# Create annotation (POST)
31+
Creates an annotation which is posted to the URL.
32+
33+
```
34+
/annotation/create
35+
```
36+
37+
# Edit/update an annotation (POST)
38+
Updates an existing annotation with the content of the posted annotation:
39+
40+
```
41+
/annotation/update
42+
```
43+
44+
The posted annotation should have an `@id` which exists in the store
45+
46+
# Delete an annotation (DELETE)
47+
48+
```
49+
/annotation/destroy?uri=
50+
```
51+
52+
The `uri` parameter is the ID of the annotation to delete.
53+
54+
# Import a AnnotationList into the Annotation store (POST)
55+
56+
Useful to import an existing annotation list for editing. See [Populating Annotations](PopulatingAnnotations.md) for details on how to use this function. A AnnotationList is posted to the annotation store.
57+
58+
```
59+
/annotation/populate
60+
```

0 commit comments

Comments
 (0)