Search and Request Europeana resources as Json-ld

6 views
Skip to first unread message

florent andre

unread,
Dec 8, 2014, 6:08:39 AM12/8/14
to europe...@googlegroups.com
Hello there !

(redirecting question from europeana-lod ml)

Reading this page : http://labs.europeana.eu/api/record-jsonld/ I hoped resources fetching can be done in Json-LD.

But I don't see clearly how to query for json-ld representations. I tried different "standard" way of quering (use of accept hearder), but none of good results.

Please see my tests bellow [1].

Reading part on "Linked Open Data" induce me some trouble on the percentage of dataset I can possibly get in Json-ld.

Please suggest any documentation or point obvious mistakes I done in my curl queries.

Thanks.

[1] : europeana.query.sh file :

#!/bin/sh                     
                                                                                                                                                                                                        


# Search is currently okay and return results as Json                                                                                                                                                                                 
echo "============="
curl 'http://www.europeana.eu/api/v2/search.json?query=vinci&wskey=api2demo'
echo "\n\n\n"

# querying the search as json-ld currently not working with header                                                                                                                                                                    
echo "============="
curl -H "Accept: application/ld+json" 'http://www.europeana.eu/api/v2/search.json?query=vinci&wskey=api2demo'
echo "\n\n\n"

echo "============="
curl 'http://www.europeana.eu/api/v2/search.jsonld?query=vinci&wskey=api2demo'
echo "\n\n\n"

echo "============="
curl 'http://www.europeana.eu/api/v2/search.json-ld?query=vinci&wskey=api2demo'
echo "\n\n\n"

Gordea Sergiu

unread,
Dec 10, 2014, 10:12:27 AM12/10/14
to europe...@googlegroups.com

Hi Florent Andre,

 

Here is the server side code for the functionality you want to use…

https://github.com/europeana/api2/blob/master/api2-war/src/main/java/eu/europeana/api2/v2/web/controller/ObjectController.java

 

and this is the method signature

@RequestMapping(value = { "/{collectionId}/{recordId}.jsonld", "/{collectionId}/{recordId}.json-ld" }, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)

public ModelAndView recordJSONLD(

@PathVariable String collectionId,

@PathVariable String recordId,

@RequestParam(value = "wskey", required = true) String wskey,

@RequestParam(value = "format", required = false, defaultValue="compacted") String format,

@RequestParam(value = "callback", required = false) String callback,

HttpServletRequest request, HttpServletResponse response)

 

The search API (https://github.com/europeana/api2/blob/master/api2-war/src/main/java/eu/europeana/api2/v2/web/controller/SearchController.java)

returns only object “previews” in JSON format, the  object access API supports JSON-LD.

 

BR,

 

Sergiu

--
You received this message because you are subscribed to the Google Groups "Europeana API forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to europeanaAPI...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

James Morley

unread,
Dec 10, 2014, 10:27:38 AM12/10/14
to europe...@googlegroups.com
Thanks Sergiu, I was just trying to put together a response myself. It seems hat our documentation at http://labs.europeana.eu/api/record-jsonld/ is a little unclear. Any suggestions from anyone for improvements, especially based on practical experience, would be welcome.

Regards, James


From: europe...@googlegroups.com [europe...@googlegroups.com] on behalf of Gordea Sergiu [Sergiu...@ait.ac.at]
Sent: 10 December 2014 16:12
To: europe...@googlegroups.com
Subject: RE: {Europeana API forum} Search and Request Europeana resources as Json-ld


James Morley

Creative Industries Community Developer

 

T:
M: +44 (0)77 1336 0563
E: James....@europeana.eu

Skype: jamesinealing

 

If you’re interested in Europe’s cultural heritage, sign up for our newsletter at http://eepurl.com/SAaC5 and start receiving our monthly eNews, in English or French!

 

Europeana makes Europe’s culture available for all, across borders and generations and for creative re-use – follow how at #AllezCulture 

 

Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. If you are not the named addressee you should not disseminate, distribute or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system.


florent andre

unread,
Dec 10, 2014, 10:28:06 AM12/10/14
to europe...@googlegroups.com, wiem marzouk
Hi,

Thanks for this answer.
Any plan to allow json-ld (or any other ld related format) in the search ?

Thanks.

florent andre

unread,
Dec 10, 2014, 10:30:34 AM12/10/14
to europe...@googlegroups.com
we actually working on it (json-ld query style), so we may improve it.
Is this documentation also in a github repository ?

++

Péter Király

unread,
Dec 10, 2014, 10:40:25 AM12/10/14
to europe...@googlegroups.com
Hi,

JSON-LD call's parameters are identical with the "normal" object call.
The only difference is that the user should use [recordID].jsonld or
[recordID].json-ld instead of [recordID].json.

http://europeana.eu/api/v2/record/[recordID].json-ld
http://europeana.eu/api/v2/record/[recordID].jsonld

for example:
http://europeana.eu/api/v2/record//2021618/internetserver_Details_kunst_25081.jsonld

For the parameters consult the Object call's documentation:
http://labs.europeana.eu/api/record/.

BTW: The JSON-LD call seem to be out of order right now.

Regards,
Péter Király


--
Péter Király
software developer

Göttingen Society for Scientific Data Processing - http://gwdg.de
eXtensible Catalog - http://eXtensibleCatalog.org

James Morley

unread,
Dec 10, 2014, 10:41:51 AM12/10/14
to europe...@googlegroups.com
Hi,


I have just done some basic tidying up of the text and formatting, but please feel free to suggest other things.

Best wishes, James


From: europe...@googlegroups.com [europe...@googlegroups.com] on behalf of florent andre [flo....@gmail.com]
Sent: 10 December 2014 16:30
To: europe...@googlegroups.com
Subject: Re: {Europeana API forum} Search and Request Europeana resources as Json-ld

James Morley

unread,
Dec 10, 2014, 10:45:52 AM12/10/14
to europe...@googlegroups.com
As to this question, I will have to ask colleagues to see if there are.

Best wishes, James


---
James Morley
www.jamesmorley.net / @jamesinealing
www.whatsthatpicture.com / @PhotosOfThePast

James Morley

unread,
Dec 10, 2014, 10:48:40 AM12/10/14
to europe...@googlegroups.com
Sorry, I mistakenly sent that from my gmail account rather than the work one!


From: europe...@googlegroups.com [europe...@googlegroups.com] on behalf of James Morley [ja...@jamesmorley.net]
Sent: 10 December 2014 16:45
To: europe...@googlegroups.com
Subject: Re: {Europeana API forum} Search and Request Europeana resources as Json-ld

As to this question, I will have to ask colleagues to see if there are.

Best wishes, James


---
James Morley
www.jamesmorley.net / @jamesinealing
www.whatsthatpicture.com / @PhotosOfThePast

James Morley

Creative Industries Community Developer

 

T:
M: +44 (0)77 1336 0563
E: James....@europeana.eu

Skype: jamesinealing

 

If you’re interested in Europe’s cultural heritage, sign up for our newsletter at http://eepurl.com/SAaC5 and start receiving our monthly eNews, in English or French!

 

Europeana makes Europe’s culture available for all, across borders and generations and for creative re-use – follow how at #AllezCulture 

 

Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. If you are not the named addressee you should not disseminate, distribute or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system.


David Haskiya

unread,
Dec 10, 2014, 10:49:04 AM12/10/14
to europe...@googlegroups.com
Hi all,
There is indeed a bug that makes the full record call for JSON-LD and RDF-XML not work. Our apologies. We've logged the bug and will fix it as soon as we can.

And big thanks to Peter for notifying us!

Best regards,
David Haskiya

Product Development Manager

Gordea Sergiu

unread,
Dec 10, 2014, 11:13:35 AM12/10/14
to europe...@googlegroups.com

As we are talking about the object access here, I notices that we have the statsDuration field in this API response..

 

http://europeana.eu/api/v2/record/2021618/internetserver_Details_kunst_25081.json?wskey=xxx&profile=standard

 

but this field is not present in the search API result:

http://europeana.eu/api//v2/search.json?wskey=xxx&profile=standard&query=europeana_id%3A\%2F07501\%2F*&start=1&rows=1

 

Any plans to add it to this API Response, too?

 

BR,

 

Sergiu

 

From: europe...@googlegroups.com [mailto:europe...@googlegroups.com] On Behalf Of David Haskiya
Sent: Mittwoch, 10. Dezember 2014 16:49
To: europe...@googlegroups.com
Subject: Re: {Europeana API forum} Search and Request Europeana resources as Json-ld

 

Hi all,

--

Bram Lohman

unread,
Dec 11, 2014, 9:17:17 AM12/11/14
to europe...@googlegroups.com
Unfortunately this slipped through our tests when we upgraded to Java7. We've located the bug and have a fix in place, which we hope to deploy by middle of next week. Once things are working again, I'll update this thread.

Apologies for the inconvenience caused!
Bram Lohman

Development Lead

David Haskiya

unread,
Dec 19, 2014, 3:02:23 AM12/19/14
to europe...@googlegroups.com
Hi,
The bug affecting record calls for JSON-LD and RDF/XML have now been fixed. Note that only record calls support these formats. Search calls return only regular JSON.

Examples:

Apologies for the inconvenience!

Cheers,
David Haskiya

Product Development Manager
Reply all
Reply to author
Forward
0 new messages