Getting the List of Documents

Usage

Gets the list of Web Intelligence documents stored in the CMS repository.

The documents are sorted by name. The list returned depends on user access rights. You can also specify the number of documents to return and the first document to be used as the start document in the list.
Note You can also search for documents using the /searches API.
Request

GET: /documents?offset=<offset>&limit=<limit>

Where:

  • <offset> indicates the position in the list, from which documents are returned. It must be greater than or equal to 0. The default value is 0. This parameter is optional.
  • <limit> indicates the number of documents in the list. The range is [0, 50]. The default value is 10. This parameter is optional.
Response

Response type: application/xml or application/json

Response body: the list of Web Intelligence documents sorted by name and identified by the following elements:

Element Type or Value Description
<id> integer The document ID
<cuid> string The unique document ID
<name> string The document name
<description> string The optional document description
<folderId> integer The folder ID
<state> Unused|Original|Modified The state of the document used by the web service. Values can be:
  • Unused, if the document has not been loaded
  • Original, if the document has been loaded but not modified
  • Modified, if the user sent requests which altered the state of the document

Example

To Get Six Documents from the CMS (XML)

GET /documents?limit=6

Response body:

<documents>
    <document>
        <id>6804</id>
        <cuid>AbrVz6E95lNMtjZk4KLzPuM</cuid>
        <name>BOF-ROLE_AA_ActiveHierOnCtry - Levels 02 and 03</name>
        <folderId>7611</folderId>
        <state>Original</state>
    </document>
    <document>
        <id>6861</id>
        <cuid>AUwfvPdEG3xOoLNoNEzDquQ</cuid>
        <name>BOF-QRY_SIMPLE - Filter not in Result</name>
        <description>This is a sample for BOF-QRY_SIMPLE - Filter not in Result</description>
        <folderId>7611</folderId>
        <state>Unused</state>
    </document>
    <document>
        <id>6869</id>
        <cuid>Ac1wDFEOuvNHtovI4H.anSM</cuid>
        <name>BOF-QRY_SIMPLE - Filter on Country</name>
        <folderId>48162</folderId>
        <state>Original</state>
    </document>
    <document>
        <id>7048</id>
        <cuid>AUiVpegCKnFBh4AX8YxMT5A</cuid>
        <name>BOF-QRY_SIMPLE - Filter on Prompt not in Result</name>
        <folderId>7611</folderId>
        <state>Modified</state>
    </document>
    <document>
        <id>7125</id>
        <cuid>AWa48YHHT6FFiUMP.T5wtBs</cuid>
        <name>BOF-QRY_SIMPLE - Query Prompt not in Result</name>
        <folderId>7611</folderId>
        <state>Unused</state>
    </document>
    <document>
        <id>5121</id>
        <cuid>ARnGKBoLv7lDuK_UWMUli5Q</cuid>
        <name>Chart demo</name>
        <description>Shows how data can be visualized on different kinds of charts. 
            And the features supported on the charts. </description>
        <folderId>5127</folderId>
        <state>Unused</state>
    </document>
</documents>

Example

To Get Three Documents from the CMS (JSON)

GET /documents?limit=3

Response body:

{"documents":
    {"document":[
        {"id":5152,
         "cuid":"AZx1nlTlCMdCvyJ6bWUTC5I",
         "name":"Chart Demo",
         "description":"Shows how data can be visualized on different kinds of charts. And the features supported on the charts.",
         "folderId":5151,
         "state":"Unused"},
        {"id":5169,
         "cuid":"AW4AVT1AUhVAogA6P7OQv9c",
         "name":"Charting Samples",
         "folderId":5150,
         "state":"Unused"},
        {"id":5157,
         "cuid":"AS9ukIRdciZLuUS6ESGVRBg",
         "name":"Drill Demo",
         "description":"This document demonstrates the drill functionality on tables and Charts",
         "folderId":5151,
         "state":"Unused"}]
    }
}