Page tree
Skip to end of metadata
Go to start of metadata

Model Repository is a REST service that provide storage and lookup operations for domain model documents (XMI, JSON etc). The domain model is represented in Metadata Interchange (XMI) format and different representations (JSON etc) are generated and provided by this service. Here is the description of REST API being exposed by this service:

  • /mr/<modelName>
    Endpoint for storing XMI document in the catalog, user provide the model name and actual model Identifier (modelName:version) is generated by the service based on the version increment. As part of this operation, JSON representation is also generated and stored in the catalog. The URL of the new created XMI Resource is returned to the caller.
    Methods: POST
  • /mr/xmi/<modelIdentifier>
    Returns a specific XMI document.
    Methods: GET (retrieve), PUT (update), DELETE (delete)
  • /mr/<modelIdentifier>
    To retrieve a JSON document for a given model Identifier.
    Methods: GET

  • /mr/latest/xmi/<modelName>
    To retrieve the latest XMI document for a given model name.
    Methods: GET

  • /mr/latest/json/<modelName>
    To retrieve the latest JSON document for a given model name.
    Methods: GET

  • /mr/list/xmi
    To retrieve all XMI documents from a catalog.
    Methods: GET

  • /mr/list/<modelName>
    To retrieve all XMI documents for a given model name.
    Methods: GET

It is also possible to store standalone JSON documents those are not directly mapped to some XMI documents as:

  • /mr/json/<modelIdentifier>
    Where modelIdentifier is composed of model name and version as (modelName:version).
    Methods: GET (retrieve), POST (add), PUT (update), DELETE (delete)

  • /mr/list/json
    To retrieve all standalone JSON documents from a catalog
    Methods: GET

  • /mr/list/json/<modelName>
    To retrieve all JSON documents for a given model name
    Methods: GET


Examples:

curl -i -H "Content-Type:application/xml" -X POST localhost:9090/repo/mr/{model-name} -d @simple-deployment.xmi

curl -i -X GET localhost:9090/repo/mr/{model-identifier}

curl -i -X GET localhost:9090/repo/mr/xmi/{model-identifier}

curl -i -X GET localhost:9090/repo/mr/latest/json/{model-name}

curl -i -X GET localhost:9090/repo/mr/latest/xmi/{model-name}

Model Repository Distribution

From our artifact repository either Snapshot or Release versions of the distribution can be downloaded. Unpack the distribution and consult the README to know about startup and different configuration parameters.

  • No labels