Closed acka47 closed 7 years ago
Provide nested JSON-LD instead of flat @graph structure, see lodmill-449.
Add query as seperate JSON object with information on issued when, number of results etc., see comment https://github.com/lobid/lodmill/issues/297#issuecomment-43178953 and following.
From our experience with the current API so far having different routes for different kinds of data (/person
, /subject
, etc.) is rather confusing. Instead, we could implement a single route (e.g. /data
) and filter everything using the type
query parameter.
This new route could simply be added without changing the existing routes, which we would deprecate.
Note: this does not affect our own URIs (/resource/ID
, organisation/ID
), which we would retain.
Having different query parameters for different field sets (id=
, name=
, q=
) introduces much complexity on the implementation level. For a 2.0 API I'd prefer a single q=
parameter for all queries, with an optional (default would be all fields, as with current q=
), additional parameter (e.g. q=Essen&domain=name
).
For details on the desired JSON-LD structure see:
http://manu.sporny.org/2014/json-ld-origins-2/#comment-4189
And especially https://github.com/lobid/lodmill/issues/433 where the approach for lobid to get nested JSON-LD is described in detail.
Since we want a custom JSON-LD format in different ways (see previous two comments), I think we should manually create the JSON-LD representation and generate other representations from that, instead of manually creating a different representation and generating the (insufficient) JSON-LD representation from it (as we currently do).
We should take API 2.0 as an opportunity to also differentiate more betwen the linked data part where locally created data with links to other services (GND, GeoNames etc.) is provided and the API where the local data enriched with data from the linked this-party sources is offered. This might be achieved by pre-filtering the linked data served from /resource and /organisation URIs with a JSON-LD frame.
We should consider switching to https with API 2.0.
For Api 2.0 , I´d suggest another trick. It would be nice to always get a prefLabel as a side car to all occurrences of @id (in document AND in context) . The usage of prefLabel would give clients a simple, unified and intuitive way to access the index and to mock views on lobid data. It can also be useful for configuring the index (e.g. boosting prefLabel). Some examples:
It would be great to support Triple Fragment Patterns with API 2.0. This would enable people to run SPARQL queries against lobid. There already exists a Triple Pattern Fragments server for Java.
As API 2.0 has been officially launched, I am closing this issue.
In the past weeks we have discussed some additions to the lobid API that would result in incompatibilities with the existing API version 1.x.x and thus would mean a change to version 2.0.0.
This is the main issue to discuss the changes included in this version upgrade. Tickets for individual work packages will be linked to this issue.