[annotator-dev] Annotations Not getting loaded on initializing annotator
Apurva Jalit
apurva.jalit at gmail.com
Fri Mar 27 16:06:31 UTC 2015
That didn't help too. I just tried. The new response:
{"total":1,"rows":[{"id":0,"annotator_schema_version":"v1.0","created":"2015-03-27T16:05:21Z","updated":"2015-03-27T16:05:21Z","text":"save","quote":"extension","uri":"file:///C:/Users/apurva.jalit/work/NotocolExtension/Google%20Chrome%20Extension1/index.htm","ranges":[{"start":"/p[3]","startoffset":37,"end":"/p[3]","endoffset":47}],"user":"aps","consumer":"","tags":[],"permission":{"read":["group:__world__"],"admin":null,"update":null,"delete":null}}]}
On Fri, Mar 27, 2015 at 9:33 PM, Randall Leeds <tilgovi at hypothes.is> wrote:
> I think, in your response, you want to use the key "rows" rather than
> "annotations".
> On Mar 27, 2015 8:58 AM, "Apurva Jalit" <apurva.jalit at gmail.com> wrote:
>
>> Hello,
>> I am implementing the REST APIs required to support annotatorjs. My
>> server is SQL server and APIs are written in C#.
>> I have been able to write APIs for search and create. Everything execute
>> perfectly fine without any error being seen on the browser page. But after
>> creation, I am testing the loading of previously created annotations but I
>> fail to see any of these annotations and no error as well.
>> When I initialize the annotator, I have included the following :
>> content.annotator('addPlugin', 'Store', {
>>
>> // The endpoint of the store on your server.
>> prefix: 'http://localhost:5555/api/Annotation',
>>
>> // Attach the uri of the current page to all annotations to
>> allow search.
>> annotationData: {
>> 'uri': pageURL
>> },
>>
>> // This will perform a "search" action when the plugin loads.
>> Will
>> // request the last 20 annotations for the current url.
>> // eg. /store/endpoint/search?limit=20&uri=
>> http://this/document/only
>> loadFromSearch: {
>> 'count': 20,
>> 'uri': pageURL
>> }
>> });
>>
>> The response I get is as follows:
>> {
>> "total":1,
>> "annotations":[
>> {"id":0,
>> "annotator_schema_version":"v1.0",
>> "created":"2015-03-27T15:32:48Z",
>> "updated":"2015-03-27T15:32:48Z",
>> "text":"asdsad",
>> "quote":"extension",
>>
>> "uri":"file:///C:/Users/apurva.jalit/work/NotocolExtension/Google%20Chrome%20Extension1/index.htm",
>>
>> "ranges":[{"start":"/p[3]","startoffset":37,"end":"/p[3]","endoffset":47}],
>> "user":"aps",
>> "consumer":"",
>> "tags":[],
>> "permission":
>> {"read":["group:__world__"],
>> "admin":null,
>> "update":null,
>> "delete":null
>> }
>> }
>> ]
>> }
>>
>> Is this not enough? Do I have to explicitly make a call to some function
>> to load this annotation?
>>
>> Thanks,
>> Apurva Jalit
>>
>> _______________________________________________
>> annotator-dev mailing list
>> annotator-dev at lists.okfn.org
>> https://lists.okfn.org/mailman/listinfo/annotator-dev
>> Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20150327/2362a475/attachment-0004.html>
More information about the annotator-dev
mailing list