Stream: implementers
Topic: How to specify payload version?
Tim Berezny (Mar 22 2018 at 13:20):
My API will be supporting multiple versions (FHIR2, 3, 4, other custom apis, etc...), we are currently contemplating the following options for how to specify what is being submitted (or requested)
1. [base]/api/[spec_FHIRversion]/[ResourceType]/[ID]?...
2. [base]/api/[ResourceType]/[ID]?...&_type=json/xml&_spectype=[spec_FHIRversion]
3. Other?
Is there any consensus or generally direction the community has landed on for this? (I think #2 is what's in the SMART on FHIR documentation...)
Jason Walonoski (Mar 22 2018 at 14:55):
As far as I am aware, there is no consensus. I've also heard people talking about versioning in HTTP content negotiation, using headers, etc. I think #1 makes the most sense, personally.
Grahame Grieve (Mar 22 2018 at 19:27):
#1 is simplest, and is legal and mostly what people do, but has the problem that your record has multiple locations depending on version
#2 is not on the table - and I've never seen it in the doco.
#3: see http://wiki.hl7.org/index.php?title=201801_Versioned_API
Last updated: Apr 12 2022 at 19:14 UTC