Store a query
Stores a new query, or updates an existing query on the system.
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}.
Query Parameters
- Type: string
query _type Parameter indicating the query language/type.
Body
required
text/plain
- Type: string · AQL
The given AQL query.
Responses
400 400 Bad Requestis returned when the server was unable to store the query. This could be due to incorrect request body (could not be parsed, etc), unknown query type, etc.
Request Example for put/definition/query/{qualified_query_name}
curl 'https://cataniamc.prod.cadasto.com/v1/definition/query/org.openehr::compositions?query_type=AQL' \
--request PUT \
--header 'Content-Type: text/plain' \
--data 'SELECT c FROM
EHR e
CONTAINS COMPOSITION c[openEHR-EHR-COMPOSITION.encounter.v1]
CONTAINS OBSERVATION obs[openEHR-EHR-OBSERVATION.blood_pressure.v1]
WHERE
obs/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude >= $systolic_bp'
No Body