Creating a Data Filter

Creates a data filter for a specific report, referenced by its ID.

Request

POST <webiURL>/documents/{documentId}/reports/{reportId}/datafilter

Where:
  • {documentId} is the document identifier retrieved from the list of documents
  • {reportId} is the report identifier retrieved from the list of reports

Request body: the description of the data filter. The key attribute should be one of the formulaLanguageId elements of the report.

The operator is one of the available report filters :

  • Equal
  • NotEqual
  • Greater
  • GreaterOrEqual
  • Less
  • LessOrEqual
  • Between
  • NotBetween
  • InList
  • NotInList
  • IsNull
  • IsNotNull
  • IsAny
  • Like
  • NotLike
  • Both
  • Except
Response

Response type: application/xml or application/json

The response is a message stating the success or failure of the request.

Example

POST <webiURL>/documents/127/reports/1/datafilter

Request body:

<datafilter>
    <and>
        <condition key="[Lines]" operator="InList">
            <value>City Trousers</value>
            <value>Shirt Waist</value>
            <value>Jackets</value>
        </condition>
        <condition key="[State]" operator="NotEqual">
            <value>Colorado</value>
        </condition>
        <or>
            <condition key="[Sales revenue]" operator="Greater">
                <value>5000</value>
            </condition>
            <condition key="[Sales revenue]" operator="Less">
                <value>10</value>
            </condition>
        </or>
    </and>
</datafilter>

Response:

<success>
    <message>The resource of type 'Report' with identifier '1' has been successfully updated.</message>
    <id>1</id>
</success>