Publisher and Web Interface > Web Interface > Web Interface REST service > Requesting resources through the REST service > Requesting the property values of the model or an item (Web Interface REST service)
  
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.
For the model:
<Web Interface website>/ModelerService/Servers/<server name>/Repositories/<repository name>/Models/<model name>/ModelVersions/<version/PropertyDescriptors
For an item:
<Web Interface website>/ModelerService/Servers/<server name>/Repositories/<repository name>/Models/<model name>/ModelVersions/<version/Item/<item id>/PropertyDescriptors
The syntax of a resource URI for a property type is as follows. The request returns the values of one or more item properties.
For the model:
<Web Interface website>/ModelerService/Servers/<server name>/Repositories/<repository name>/Models/<model name>/ModelVersions/<version/Properties/<property types>
For an item:
<Web Interface website>/ModelerService/Servers/<server name>/Repositories/<repository name>/Models/<model name>/ModelVersions/<version/Item/<item id>/Properties/<property types
Where:
<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 syntax of a returned URI is as follows.
For the model:
<Web Interface website>/ModelerService/Servers/<server name>/Repositories/<repository name>/Models/<model name>/ModelVersions/<version/Properties/<property type>
For an item:
<Web Interface website>/ModelerService/Servers/<server name>/Repositories/<repository name>/Models/<model name>/ModelVersions/<version/Item/<item id>/Properties/<property type>
When you use the preceding URIs for a property type, the REST service returns the values of the properties for the model or an item.
The value of a property is returned through the <Value> tag.
Example
In this example, the PropertyDescriptors request returns URIs for the properties of Class1 (e475d03c-9ed2-45b8-b943-e08d3892651b).
https://localhost:57850/ModelerService/Servers/Server101/Repository/Example1/Models/Model1/ModelVersions/0/Item/e475d03c-9ed2-45b8-b943-e08d3892651b/PropertyDescriptors
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.
<?xml version="1.0"?>
<ArrayOfPropertyDescriptor xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/StudioRESTService.ModelerRESTService">
...
<PropertyDescriptor>
<RequestResult>Complete</RequestResult>
<RequestResultType>Resource</RequestResultType>
<ID/>
<Name>Is Signal</Name>
<ResourceType>Property Descriptor</ResourceType>
<URIs>
<URI>
<href>https://localhost:57850/ModelerService/Servers/Server101/Repositories/Examples/Models/Model1/ModelVersions/0/Item/e475d03c-9ed2-45b8-b943-e08d3892651b/Properties/Is%20Signal</href>
</URI>
</URIs>
<RequestCost>Low</RequestCost>
</PropertyDescriptor>
<PropertyDescriptor>
<RequestResult>Complete</RequestResult>
<RequestResultType>Resource</RequestResultType>
<ID/>
<Name>Is Structure</Name>
<ResourceType>Property Descriptor</ResourceType>
<URIs>
<URI>
<href>https://localhost:578500/ModelerService/Servers/Server101/Repositories/Examples/Models/Model1/ModelVersions/0/Item/e475d03c-9ed2-45b8-b943-e08d3892651b/Properties/Is%20Structure</href>
</URI>
</URIs>
<RequestCost>Low</RequestCost>
</PropertyDescriptor>
...
</ArrayOfPropertyDescriptor>
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.
https://localhost:578500/ModelerService/Servers/Server101/Repository/Example1/Models/Model1/ModelVersions/0/Item/e475d03c-9ed2-45b8-b943-e08d3892651b/Properties/Is%20Signal,Is%20Structure
The returned XML is as follows. You can see that the value of the Is Signal property is FALSE, and the value of the Is Structure property is TRUE.
<?xml version="1.0"?>
<ArrayOfPropertyItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/StudioRESTService.ModelerRESTService">
<PropertyItem>
<RequestResult>Complete</RequestResult>
<RequestResultType>Resource</RequestResultType>
<ID/>
<Name>Is Signal</Name>
<ResourceType>Property</ResourceType>
<URIs/>
<DataType>BOOLEAN</DataType>
<Permissions>RW</Permissions>
<Value>FALSE</Value>
<Visibility>PUBLIC</Visibility>
</PropertyItem>
<PropertyItem>
<RequestResult>Complete</RequestResult>
<RequestResultType>Resource</RequestResultType>
<ID/>
<Name>Is Structure</Name>
<ResourceType>Property</ResourceType>
<URIs/>
<DataType>BOOLEAN</DataType>
<Permissions>RW</Permissions>
<Value>TRUE</Value>
<Visibility>PUBLIC</Visibility>
</PropertyItem>
</ArrayOfPropertyItem >