EHRbase STORED QUERY API

The STORED_QUERY API from EHRbase — 3 operation(s) for stored_query.

Operations 5

GET /rest/openehr/v1/definition/query/{qualified_query_name}/{version} Get stored query and info/metadata #
PUT /rest/openehr/v1/definition/query/{qualified_query_name}/{version} Store a query #
GET /rest/openehr/v1/definition/query/{qualified_query_name} List stored queries #
PUT /rest/openehr/v1/definition/query/{qualified_query_name} Store a query #
GET /rest/openehr/v1/definition/query List stored queries #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ehrbase-stored-query-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ehrbase-stored-query-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: EHRbase STORED QUERY API
  description: 'EHRbase implements the official openEHR REST API. Additionally, EHRbase provides a custom `status` heartbeat endpoint, an Admin API (if activated) and a Status and Metrics API (if activated) for monitoring and maintenance. Note: The openEHR REST API is documented in their official documentation, not here. Please refer to their separate documentation.'
  license:
    name: Apache 2.0
    url: https://github.com/ehrbase/ehrbase/blob/develop/LICENSE.md
  version: v1
servers:
- url: https://sandkiste.ehrbase.org/ehrbase
  description: Generated server url
tags:
- name: STORED_QUERY
paths:
  /rest/openehr/v1/definition/query/{qualified_query_name}/{version}:
    get:
      tags:
      - STORED_QUERY
      summary: Get stored query and info/metadata
      externalDocs:
        url: https://specifications.openehr.org/releases/ITS-REST/latest/definitions.html#definitions-stored-query-get-1
      operationId: getStoredQueryVersion
      parameters:
      - name: Accept
        in: header
        required: false
        schema:
          type: string
      - name: qualified_query_name
        in: path
        required: true
        schema:
          type: string
      - name: version
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryDefinitionResponseData'
            application/xml:
              schema:
                $ref: '#/components/schemas/QueryDefinitionResponseData'
    put:
      tags:
      - STORED_QUERY
      summary: Store a query
      description: Content type application/json is still supported but it's deprecated, please use text/plain instead.
      externalDocs:
        url: https://specifications.openehr.org/releases/ITS-REST/latest/definitions.html#definitions-stored-query-put
      operationId: putStoredQuery
      parameters:
      - name: Content-Type
        in: header
        required: false
        schema:
          type: string
      - name: Accept
        in: header
        required: false
        schema:
          type: string
      - name: qualified_query_name
        in: path
        required: true
        schema:
          type: string
      - name: version
        in: path
        required: true
        schema:
          type: string
      - name: query_type
        in: query
        required: false
        schema:
          type: string
          default: AQL
      requestBody:
        content:
          text/plain:
            schema:
              type: string
          application/json:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryDefinitionResponseData'
  /rest/openehr/v1/definition/query/{qualified_query_name}:
    get:
      tags:
      - STORED_QUERY
      summary: List stored queries
      externalDocs:
        url: https://specifications.openehr.org/releases/ITS-REST/latest/definition.html#tag/Query/operation/definition_query_list
      operationId: getStoredQueryList
      parameters:
      - name: Accept
        in: header
        required: false
        schema:
          type: string
      - name: qualified_query_name
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/QueryDefinitionResponseData'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/QueryDefinitionResponseData'
    put:
      tags:
      - STORED_QUERY
      summary: Store a query
      description: Content type application/json is still supported but it's deprecated, please use text/plain instead.
      externalDocs:
        url: https://specifications.openehr.org/releases/ITS-REST/latest/definitions.html#definitions-stored-query-put
      operationId: putStoredQuery_1
      parameters:
      - name: Content-Type
        in: header
        required: false
        schema:
          type: string
      - name: Accept
        in: header
        required: false
        schema:
          type: string
      - name: qualified_query_name
        in: path
        required: true
        schema:
          type: string
      - name: query_type
        in: query
        required: false
        schema:
          type: string
          default: AQL
      requestBody:
        content:
          text/plain:
            schema:
              type: string
          application/json:
            schema:
              type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryDefinitionResponseData'
  /rest/openehr/v1/definition/query:
    get:
      tags:
      - STORED_QUERY
      summary: List stored queries
      externalDocs:
        url: https://specifications.openehr.org/releases/ITS-REST/latest/definition.html#tag/Query/operation/definition_query_list
      operationId: getStoredQueryList_1
      parameters:
      - name: Accept
        in: header
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/QueryDefinitionResponseData'
            application/xml:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/QueryDefinitionResponseData'
components:
  schemas:
    QueryDefinitionResponseData:
      type: object
      properties:
        q:
          type: string
        name:
          type: string
        type:
          type: string
        version:
          type: string
        saved:
          type: string
externalDocs:
  description: EHRbase Documentation
  url: https://docs.ehrbase.org/