EHRbase VERSIONED COMPOSITION API

The VERSIONED_COMPOSITION API from EHRbase — 4 operation(s) for versioned_composition.

Operations 4

GET /rest/openehr/v1/ehr/{ehr_id}/versioned_composition/{versioned_object_uid} Get versioned composition #
GET /rest/openehr/v1/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/version Get versioned composition version at time #
GET /rest/openehr/v1/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/version/{version_uid} Get versioned composition version by id #
GET /rest/openehr/v1/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/revision_history Get versioned composition revision history #

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-versioned-composition-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-versioned-composition-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: EHRbase VERSIONED COMPOSITION 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: VERSIONED_COMPOSITION
paths:
  /rest/openehr/v1/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}:
    get:
      tags:
      - VERSIONED_COMPOSITION
      summary: Get versioned composition
      externalDocs:
        url: https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#composition-versioned_composition-get
      operationId: retrieveVersionedCompositionByVersionedObjectUid
      parameters:
      - name: Accept
        in: header
        required: false
        schema:
          type: string
      - name: ehr_id
        in: path
        required: true
        schema:
          type: string
      - name: versioned_object_uid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VERSIONED_COMPOSITION'
            application/xml:
              schema:
                $ref: '#/components/schemas/VERSIONED_COMPOSITION'
  /rest/openehr/v1/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/version:
    get:
      tags:
      - VERSIONED_COMPOSITION
      summary: Get versioned composition version at time
      externalDocs:
        url: https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#ehr_status-versioned_ehr_status-get-3
      operationId: retrieveVersionOfCompositionByTime
      parameters:
      - name: Accept
        in: header
        required: false
        schema:
          type: string
      - name: ehr_id
        in: path
        required: true
        schema:
          type: string
      - name: versioned_object_uid
        in: path
        required: true
        schema:
          type: string
      - name: version_at_time
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OriginalVersionComposition'
            application/xml:
              schema:
                $ref: '#/components/schemas/OriginalVersionComposition'
  /rest/openehr/v1/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/version/{version_uid}:
    get:
      tags:
      - VERSIONED_COMPOSITION
      summary: Get versioned composition version by id
      externalDocs:
        url: https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#composition-versioned_composition-get-2
      operationId: retrieveVersionOfCompositionByVersionUid
      parameters:
      - name: Accept
        in: header
        required: false
        schema:
          type: string
      - name: ehr_id
        in: path
        required: true
        schema:
          type: string
      - name: versioned_object_uid
        in: path
        required: true
        schema:
          type: string
      - name: version_uid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OriginalVersionComposition'
            application/xml:
              schema:
                $ref: '#/components/schemas/OriginalVersionComposition'
  /rest/openehr/v1/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/revision_history:
    get:
      tags:
      - VERSIONED_COMPOSITION
      summary: Get versioned composition revision history
      externalDocs:
        url: https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html#composition-versioned_composition-get-1
      operationId: retrieveVersionedCompositionRevisionHistoryByEhr
      parameters:
      - name: Accept
        in: header
        required: false
        schema:
          type: string
      - name: ehr_id
        in: path
        required: true
        schema:
          type: string
      - name: versioned_object_uid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevisionHistory'
            application/xml:
              schema:
                $ref: '#/components/schemas/RevisionHistory'
components:
  schemas:
    ObjectId:
      type: object
      properties:
        value:
          type: string
    AuditDetails:
      type: object
      properties:
        systemId:
          type: string
        timeCommitted:
          $ref: '#/components/schemas/DvDateTime'
        changeType:
          $ref: '#/components/schemas/DvCodedText'
        description:
          $ref: '#/components/schemas/DvText'
        committer:
          $ref: '#/components/schemas/PartyProxy'
    TermMapping:
      type: object
      properties:
        match:
          type: string
        purpose:
          $ref: '#/components/schemas/DvCodedText'
        target:
          $ref: '#/components/schemas/CodePhrase'
    DvDuration:
      type: 'null'
      properties:
        normalStatus:
          $ref: '#/components/schemas/CodePhrase'
        normalRange:
          $ref: '#/components/schemas/DvIntervalDvDuration'
        otherReferenceRanges:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/ReferenceRangeDvDuration'
        magnitudeStatus:
          type:
          - string
          - 'null'
        accuracy:
          type:
          - number
          - 'null'
          format: double
        accuracyIsPercent:
          type:
          - boolean
          - 'null'
        value:
          type: object
          properties:
            units:
              type: array
              items:
                type: object
                properties:
                  durationEstimated:
                    type: boolean
                  duration:
                    type: string
                  timeBased:
                    type: boolean
                  dateBased:
                    type: boolean
    ItemStructure:
      type: 'null'
      properties:
        name:
          $ref: '#/components/schemas/DvText'
        archetypeNodeId:
          type: string
        uid:
          $ref: '#/components/schemas/UIDBasedId'
        archetypeDetails:
          $ref: '#/components/schemas/Archetyped'
        feederAudit:
          type: 'null'
        links:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/Link'
        items:
          type: array
          items:
            $ref: '#/components/schemas/Item'
        path:
          type: string
    Archetyped:
      type: 'null'
      properties:
        archetypeId:
          $ref: '#/components/schemas/ArchetypeID'
        templateId:
          $ref: '#/components/schemas/TemplateId'
        rmVersion:
          type: string
    PartyRef:
      type: 'null'
      properties:
        namespace:
          type: string
        type:
          type: string
        id:
          $ref: '#/components/schemas/ObjectId'
    ReferenceRangeDvDateTime:
      type: object
      properties:
        range:
          $ref: '#/components/schemas/DvIntervalDvDateTime'
        meaning:
          $ref: '#/components/schemas/DvText'
    Participation:
      type: object
      properties:
        function:
          $ref: '#/components/schemas/DvText'
        mode:
          $ref: '#/components/schemas/DvCodedText'
        time:
          $ref: '#/components/schemas/DvIntervalDvDateTime'
        performer:
          $ref: '#/components/schemas/PartyProxy'
    ObjectRefObjectId:
      type: object
      properties:
        namespace:
          type: string
        type:
          type: string
        id:
          $ref: '#/components/schemas/ObjectId'
    OriginalVersionComposition:
      type: object
      properties:
        contribution:
          $ref: '#/components/schemas/ObjectRefObjectId'
        signature:
          type:
          - string
          - 'null'
        commitAudit:
          $ref: '#/components/schemas/AuditDetails'
        uid:
          $ref: '#/components/schemas/ObjectVersionId'
        precedingVersionUid:
          $ref: '#/components/schemas/ObjectVersionId'
        otherInputVersionUids:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/ObjectVersionId'
        lifecycleState:
          $ref: '#/components/schemas/DvCodedText'
        attestations:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/Attestation'
        data:
          $ref: '#/components/schemas/Composition'
        branch:
          type: boolean
        canonicalForm:
          type: string
    PartyProxy:
      type: 'null'
      properties:
        externalRef:
          $ref: '#/components/schemas/PartyRef'
    DvIntervalDvDuration:
      type: 'null'
      properties:
        lower:
          $ref: '#/components/schemas/DvDuration'
        upper:
          $ref: '#/components/schemas/DvDuration'
        lowerUnbounded:
          type: boolean
        upperUnbounded:
          type: boolean
        lowerIncluded:
          type: boolean
        upperIncluded:
          type: boolean
    EventContext:
      type: 'null'
      properties:
        startTime:
          $ref: '#/components/schemas/DvDateTime'
        endTime:
          $ref: '#/components/schemas/DvDateTime'
        location:
          type:
          - string
          - 'null'
        setting:
          $ref: '#/components/schemas/DvCodedText'
        otherContext:
          $ref: '#/components/schemas/ItemStructure'
        healthCareFacility:
          $ref: '#/components/schemas/PartyIdentified'
        participations:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/Participation'
        path:
          type: string
        pathSegments:
          type: array
          items:
            $ref: '#/components/schemas/PathSegment'
    TerminologyId:
      type: object
      properties:
        value:
          type: string
    RevisionHistoryItem:
      type: object
      properties:
        versionId:
          $ref: '#/components/schemas/ObjectVersionId'
        audits:
          type: array
          items:
            $ref: '#/components/schemas/AuditDetails'
    DvCodedText:
      type: 'null'
      properties:
        value:
          type: string
        hyperlink:
          $ref: '#/components/schemas/DvURI'
        formatting:
          type:
          - string
          - 'null'
        language:
          $ref: '#/components/schemas/CodePhrase'
        encoding:
          $ref: '#/components/schemas/CodePhrase'
        definingCode:
          $ref: '#/components/schemas/CodePhrase'
    UIDBasedId:
      type: 'null'
      properties:
        value:
          type: string
    DvMultimedia:
      type: 'null'
      properties:
        charset:
          $ref: '#/components/schemas/CodePhrase'
        language:
          $ref: '#/components/schemas/CodePhrase'
        alternateText:
          type:
          - string
          - 'null'
        uri:
          $ref: '#/components/schemas/DvURI'
        data:
          type:
          - string
          - 'null'
          format: byte
        mediaType:
          $ref: '#/components/schemas/CodePhrase'
        compressionAlgorithm:
          $ref: '#/components/schemas/CodePhrase'
        integrityCheck:
          type:
          - string
          - 'null'
          format: byte
        integrityCheckAlgorithm:
          $ref: '#/components/schemas/CodePhrase'
        size:
          type: integer
          format: int32
        thumbnail:
          $ref: '#/components/schemas/DvMultimedia'
    ObjectVersionId:
      type: object
      properties:
        value:
          type: string
    DvEncapsulated:
      type: 'null'
      properties:
        charset:
          $ref: '#/components/schemas/CodePhrase'
        language:
          $ref: '#/components/schemas/CodePhrase'
    Item:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/DvText'
        archetypeNodeId:
          type: string
        uid:
          $ref: '#/components/schemas/UIDBasedId'
        archetypeDetails:
          $ref: '#/components/schemas/Archetyped'
        feederAudit:
          type: 'null'
        links:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/Link'
        path:
          type: string
    TemplateId:
      type: 'null'
      properties:
        value:
          type: string
    ContentItem:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/DvText'
        archetypeNodeId:
          type: string
        uid:
          $ref: '#/components/schemas/UIDBasedId'
        archetypeDetails:
          $ref: '#/components/schemas/Archetyped'
        feederAudit:
          $ref: '#/components/schemas/FeederAudit'
        links:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/Link'
        path:
          type: string
    PathSegment:
      type: object
      properties:
        nodeName:
          type: string
        nodeId:
          type: string
        archetypeRef:
          type: string
        index:
          type: integer
          format: int32
    PartyIdentified:
      type: 'null'
      properties:
        externalRef:
          $ref: '#/components/schemas/PartyRef'
        name:
          type:
          - string
          - 'null'
        identifiers:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/DvIdentifier'
    ReferenceRangeDvDuration:
      type: object
      properties:
        range:
          $ref: '#/components/schemas/DvIntervalDvDuration'
        meaning:
          $ref: '#/components/schemas/DvText'
    DvIntervalDvDateTime:
      type: 'null'
      properties:
        lower:
          $ref: '#/components/schemas/DvDateTime'
        upper:
          $ref: '#/components/schemas/DvDateTime'
        lowerUnbounded:
          type: boolean
        upperUnbounded:
          type: boolean
        lowerIncluded:
          type: boolean
        upperIncluded:
          type: boolean
    DvEHRURI:
      type: object
      properties:
        value:
          type: string
          format: uri
    RevisionHistory:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/RevisionHistoryItem'
    ArchetypeID:
      type: object
      properties:
        qualified_rm_entity:
          type: string
          writeOnly: true
        domain_concept:
          type: string
          writeOnly: true
        rm_originator:
          type: string
          writeOnly: true
        rm_name:
          type: string
          writeOnly: true
        rm_entity:
          type: string
          writeOnly: true
        specialisation:
          type:
          - string
          - 'null'
        versionId:
          type:
          - string
          - 'null'
        value:
          type: string
        namespace:
          type:
          - string
          - 'null'
        qualifiedRmEntity:
          type:
          - string
          - 'null'
        domainConcept:
          type:
          - string
          - 'null'
        rmOriginator:
          type:
          - string
          - 'null'
        rmName:
          type:
          - string
          - 'null'
        rmEntity:
          type:
          - string
          - 'null'
        semanticId:
          type: string
        fullId:
          type: string
    Composition:
      type: 'null'
      properties:
        name:
          $ref: '#/components/schemas/DvText'
        archetypeNodeId:
          type: string
        uid:
          $ref: '#/components/schemas/UIDBasedId'
        archetypeDetails:
          $ref: '#/components/schemas/Archetyped'
        feederAudit:
          $ref: '#/components/schemas/FeederAudit'
        links:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/Link'
        language:
          $ref: '#/components/schemas/CodePhrase'
        territory:
          $ref: '#/components/schemas/CodePhrase'
        category:
          $ref: '#/components/schemas/DvCodedText'
        composer:
          $ref: '#/components/schemas/PartyProxy'
        context:
          $ref: '#/components/schemas/EventContext'
        content:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/ContentItem'
        path:
          type: string
    Link:
      type: object
      properties:
        meaning:
          $ref: '#/components/schemas/DvText'
        type:
          $ref: '#/components/schemas/DvText'
        target:
          $ref: '#/components/schemas/DvEHRURI'
    DvDateTime:
      type: 'null'
      properties:
        normalStatus:
          $ref: '#/components/schemas/CodePhrase'
        normalRange:
          $ref: '#/components/schemas/DvIntervalDvDateTime'
        otherReferenceRanges:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/ReferenceRangeDvDateTime'
        magnitudeStatus:
          type:
          - string
          - 'null'
        accuracy:
          $ref: '#/components/schemas/DvDuration'
        value: {}
    CodePhrase:
      type: 'null'
      properties:
        terminologyId:
          $ref: '#/components/schemas/TerminologyId'
        codeString:
          type: string
        preferredTerm:
          type:
          - string
          - 'null'
    DvIdentifier:
      type: object
      properties:
        issuer:
          type:
          - string
          - 'null'
        assigner:
          type:
          - string
          - 'null'
        id:
          type: string
        type:
          type:
          - string
          - 'null'
    VERSIONED_COMPOSITION:
      type: object
      properties:
        uid:
          $ref: '#/components/schemas/HierObjectId'
        owner_id:
          $ref: '#/components/schemas/ObjectRefObjectId'
        time_created:
          type: string
        _type:
          type: string
    FeederAuditDetails:
      type: 'null'
      properties:
        systemId:
          type: string
        location:
          $ref: '#/components/schemas/PartyIdentified'
        provider:
          $ref: '#/components/schemas/PartyIdentified'
        subject:
          $ref: '#/components/schemas/PartyProxy'
        time:
          $ref: '#/components/schemas/DvDateTime'
        versionId:
          type:
          - string
          - 'null'
        otherDetails:
          $ref: '#/components/schemas/ItemStructure'
    HierObjectId:
      type: object
      properties:
        value:
          type: string
    Attestation:
      type: object
      properties:
        systemId:
          type: string
        timeCommitted:
          $ref: '#/components/schemas/DvDateTime'
        changeType:
          $ref: '#/components/schemas/DvCodedText'
        description:
          $ref: '#/components/schemas/DvText'
        committer:
          $ref: '#/components/schemas/PartyProxy'
        attestedView:
          $ref: '#/components/schemas/DvMultimedia'
        proof:
          type:
          - string
          - 'null'
        items:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/DvEHRURI'
        reason:
          $ref: '#/components/schemas/DvText'
        pending:
          type: boolean
    DvURI:
      type: 'null'
      properties:
        value:
          type: string
          format: uri
    DvText:
      type: object
      properties:
        value:
          type: string
        hyperlink:
          $ref: '#/components/schemas/DvURI'
        formatting:
          type:
          - string
          - 'null'
        mappings:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/TermMapping'
        language:
          $ref: '#/components/schemas/CodePhrase'
        encoding:
          $ref: '#/components/schemas/CodePhrase'
    FeederAudit:
      type: 'null'
      properties:
        originatingSystemItemIds:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/DvIdentifier'
        feederSystemItemIds:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/DvIdentifier'
        originalContent:
          $ref: '#/components/schemas/DvEncapsulated'
        originatingSystemAudit:
          $ref: '#/components/schemas/FeederAuditDetails'
        feederSystemAudit:
          $ref: '#/components/schemas/FeederAuditDetails'
externalDocs:
  description: EHRbase Documentation
  url: https://docs.ehrbase.org/