Getting the List of Report Elements

Usage

Gets the elements of a specific report.

The following items identify a report element:

  • Id
  • Reference
Request

GET /documents/<documentID>/reports/<reportID>/elements?unit=<unit>

Where:
  • <unit> is an optional parameter of type string that defines the unit of measurement used for all dimensional values such as size, padding, and position. Values are metric (default) , inch and centimeter.
Response

Response type: application/xml or application/json

Response body: the list of elements of the report, with the following information:

  • <id>
  • <name>
  • <reference>
  • <size>
  • <position>
  • <padding>
  • type attribute, with the possible values PageZone, Cell, VTable, HTable, XTable, Form, and Visualization.

Example

XML

GET /documents/6528/reports/1/elements?unit=centimeter

Response:

<elements>
    <element type="Cell"> 
        <id>14</id>  
        <reference>1.E</reference>  
        <name>Block 2</name>  
        <parentId>1</parentId>  
        <size minimalWidth="7.772" minimalHeight="0.483" autofitWidth="false" autofitHeight="true"/>  
        <position x="15.322" y="0.104" horizontalAnchorType="None" verticalAnchorType="None"
            oneHorizontalPage="false" newHorizontalPage="false" repeatOnEveryVerticalPage="false"
            oneVerticalPage="false" newVerticalPage="false"/>  
        <padding left="0.152" right="0.152" top="0.152" bottom="0.152"/> 
    </element>  
    <element type="Cell"> 
        <id>16</id>  
        <reference>1.G</reference>  
        <name>Block 2</name>  
        <parentId>1</parentId>  
        <size minimalWidth="0.132" minimalHeight="0.0" autofitWidth="true" autofitHeight="true"/>  
        <position x="1.35" y="1.111" horizontalAnchorType="None" verticalAnchorType="None"
            oneHorizontalPage="false" newHorizontalPage="false" repeatOnEveryVerticalPage="false"
            oneVerticalPage="false" newVerticalPage="false"/>  
        <padding left="0.152" right="0.152" top="0.152" bottom="0.152"/> 
    </element>
    <element type="PageZone"> 
        <id>1</id>  
        <name>Header</name>  
        <size minimalHeight="3.254"/> 
    </element>  
    <element type="XTable"> 
        <id>13</id>  
        <reference>1.D</reference>  
        <name>Block 1</name>  
        <parentId>24</parentId>  
        <position x="1.482" y="1.164" horizontalAnchorType="None" verticalAnchorType="None"
            oneHorizontalPage="false" newHorizontalPage="false" repeatOnEveryVerticalPage="false"
            oneVerticalPage="false" newVerticalPage="false"/>  
        <padding left="0.0" right="0.0" top="0.0" bottom="0.0"/> 
    </element>  
    <element type="Cell"> 
        <id>9</id>  
        <reference>1.9</reference>  
        <parentId>13</parentId>  
        <size minimalWidth="2.12" minimalHeight="0.4" autofitWidth="false" autofitHeight="true"/>  
        <padding left="0.176" right="0.176" top="0.155" bottom="0.162"/> 
    </element>  
    <element type="Section"> 
        <id>24</id>  
        <reference>1.O</reference>  
        <name>City</name>  
        <parentId>2</parentId>  
        <size minimalHeight="0.0"/>  
        <position repeatOnEveryVerticalPage="false" oneVerticalPage="false" newVerticalPage="false"/>  
        <padding bottom="0.821"/> 
    </element> 
</elements>

Example

JSON

GET /documents/5157/reports/1/elements

Response:

{"elements":
    {"element":[
        {"@type":"PageZone",
         "id":1,
         "name":"Header",
         "size":{"@minimalHeight":"1984.0"}
        },
        {"@type":"Cell",
         "id":19,
         "reference":"1.J",
         "parentId":29,
         "size":{
             "@autofitHeight":"true",
             "@autofitWidth":"false",
             "@minimalHeight":"567.0",
             "@minimalWidth":"3005.0"},
         "padding":{
             "@bottom":"230.0",
             "@top":"220.0",
             "@right":"250.0",
             "@left":"250.0"}
        },
        ...
        {"@type":"HTable",
         "id":29,
         "reference":"1.T",
         "name":"Block 1 (1)",
         "parentId":2,
         "position":{
             "@newVerticalPage":"false",
             "@oneVerticalPage":"false",
             "@repeatOnEveryVerticalPage":"false",
             "@newHorizontalPage":"false",
             "@oneHorizontalPage":"false",
             "@verticalAnchorType":"None",
             "@horizontalAnchorType":"None",
             "@y":"1950.0",
             "@x":"2662.0"}
        },
        ...
        {"@type":"VTable",
         "id":16,
         "reference":"1.G",
         "name":"Block 1",
         "parentId":2,
         "position":{
             "@newVerticalPage":"false",
             "@oneVerticalPage":"false",
             "@repeatOnEveryVerticalPage":"false",
             "@newHorizontalPage":"false",
             "@oneHorizontalPage":"false",
             "@verticalAnchorType":"None",
             "@horizontalAnchorType":"None",
             "@y":"18450.0",
             "@x":"2700.0"}
        },
        ...
        {"@type":"XTable",
         "id":42,
         "reference":"1.g",
         "name":"Block 1 (2)",
         "parentId":2,
         "position":{
             "@newVerticalPage":"false",
             "@oneVerticalPage":"false",
             "@repeatOnEveryVerticalPage":"false",
             "@newHorizontalPage":"false",
             "@oneHorizontalPage":"false",
             "@verticalAnchorType":"None",
             "@horizontalAnchorType":"None",
             "@y":"7800.0",
             "@x":"2887.0"}
        }]
    }
}