trompamusic/ce-api

Define https://trompamusic.eu/vocab route

Closed this issue · 8 comments

Please could we modify the TROMPA web server to point https://trompamusic.eu/vocab to an RDF resource (which I will provide)?

Extra bonus points if we can get it to respect content negotiation, i.e. return vocab.json if Accept header is "application/json" or "application/ld+json", and vocab.ttl if Accept header is "text/turtle".

(per discussion with @alastair)

To be clear, I can provide the file(s) for hosting on the TROMPA server; it doesn't need to proxy to somewhere else.

Hello @musicog for paths off the main domain we can do redirect HTTP 301 Moved Permanently to a url of your choice. However this is not something that we can do for a large amount of files. We could create a subdomain NAME.trompamusic.eu/vocab that points to your "server" (A or CNAME DNS record) or in this case to a bucket in our S3 storage where you could put the files.

With S3 it is possible to set the content type header when putting a file in storage but you need 3 separate files for your use case 1 for application/json, application/json+ld and text/turtle

would it be possible to serve these directly off the server that hosts trompamusic.eu? These files won't have to be modified much once they are created. When David said "point to a resource" he just means "serve a specific file", not a redirect.

The server that runs trompamusic.eu right now is not meant as a durable file storage and only runs the website. Our preference would be to setup a subdomain to S3 where you can put the files and edit when needed.

https://vocab.trompamusic.eu/vocab would also be fine. I'm happy to supply the separate files. In an ideal scenario and if it's no extra work to set up, I'd like:

"application/json" and "application/ld+json" => vocab.json
"text/turtle" => vocab.ttl
"text/n3" => vocab.n3
"application/rdf+xml" => vocab.rdf

Ideally they would all be served as "vocab", with the appropriate content-type and without a suffix.

n.b. the mime type for json-ld is "application/ld+json", not "application/json+ld" as in my original comment (I'll edit now to correct)

As far as I know different returns based on content type is not something that is possible with S3 storage.

I wil put the creation of a subdomain and bucket on our planning to discus internally and then I will come back to you.

The vocab.trompamusic.eu subdomain with corresponding S3 bucket was created months ago so this ticket can be closed @ChristiaanScheermeijer