Get stored query at version

Retrieves the definition of a particular stored query (at specified version) and its associated metadata.

Path Parameters
  • qualified_query_name
    Type: string · QueryName
    required

    The (fully qualified) name of the query to be executed, in a format of [{namespace}::]{query-name}.

  • version
    Type: string
    required

    A 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. 1 or 1.0), in which case the highest (latest) version matching the prefix will be considered.

Responses
  • application/json
  • 404

    404 Not Found is returned when a stored query with qualified_query_name and version does 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'"
}