# REST API: definition operations query version ids **Category:** [ITS](https://discourse.openehr.org/c/its/41) **Created:** 2021-12-13 14:53 UTC **Views:** 428 **Replies:** 3 **URL:** https://discourse.openehr.org/t/rest-api-definition-operations-query-version-ids/2191 --- ## Post #1 by @thomas.beale I just realised after we dropped the call that on the question of query formalism version id - if it's a non-numeric version id, i.e. just some name or string like '2019-3' or whatever, then the string could be nameversion - there would be no reliable way to distinguish the name part from the version part. Even worse, a query language could just be called something like AcmeQL20, and have numeric version ids. So we are going to have to either have a separate field, or else a delimiter, e.g "AQL::1" or "AQL(2.3)" or similar, with plain "AQL" always being allowed as well. Preferences for what kind of strings we want to allow? We have a precedent for using the '::' delimiter already, but I'm fine with other approaches. --- ## Post #2 by @pablo @thomas.beale besides the format, what you propose is that `formalism_id is formalism_name + formalism_version`, which I agree. Then formalism_version would be semver, which I also agree with. I think that filed would be part of the `metadata` in the query JSON/XML representation, or some kind of common header, then the body would be the query representation for the specific formalism name and version. That will open the door for ad-hoc or usage-specific/DSL query languages at the API/SM level, which is something I have been expecting for years now, I guess that will also help @sebastian.iancu and his implementation. :upside_down_face: Sadly I couldn't be on today's meeting to hear the details in this topic's discussion. --- ## Post #3 by @thomas.beale [quote="pablo, post:2, topic:2191"] Then formalism_version would be semver, which I also agree with [/quote] It could be, but we don't have control over how other orgs identify versions of their languages... For now, I have gone with [this specification](https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_query_formalism). See also other small modifications (rename 'formalism' field -> 'type' to match REST API) and others, as per SEC call 13 Dec 2021. --- ## Post #4 by @pablo [quote="thomas.beale, post:3, topic:2191"] could be, but we don’t have control over how other orgs identify versions of their languages… [/quote] That is ok, I thought this was openEHR versioning but I see this might be versioning of the formalism by the organization that manages it. --- **Canonical:** https://discourse.openehr.org/t/rest-api-definition-operations-query-version-ids/2191 **Original content:** https://discourse.openehr.org/t/rest-api-definition-operations-query-version-ids/2191