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:
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.
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.
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.
Note that icons are returned as 32x32 image, and images are returned as 128x128 image.