glenrobson / SimpleAnnotationServer

A simple IIIF and Mirador compatible Annotation Server
Apache License 2.0
97 stars 28 forks source link

update or delete annotation lists #33

Closed jeau closed 6 years ago

jeau commented 6 years ago

Is there a way to update or delete annotation lists?

I have provided annotation lists to the populate form. It's those lists that are identified by their urls, and those annotations marked by their ids that I would like to update or delete.

glenrobson commented 6 years ago

I'm afraid currently there isn't a way to delete an annotation list. You could delete the individual annotations using the following form:

http://sashost:port/SAS/annotation/destroy?uri=<annotation_id>
jeau commented 6 years ago

thanks, with this, I can write a simple script to browse and delete all annotations related to a manifest or list.

jeau commented 6 years ago

unfortunally, it'doesn't work for me

https://annotation.emf.tech/annotation/destroy?uri=https://annotation.emf.tech/annotation/1520376182870

this error occur

HTTP ERROR 405

Problem accessing /annotation/destroy. Reason:

    HTTP method GET is not supported by this URL
glenrobson commented 6 years ago

Hi, you'll have to issue a DELETE rather than a GET (http://www.restapitutorial.com/lessons/httpmethods.html). If you are using CURL I think you can run:

curl -X DELETE https://annotation.emf.tech/annotation/destroy?uri=https://annotation.emf.tech/annotation/1520376182870

let me know if that works ok.

jeau commented 6 years ago

Yeah, it works.

with quotes for the url and bypassing authentication

glenrobson commented 6 years ago

Thats great news thanks.