hbz / lobid

Linking Open Bibliographic Data
https://lobid.org/
Eclipse Public License 2.0
16 stars 4 forks source link

Bring API 2.0 index data to /resources - as linked data #289

Closed jschnasse closed 8 years ago

jschnasse commented 8 years ago

Yesterday I noticed that API 2.0 will coin totally new URIs using http://lobid.org/resources instead of http://lobid.org/resource . What I like to suggest is to make the new URIs work for requests with GET accept: application/json this can be done immediately with a simple apache rewrite something like

/resources/$1 http://gaia.hbz-nrw.de:9200/resources/_all/$1/_source

should do the trick. The advantage would be (hopefully), that sameAs links (e.g. ZDB vs. HT) in the current 2.0 index can be used directly without any postprocessing. Also it would provide the new index as linked data.

dr0i commented 8 years ago

Thx, this is a nice low hanging fruit, yummy :) . Enjoy e.g. http://lobid.org/resources/HT013304490.

But:

dr0i commented 8 years ago

@jschnasse besides the two issues that have arised from this ticket, are you comfortable with the solution?

fsteeg commented 8 years ago

The rewrite from http://lobid.org/resources/HT013304490 seems to got to:

http://gaia.hbz-nrw.de:9200/resources/resource/HT013304490

instead of:

http://gaia.hbz-nrw.de:9200/resources/resource/HT013304490/_source

dr0i commented 8 years ago

Fixed. Using

RewriteRule ^/resources/(.*) http://gaia.hbz-nrw.de:9200/resources/_all/$1/_source [P]
jschnasse commented 8 years ago

+1

dr0i commented 8 years ago

Deployed to production, closing.