Contents
Diagram Content
Returns contents of a diagram.
Method
GET
URL
https://cacoo.com/api/v1/diagrams/diagramId/contents.xml
Example : https://cacoo.com/api/v1/diagrams/00e77f4dc9973517/contents.xml
Format
xml
Authentication
required
Error
Status Code | Message | Content |
---|---|---|
403 | OLDER_FORMAT | Diagram saved before 09/27/12 will return HTTP status code: 403. Please open its editing page and save it again. |
Parameters
Parameter Name | Type | Content | Example |
---|---|---|---|
diagramId (Required) | String | Diagram Id | 00e77f4dc9973517 |
returnValues | String | The kind of return values you need. Comma-delimited list from following values. textStyle, shapeStyle, uid, position and point. | uid,textStyle |
Response Example (No returnValues)
<?xml version="1.0" encoding="utf-8"?>
<diagram>
<sheet name="sheet1">
<group attr-stencil-id="10000">
<polygon/>
<text/>
</group>
<group attr-stencil-id="10003">
<polygon/>
<text>circle</text>
</group>
<group attr-stencil-id="10006">
<polygon/>
<text/>
</group>
<line/>
<image source-id="53f05a8df688217ebd37ec69a26846379f4f0a7afab8a759c6dd42ac1cd00882"/>
</sheet>
<sheet name="background">
<group attr-stencil-id="10000">
<polygon/>
<text/>
</group>
</sheet>
</diagram>
Basic elements and attributes
Element | Description | Attributes | Children |
---|---|---|---|
diagram | Root Element | sheet | |
sheet | Sheet |
| group, polygon, text, line, image |
group | Group Shape |
| group, polygon, text, line, image |
polygon | Polygon Shape |
| |
line | Line Shape |
| |
text | text |
| [Text Value] |
image | Image Shape |
|
“Stencil ID” is used to distinguish stencils within the diagram. The stencils added to the diagram a long time ago do not have this ID set. To get this ID, drag & drop the stencils from the Stencil panel again. Please note that the ID will be deleted when the stencil is ungrouped. “Attribute” is the value which was set on the right most tab of the Inspector panel. You can set any value here and get it using this API.
Response Example (returnValues=textStyle)
<?xml version="1.0" encoding="utf-8"?>
<diagram>
<sheet name="sheet1">
<group attr-stencil-id="10000">
<polygon/>
<text h-align="center" v-align="middle">
<textStyle font="Arial" color="#000000" size="12" italic="false" underline="false" weight="normal"/>
</text>
</group>
<group attr-stencil-id="10003">
<polygon/>
<text h-align="center" v-align="middle">
<textStyle font="Arial" color="#000000" size="12" italic="false" underline="false" weight="normal">
circle
</textStyle>
</text>
</group>
<group attr-stencil-id="10006">
<polygon/>
<text h-align="center" v-align="middle">
<textStyle font="Arial" color="#000000" size="12" italic="false" underline="false" weight="normal"/>
</text>
</group>
<line/>
<image source-id="53f05a8df688217ebd37ec69a26846379f4f0a7afab8a759c6dd42ac1cd00882"/>
</sheet>
<sheet name="background">
<group attr-stencil-id="10000">
<polygon/>
<text h-align="center" v-align="middle">
<textStyle font="Arial" color="#000000" size="12" italic="false" underline="false" weight="normal"/>
</text>
</group>
</sheet>
</diagram>
Elements and Attributes of textStyle
Element | Description | Attributes | Children |
---|---|---|---|
text | Text Shape |
| textStyle |
textStyle | Text Style |
| [Text Value] |
Response Example (returnValues=shapeStyle)
<?xml version="1.0" encoding="utf-8"?>
<diagram>
<sheet name="sheet1">
<group attr-stencil-id="10000">
<polygon fill-style="singleColor" fill-color="#ffffff" fill-opacity="50.0" border-style="normal" border-color="#ed4580" border-thickness="1"/>
<text/>
</group>
<group attr-stencil-id="10003">
<polygon fill-style="gradation_linear_tb" fill-color="#ffffff" fill-color2="#9ac7bf" fill-opacity="100.0" border-style="normal" border-color="#000000" border-thickness="1"/>
<text>circle</text>
</group>
<group attr-stencil-id="10006">
<polygon border-style="dashed2" border-color="#02735f" border-thickness="1"/>
<text/>
</group>
<line type="STRAIGHT" border-style="normal" border-color="#000000" border-thickness="1">
<start/>
<end style="arrow"/>
</line>
<image source-id="53f05a8df688217ebd37ec69a26846379f4f0a7afab8a759c6dd42ac1cd00882"/>
</sheet>
<sheet name="background">
<group attr-stencil-id="10000">
<polygon fill-style="singleColor" fill-color="#f8cecc" fill-opacity="100.0"/>
<text/>
</group>
</sheet>
</diagram>
Elements and Attributes of shapeStyle
Element | Description | Attributes | Children |
---|---|---|---|
polygon | Polygon Shape |
| |
line | Line Shape |
| start, end |
start | Start Edge |
| |
end | End Edge | the same as the above |
Response Example (returnValues=uid)
<?xml version="1.0" encoding="utf-8"?>
<diagram>
<sheet name="sheet1" uid="4147C" background-sheet="C83D2">
<group uid="D82A36B5-4A89-B4D5-D150-0A48B2F9EECE" attr-stencil-id="10000">
<polygon uid="64EB9716-D811-509B-AF3E-0A48B2F921C1"/>
<text uid="6E3C2243-880B-63E7-74FA-0A48B2F9F875"/>
</group>
<group uid="BAAECC56-421B-E0DD-3D09-0A48BA890646" attr-stencil-id="10003">
<polygon uid="A7A31CF0-C65D-0787-A50A-0A48BA894769"/>
<text uid="3889EB54-BE1D-39F3-4D3C-0A48BA8955E5">circle</text>
</group>
<group uid="A3BAD414-DC6C-F7F1-FD41-0A48C9E508B3" attr-stencil-id="10006">
<polygon uid="E9EEFD06-2C4F-D3DC-9326-0A48C9E5857B"/>
<text uid="1639A930-B9C5-D710-7A6E-0A48C9E50CAB"/>
</group>
<line uid="1D00CADB-4146-600B-E490-0A5BC71FBEE0">
<start connect-uid="64EB9716-D811-509B-AF3E-0A48B2F921C1"/>
<end connect-uid="E9EEFD06-2C4F-D3DC-9326-0A48C9E5857B"/>
</line>
<image source-id="53f05a8df688217ebd37ec69a26846379f4f0a7afab8a759c6dd42ac1cd00882" uid="5AFC2501-4EA2-F86D-5529-0A5D459F391F"/>
</sheet>
<sheet name="background" uid="C83D2">
<group uid="33A4712C-1152-A665-5B30-0A54E2BCDCC4" attr-stencil-id="10000">
<polygon uid="4A0ABC27-1BE0-6F8C-0CB7-0A54E2BCC035"/>
<text uid="D128A672-0923-47E5-FC02-0A54E2BC94CB"/>
</group>
</sheet>
</diagram>
Elements and Attributes of uid
Element | Description | Attributes | Children |
---|---|---|---|
sheet | Root Element |
| |
group polygon line text image | All Shapes |
| |
start end | Edge |
|
Response Example (returnValues=position)
<?xml version="1.0" encoding="utf-8"?>
<diagram>
<sheet name="sheet1">
<group x="61.0" y="41.0" width="50.0" height="50.0" angle="0.0" attr-stencil-id="10000">
<polygon x="0.0" y="0.0" width="50.0" height="50.0" angle="0.0"/>
<text x="1.0" y="1.0" width="48.0" height="48.0" angle="0.0"/>
</group>
<group x="124.0" y="91.0" width="50.0" height="50.0" angle="0.0" attr-stencil-id="10003">
<polygon x="0.0" y="0.0" width="50.0" height="50.0" angle="0.0"/>
<text x="6.9" y="8.0" width="36.1" height="33.8" angle="0.0">circle</text>
</group>
<group x="174.0" y="19.5085" width="49.6" height="43.0" angle="0.0" attr-stencil-id="10006">
<polygon x="0.0" y="0.0" width="49.634" height="42.983" angle="0.0"/>
<text x="9.9" y="19.4" width="29.8" height="23.0" angle="0.0"/>
</group>
<line x="111.0" y="44.1" width="73.6" height="16.3" angle="0.0"/>
<image source-id="53f05a8df688217ebd37ec69a26846379f4f0a7afab8a759c6dd42ac1cd00882" x="193.6" y="99.0" width="60.0" height="60.0" angle="0.0"/>
</sheet>
<sheet name="background">
<group x="31.0" y="8.0" width="225.0" height="150.0" angle="0.0" attr-stencil-id="10000">
<polygon x="0.0" y="0.0" width="225.0" height="145.0" angle="0.0"/>
<text x="1.0" y="1.0" width="223.0" height="148.0" angle="0.0"/>
</group>
</sheet>
</diagram>
Elements and Attributes of position
Element | Description | Attributes | Children |
---|---|---|---|
group polygon line text image | All Shapes |
|
Response Example (returnValues=point)
<?xml version="1.0" encoding="utf-8"?>
<diagram>
<sheet name="sheet1">
<group attr-stencil-id="10000">
<polygon>
<path close="true">
<point type="NORMAL" x="50.0" y="50.0"/>
<point type="NORMAL" x="0.0" y="50.0"/>
<point type="NORMAL" x="0.0" y="0.0"/>
<point type="NORMAL" x="50.0" y="0.0"/>
</path>
</polygon>
<text/>
</group>
<group attr-stencil-id="10003">
<polygon>
<path close="true">
<point type="NORMAL" x="50.0" y="25.0"/>
<point type="BEZIER_CP" x="50.0" y="35.354843"/>
<point type="NORMAL" x="42.678" y="42.67725"/>
<point type="BEZIER_CP" x="35.35565" y="50.0"/>
<point type="NORMAL" x="25.0" y="50.0"/>
<point type="BEZIER_CP" x="14.64475" y="50.0"/>
<point type="NORMAL" x="7.3223763" y="42.677624"/>
<point type="BEZIER_CP" x="0.0" y="35.35525"/>
<point type="NORMAL" x="0.0" y="25.0"/>
<point type="BEZIER_CP" x="0.0" y="14.64475"/>
<point type="NORMAL" x="7.3223753" y="7.3223763"/>
<point type="BEZIER_CP" x="14.64475" y="0.0"/>
<point type="NORMAL" x="25.0" y="0.0"/>
<point type="BEZIER_CP" x="35.355827" y="0.0"/>
<point type="NORMAL" x="42.678" y="7.3223753"/>
<point type="BEZIER_CP" x="50.0" y="14.644578"/>
<point type="NORMAL" x="50.0" y="25.0"/>
</path>
</polygon>
<text>circle</text>
</group>
<group attr-stencil-id="10006">
<polygon>
<path close="true">
<point type="NORMAL" x="24.817" y="0.0"/>
<point type="NORMAL" x="37.224" y="21.491"/>
<point type="NORMAL" x="49.634" y="42.983"/>
<point type="NORMAL" x="24.817" y="42.983"/>
<point type="NORMAL" x="0.0" y="42.983"/>
<point type="NORMAL" x="12.409" y="21.491001"/>
<point type="NORMAL" x="24.817" y="0.0"/>
</path>
</polygon>
<text/>
</group>
<line>
<point type="NORMAL" x="0.0" y="16.306983673887736"/>
<point type="NORMAL" x="73.58819908547969" y="0.0"/>
</line>
<image source-id="53f05a8df688217ebd37ec69a26846379f4f0a7afab8a759c6dd42ac1cd00882"/>
</sheet>
<sheet name="background">
<group attr-stencil-id="10000">
<polygon>
<path close="true">
<point type="NORMAL" x="225.0" y="150.0"/>
<point type="NORMAL" x="0.0" y="150.0"/>
<point type="NORMAL" x="0.0" y="0.0"/>
<point type="NORMAL" x="225.0" y="0.0"/>
</path>
</polygon>
<text/>
</group>
</sheet>
</diagram>
Elements and Attributes of point
Element | Description | Attributes | Children |
---|---|---|---|
polygon | Polygon Shape | path | |
line | Line Shape | point | |
path | Polygon Path |
| point |
point | Point |
|