voc/voctoweb

REST API conference canonical url is not equal between endpoints

Closed this issue · 1 comments

toto commented

On requesting a list of all conferences using the GET /conferences endpoint the API returns a list of "mini"-conferences looking like this:

{"acronym": "eh15",
 "url": "https://api.media.ccc.de/public/conferences/59",
 …}

however if you request the same resource using the singular resource endpoint GET /conferences/59 the response looks like this:

{"acronym": "eh15",
"url": "https://api.media.ccc.de/public/conferences/eh15",
…}

Both urls work and return the same representation of the conference. However this can lead to problems in client implementations following the url from the first endpoint to the second and getting a different url back.
In my mind the url should point to the canonical URL of the resource, either with ID or acronym as part of the URL.

We should probably prefer the named variants, but they were added later – thats why the REST API is a little bit inconsistent.

Feel free to create a PR or use the new GraphQL API described at https://github.com/voc/voctoweb#public-graphql-api :-)