Publisher and Web Interface > Web Interface > Web Interface REST service > Requesting resources through the REST service > Requesting the diagram image and map for a diagram item (Web Interface REST service)
  
Requesting the diagram image and map for a diagram item (Web Interface REST service)
The Diagram and DiagramImageMap requests return the image and map for a diagram item.
Request
The syntax of the URI for the Diagram and DiagramImageMap requests are as follows.
<Web Interface website>/ModelerService/Servers/<server name>/Repositories/<repository name>/Models/<model name>/ModelVersions/<version>/Item/<item id>/Diagram
<Web Interface website>/ModelerService/Servers/<server name>/Repositories/<repository name>/Models/<model name>/ModelVersions/<version/Item/<item id>/DiagramImageMap
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.
* 
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 Diagram or DiagramImageMap operation is being run.
You can find out the ids of items through operation requests such as ChildItems operation request.
Returned XML
A Diagram request returns the image of a diagram.
A DiagramImageMap returns the image map that defines the hot spots and links on the diagram. The map relates to the full size of the image, so if the diagram is scaled the map has to be scaled accordingly.
Example
In this example, the following Diagram request returns the image of the ClassDiagram1 class diagram (the item id of ClassDiagram1 is e475d03c-9ed2-45b8-b943-e08d3892651b).
https://localhost:57850/ModelerService/Servers/Server101/Repository/Example1/Models/Model1/ModelVersions/0/Item/e475d03c-9ed2-45b8-b943-e08d3892651b/Diagram
In this example, the following DiagramImageMap request returns the image map for the ClassDiagram1 class diagram (the item id of ClassDiagram1 is e475d03c-9ed2-45b8-b943-e08d3892651b).
https://localhost:57850/ModelerService/Servers/Server101/Repository/Example1/Models/Model1/ModelVersions/0/Item/e475d03c-9ed2-45b8-b943-e08d3892651b/DiagramImageMap
The returned XML is as follows (not all the returned code is shown).
<?xml version="1.0"?>
<ImageMap>
<Diagram VertexCount="4" SymbolId="e475d03c-9ed2-45b8-b943-e08d3892651b" PropertiesObjectId="e475d03c-9ed2-45b8-b943-e08d3892651b">
<Vertex X="9" Y="9"/>
<Vertex X="2385" Y="9"/>
<Vertex X="2385" Y="2594"/>
<Vertex X="9" Y="2594"/>
<![CDATA[Filling Station System [Final Technical Structure & Organisation]]]>
</Diagram>
<Node VertexCount="4"SymbolId="45b3b5ab-dbd6-4eea-84bf-870884d44bfc PropertiesObjectId="086ef3c1-e443-423b-8c85-26a3a90130dd"">
<Vertex X="692" Y="1391"/>
<Vertex X="2353" Y="1391"/>
<Vertex X="2353" Y="1549"/>
<Vertex X="692" Y="1549"/>
<![CDATA[Dispenser]]>
</Node>
...
</ImageMap>