Overview of REST service requests (Web Interface REST service)
There are two types of requests you can make to the REST service:
An operation request is run against a resource and returns resource URIs. A resource can be a specific server, repository, model, Modeler item, association type (named role) or property.
The last element of an operation URI specifies the operation request that is being made. The preceding element specifies the resource against which the operation request is being run.
For example, the following URI makes a Repositories operation request against the Server101 server. The request returns the Repositories that can be accessed from the Server101 server.
https://localhost:57850/ModelerService/Servers/Server101/Repositories
A resource request returns operation URIs that can be run against that resource.
The last element of a request URI specifies the resource. The preceding element specifies the type of the resource.
For example, the following resource URI makes a resource request against the Database101 repository. The resource request returns operation URIs that can be used against the Database101 repository.
https://localhost:57850/ModelerService/Servers/Server101/Repositories/Repository101
Requesting a summary of operation and resource requests from the REST service
From the Rest Service, you can use the Help operation to return a summary of the operation and resource requests you can make to a Web Interface REST service.
<Web Interface website>/ModelerService/Help
Operation requests
The following Operation requests can be made:
Servers - use against the REST service (ModelerService) to return resource URIs for the servers that can be accessed. For more information, see Requesting the available servers from a REST service (Web Interface REST service).
Repositories - use against a server to return resource URIs for the repositories that can accessed. For more information, see Requesting the available databases on a server (Web Interface REST service).
Models - use against a database to return resource URIs for the models that can accessed. For more information, see Requesting the available models from a database (Web Interface REST service).
ModelVersions - use against a model to return resource URIs for the versions of the model that can be accessed. For more information, see Requesting the available versions of a model (Web Interface REST service).
ModelRootItems - use against a model version to return resource URIs for items that are scoped directly to the model. Note that you can also use the ChildItems request to return items that are scoped directly to the model. For more information, see Requesting the items that are scoped to a model (Web Interface REST service).
ChildItems - use against an item to return resource URIs for child items of that item. For more information, see Requesting the child items of an item (Web Interface REST service).
ParentItem - use against an item to return resource URI for the parent item of that item. For more information, see Requesting the parent item of an item (Web Interface REST service).
PropertyDescriptors - use against the model or an item to return resource URIs for the properties of the model or that item. Through these URIs you can read the values of properties. For more information, see Requesting the property values of the model or an item (Web Interface REST service).
The names of the properties are the Modeler Automation Interface names, which can sometimes be different to the names you see on the Property Pages. The property topics in the Modeler Help tell you when the Automation Interface name is different to the property name that appears in Modeler.
To make the property names URI safe, each space in a property name is percent encoded to %20.
RoleDescriptors - use against the model or an item, the REST service returns URIs for the association types (named roles) of the model or that item. Through these URIs you can navigate to the linked items. For more information, see Requesting the items that are linked to the model or an item (Web Interface REST service).
Items are linked to other items in a model through named association types (named roles). For example, when a Stereotype is applied to a Class, the Stereotype is linked to the Class through the 'Stereotypes' association type.
The Automation Interface section of the Modeler Help documents the key association types that are available for each item type. For example, click Class (automation interface) to see the Automation Interface topic for the Class item.
To make the association type names URI safe, each space in an association type name is percent encoded to %20.
Resource request
From a Resource URI, the last element of the URI specifies the resource from which the request is being made. The preceding element specifies the type of the resource.
For example, the following URI is for the Server101 resource, and that resource is a server.
https://localhost:57850/ModelerService/Servers/Server101
The following resource requests can be made:
For the REST Service (ModelerService) - the REST service returns operation URIs for the Help, Servers, Version, LocaleInfo, Enabler Icon and EnablerImage operations. The LocaleInfo request can be used to retrieve the locale and date/time format used by the REST Service.
For a server - the REST service returns operation URIs for the Repositories, Icon and Image operations.
For a repository - the REST service returns operation URIs for the Models, Icon and Image operations.
For a model - the REST service returns operation URIs for the ModelVersions, Icon and Image operations.
For a model version - the REST service returns operation URIs for the ChildItems, ModelRootItems, PropertyDescriptors, RoleDescriptors, Icon and Image operations.
For an item (not a diagram, text diagram, table or matrix) - the REST service returns operation URIs for the ChildItems, ParentItem, PropertyDescriptors, RoleDescriptors, Icon and Image operations.
For an item (diagram) - the REST service returns operation URIs for the ChildItems, ParentItem, PropertyDescriptors, RoleDescriptors, Icon, Image, Diagram and DiagramImageMap. For more information, see Requesting the diagram image and map for a diagram item (Web Interface REST service).
For an item (text diagram, table or matrix) - the REST service returns operation URIs for the ChildItems, ParentItem, PropertyDescriptors, RoleDescriptors, Icon, Image and TextDiagram operations. For more information, see Requesting the content of a text diagram, table or matrix (Web Interface REST service).
For a property - the REST service returns the value of that property. For more information, see Requesting the property values of the model or an item (Web Interface REST service).
For an association type (a named role) - the REST service returns resource URIs for the items that are linked through that association type. For more information, see Requesting the items that are linked to the model or an item (Web Interface REST service).
Note that icons are returned as 32x32 image, and images are returned as 128x128 image.