[annotator-dev] Problem with Storage DELETE request

Kraffmiller, Ellen ekraffmiller at hmdc.harvard.edu
Mon May 18 21:04:17 UTC 2015

I’m running Annotator 1.2.10, with the Storage plugin, and have implemented my own REST interface for the storage commands.  I have create, update and search working correctly, but I’m having a problem with the delete command.  When I try to delete an annotation, I get a “Bad Request” error from the Storage plugin, but if I run try the same DELETE URL that the plugin is calling with curl, it works as expected and the annotation is deleted.  I’m using jQuery 1.9.0.  
Any suggestiions appreciated!

Here is my javascript from my test page:

                     jQuery(function ($) {
                    if (typeof $.fn.annotator !== 'function') {
                        alert("Ooops! it looks like you haven't built the Annotator concatenation file. " +
                            "Either download a tagged release from GitHub, or modify the Cakefile to point " +
                            "at your copy of the YUI compressor and run `cake package`.");
                    } else {
                        // This is the important bit: how to create the annotator and add
                        // plugins
                        .annotator('addPlugin', 'Permissions')
                        .annotator('addPlugin','Store', {
                            prefix: '/text/api/store',
                            annotationData : {
                                url: 'http://'+ window.location.host  + window.location.pathname,
                                documentId: '553e964230040cdcf4ecf4d4'
                            loadFromSearch: {
                                limit: 0,
                                all_fields: 1,
                                documentId: '553e964230040cdcf4ecf4d4'
                        .annotator('addPlugin', 'Tags');
                        $('#clusterDocViewText').data('annotator').plugins['Permissions'].setUser({ id: 9, username: 'ellen' });                   

More information about the annotator-dev mailing list