Get stored query at version
Retrieves the definition of a particular stored query (at specified version) and its associated metadata.
Path Parameters
- Type: string · QueryName
qualified _query _name requiredThe (fully qualified) name of the query to be executed, in a format of
[{namespace}::]{query-name}. - Type: string
version requiredA SEMVER version number. This can be a an exact version (e.g.
1.7.1), or a pattern as partial prefix, in a form of{major}or{major}.{minor}(e.g.1or1.0), in which case the highest (latest) version matching the prefix will be considered.
Responses
- application/json
404 404 Not Foundis returned when a stored query withqualified_query_nameandversiondoes not exist.
Request Example for get/definition/query/{qualified_query_name}/{version}
curl https://cataniamc.prod.cadasto.com/v1/definition/query/org.openehr::compositions/1.0
{
"name": "org.openehr::compositions",
"type": "aql",
"version": "1.0.1",
"saved": "2017-07-16T19:20:30.450+01:00",
"q": "SELECT c FROM EHR e[ehr_id/value=$ehr_id] CONTAINS COMPOSITION c[$compositionid] WHERE c/name/value = 'Vitals'"
}