Updating the Query Specification

Updates the query specification attached to a data provider.

Request

PUT <webiURL>/documents/{documentId}/dataproviders/{dataProviderId}/specification

Where:

  • {documentId} is the document identifier retrieved from the list of documents
  • {dataProviderId} is the identifier of the data provider available for a document

Request type: text/xml

Request body:

<?xml version= "1.0" encoding= "UTF-8"?>
<queryspec:QuerySpec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:queryspec="http://com.sap.sl.queryspec" dataProviderId="DP0">
    <queryParameters>
        ...
    </queryParameters>
</queryspec:QuerySpec>
See the following example.
Response

Response type: application/xml or application/json

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

Example

PUT <webiURL>/documents/7738/dataproviders/DP0/specification

Request body in an XML file:

<queryspec:QuerySpec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:queryspec="http://com.sap.sl.queryspec" dataProviderId="DP0">
    <queryParameters>
        <duplicatedRowsProperty activated="true" value="true"/>
        <maxRetrievalTimeInSecondsProperty value="300"/>
        <maxRowsRetrievedProperty value="90000"/>
        <removeEmptyRowsProperty activated="true" value="true"/>
        <allowOtherUserToEditQueryProperty activated="true" value="true"/>
        <resetContextOnRefreshProperty activated="true" value="true"/>
        <stripQueryProperty/>
    </queryParameters>
    <queriesTree xsi:type="queryspec:QueryOperatorNode" queryOperator="Union">
        <children xsi:type="queryspec:QueryDataNode">
            <bOQuery name="Query" identifier="_1y8aENsVEeGswMB7H6m1Qw">
                <resultObjects identifier="DS0.DObc" name="Year"/>
                <resultObjects identifier="DS0.DOda" name="State"/>
                <resultObjects identifier="DS0.DOa5" name="Lines"/>
                <resultObjects identifier="DS0.DO93" name="Sales revenue"/>
                <conditionPart/>
            </bOQuery>
        </children>
    </queriesTree>
    <propertyBag key="DUPLICATED_ROWS_UNDEFINED_VALUE" value="-1"/>
    <propertyBag key="RESET_CONTEXT_ON_REFRESH_UNDEFINED_VALUE" value="-1"/>
    <propertyBag key="ALLOW_THE_USER_TO_EDIT_QUERY_UNDEFINED_VALUE" value="-1"/>
</queryspec:QuerySpec>
Note In the case of .unv universes, the resultObjects identifier is a string made of the object identifier retrieved from the universe outline and prefixed by the dataSourcePrefix of the current data provider and retrieved from the data provider outline.

Response:

<success>
    <message>The resource of type 'Data provider' with identifier 'DP0' has been successfully updated.</message>
    <id>DP0</id>
</success>