Getting the Dataset of a Report Element

Returns the data of a table, chart, or cell.

Request

GET <webiURL>/documents/{documentId}/reports/{reportId}/elements/{elementId}/dataset

Where:
  • {documentId} is the document identifier retrieved from the list of documents
  • {reportId} is the report identifier retrieved from the list of reports
  • {elementId} is the element identifier retrieved from the list of elements
Table 1: Optional Parameters
Parameter Description
datapath

A string that specifies a datapath, which allows you to find a specific instance of a report element, for example dataset?datapath=DP1.DObc:"2004",DP1.DOa6:"Austin".

reference

A string that specifies a reference, for example dataset?reference=1.D.7.

Caution You cannot use datapath and reference parameters in the same URL. This generates a 400 HTTP request.
Response

Response type: application/xml or application/json

Response body: the details of the dataset, which are:

  • The column metadata (name and type)
  • A list of rows containing the values

Example

Cell

GET <webiURL>/documents/6404/reports/4/elements/7/dataset?reference=4.7.B

Response:

<dataset>
    <metadata>
        <value type="Numeric">Sales revenue</value>
    </metadata>
    <row>
        <value>910451.2</value>
    </row>
</dataset>

Example

VTable

GET <webiURL>/documents/6395/reports/1/elements/78/dataset

Response:

<dataset>
    <metadata>
        <value type="String">Country</value>
        <value type="String">Resort</value>
        <value type="String">Service</value>
        <value type="Numeric">Number of guests</value>
        <value type="Numeric">Revenue</value>
    </metadata>
    <row>
        <value>Germany</value>
        <value>Bahamas Beach</value>
        <value>Activities</value>
        <value/>
        <value>65600</value>
    </row>
    <row>
        <value>Germany</value>
        <value>Bahamas Beach</value>
        <value>Bungalow</value>
        <value>48</value>
        <value>47040</value>
    </row>
    ...
</dataset>