icpc / ccs-specs

Contest Control System specifications
https://ccs-specs.icpc.io
9 stars 9 forks source link

Header with API version #154

Open kunyavskiy opened 1 year ago

kunyavskiy commented 1 year ago

When supporting several API versions as a client, it's annoying to guess or manually choose between versions of API.

Maybe it would be nice to have some standard place to look up version. For example, we can specify that the server should send X-CLICS-API-VERSION: something HTTP header with response. Although it doesnt' seams to be easy to update existing ones, but still having it in new versions would be useful.

eldering commented 1 year ago

Are you aware of https://ccs-specs.icpc.io/2022-07/contest_api#api-information ? This does require an extra API call, but basically provides what you're looking for.

We could consider also recommending/requiring adding it as a response header.

kunyavskiy commented 1 year ago

Hm, yes, that's something very similar, thank you!

eldering commented 1 year ago

Can this issue be closed or would you prefer the header?

kunyavskiy commented 1 year ago

I think a header would be more convenient, as it allows us to use only event-feed. But this is fine too. I'm not sure how hard it is.