Getting the Proposal Mappings

Gets the list of possible mappings between the data providers of a document and a given target data source.

If there is no data providers specified, the request is run on all the existing data providers in the document.

Request

GET <webiURL>/documents/{documentId}/dataproviders/mappings?originDataproviderIds={dataProviderId[,...]}&targetDatasourceId={dataSourceId}

Where:

  • {documentId} is the document identifier retrieved from the list of documents
  • {dataProviderId[,...]} is the list of data provider identifiers to consider for the mapping, separated by commas (optional)
  • {dataSourceId} is the data source identifier to use for the proposal mapping (mandatory)
Response

Response type: application/xml or application/json

Response body: details of the data provider <mappings>, described as follows:

  • status attribute of <mapping> is the status of the mapping:
    • Ok if the mapping fully matches
    • Ambiguous in case of uncertain mapping
    • Not found if there is no possible match. This status removes the corresponding ID from the document when doing the data source change.
  • For each mapping, a source and a compatible target:
    • <source><id> is the data source identifier
    • <target><id> is the target data source identifier

Example

To get the mapping for data provider DP0 and datasource ID 9455

GET <webiURL>/documents/9460/dataproviders/mappings?originDataproviderIds=DP0,DP1&targetDatasourceId=11414

<mappings>
    <content>
        <mapping status="Ok">
            <source>
                <id>DS0.DO12</id>
            </source>
            <target>
                <id>DS1.DO12</id>
            </target>
        </mapping>
        <mapping status="Ok">
            <source>
                <id>DS0.DO13</id>
            </source>
            <target>
                <id>DS1.DO13</id>
            </target>
        </mapping>
        ...      
        <mapping status="Ok">
            <source>
                <id>DS0.DO7</id>
            </source>
            <target>
                <id>DS1.DO7</id>
            </target>
        </mapping>
        <mapping status="Ambiguous">
            <source>
                <id>DS0.DO84</id>
            </source>
            <target>
                <id>DS1.DO6</id>
            </target>
        </mapping>
    </content>
</mappings>

Example

To get the mapping for a data provider DP0 when the target source is a BEx query

GET <webiURL>/documents/10554/dataproviders/mappings?originDataproviderIds=DP0,DP1&targetDatasourceId=10326;Z_BOBJ;AAQUERY_RESTRICT_KF

<mappings>
    <content>
        <mapping status="Ok">
            <source>
                <id>AZ_CITY</id>
            </source>
            <target>
                <id>AZ_CITY</id>
            </target>
        </mapping>
        <mapping status="Ambiguous">
            <source>
                <id>MA55OT46EO4K803Z77TO03LNMU</id>
            </source>
            <target>
                <id>MD4NTN2159JU9ONUUHTLMNBW3U</id>
            </target>
        </mapping>
    </content>
</mappings>