Provide download of all concepts of a concept scheme
Closed this issue · 2 comments
Endpoints GET /mappings and GET /concordances provide a download=[type]
parameter. This should also be added to endpoint GET /voc/concepts to allow direct download of all concepts of a concept scheme. The link(s) should also be injected as distribution
to concept schemes, e.g.
{
"distributions": [ {
"download": ["https://coli-conc.gbv.de/api/voc/concepts?uri=https%3A%2F%2Fbartoc.org%2Fen%2Fnode%2F20400&download=ndjson"],
"format": ["http://format.gbv.de/jskos"],
"mimetype": "application/x-ndjson; charset=utf-8"
} ]
}
This would allow providing download links for vocabularies. Current workaround is to query /voc/concepts multiple times with increased offset
.
I was sure we had this already, but it's not in there. Should be easy to implement I think. The distributions
field is now generated dynamically anyway, so we could easily add it to concept schemes for those which are served by the same jskos-server instance (or even based on the API
field if we detect a JSKOS API).
@nichtich Can you check the implementation? I've added JSON and NDJSON download for the /voc/concepts endpoint and added the distributions
field to schemes, including ones from the API
field. (This means we could also add a "download" button in BARTOC with these if they are available in a JSON API.)