Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion: APIs #27

Open
kintopp opened this issue Aug 3, 2018 · 1 comment
Open

Discussion: APIs #27

kintopp opened this issue Aug 3, 2018 · 1 comment
Labels

Comments

@kintopp
Copy link
Member

kintopp commented Aug 3, 2018

Placeholder for API discussions. Currently, on the suggestion that EM Places support the new Linked Places Gazetteer Interchange Format https://github.com/LinkedPasts/linked-places for Pelagios compatibility, not the Peripleo v1 or v2 API.

@kintopp kintopp added the API label Aug 3, 2018
@gklyne
Copy link
Contributor

gklyne commented Aug 3, 2018

My preference for programmatic access to LPIF data would to use a simple HTTP GET to a published place URL, using HTTP content negotiation to access the LPIF data format.

For example

Client requests:

C: GET /place/place-id
C: Host: example.org
C: Accept: application/vnd.linkedpasts.place+json

Server responds with something like:

S: HTTP/1.1 302 Found
S: Location: http://example.org/place/linkedpasts-place/place-id

A subsequent request to http://example.org/place/linkedpasts-place/place-id returns LPIF data. This all means that there is no "secret handshake" whereby the client has to have prior knowledge of how the server offers LPIF as opposed to (say) EMPlaces linked data format, and doesn't preempt the server's control of its URI space (cf. https://tools.ietf.org/html/rfc7320).

For this to work, there needs to be a MIME content type for the LPIF data that is distinct from other formats that a server might return; hence an issue I've raised at Linked Pasts: LinkedPasts/linked-places-format#4.

If we're generating LPIF data dumps, I believe this could be implemented using an off-the-shelf web server (e.g. Apache or Nginx) to front-end the EMPlaces server, to generate the content negotiation redirects or reverse-proxy according to the specific request received.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants