Requesting the property values of the model or an item (Web Interface REST service)
The model and each item type in Modeler has a set of properties.
The Help topics for the Modeler Automated Interface provide information about what properties are available for the model each item type.
The PropertyDescriptors request returns resource URIs for the property types of the model or an item that are available through the REST service. You can then use a returned URI for a property type to return the value of that property.
Note that the following properties of a diagram are not available through the REST service: BMP File, Chunked RTF, EMF Plus Only, Hyperlinked RTF, Image Map File, Image Map File Raster, Meta File, PNG File, Print Meta File, RTF File, Text File, Web Diagram Raster and XML Report.
Request
The syntax of the URI for a PropertyDescriptors request is as follows. The request returns resource URIs for the property types of the model or an item.
• <Web Interface website> - is the URI for the Web Interface website.
• <server name> is the name of the server.
If the server name contains reserved characters, those characters must be percent encoded in the URI. Use the Servers operation request to return the URI safe version of the server name.
• <repository name> is the name of the database.
If the database name contains reserved characters, those characters must be percent encoded in the URI. Use the Repositories operation request to return the URI safe version of the database name.
• <model name> is the name of the model.
If the model name contains reserved characters, those characters must be percent encoded in the URI. Use the Models operation request to return the URI safe version of the model name.
Note that the REST service cannot work with Models that have the percentage character (%) in their names.
• <version> is the version number of the model, as it appears in Model Explorer.
• <item id> is the id of the Modeler item, against which the PropertyDescriptors or Properties operation is being run.
You can find out the ids of items through operation requests such as ChildItems operation request.
• <property types> is the names of the property types for which you want to return property values. Delimit multiple properties using a comma.
If the property type name contains spaces, those spaces must be percent encoded in the URI (%20 for a space). Use the PropertyDescriptors operation request to return the URI safe versions of the property names.
Returned XML
The PropertyDescriptors request returns a URI for each property type of the model or an item.
The returned XML is as follows (not all the returned code is shown). You can see that there is a URIs for the Is Signal and Is Structure properties Note that each space in the name has been replaced with %20.
The first resource URI from the preceding XML returns the property of the Is Signal property of Class1. We modify the URI to return the value of Is Signal and Is Structure properties at the same time. The request is as follows.