...
The webId_mapping configuration is as follow (see another option in section below). The location is set in the internalLocation attribute, the parameter in the internalParameter attribute, the webId in the externalLocation attribute. The value of externalParameter attribute is ignored.
...
The webId_mapping configuration is as follow (see another option in section below). The location is set in the internalLocation attribute, the parameter in the internalParameter attribute, the webId in the externalLocation attribute. The value of externalParameter attribute is ignored.
| Code Block | ||||
|---|---|---|---|---|
| ||||
<idMap>
<map internalLocation="Delft" internalParameter="H.m" externalLocation="ZXhhbXBsZSB3ZWIgaWQgSC5tIERlbGZ0" externalParameter="does_not_matter"/>
<map internalLocation="Delft" internalParameter="Q.m" externalLocation="ZXhhbXBsZSB3ZWIgaWQgUS5tIERlbGZ2" externalParameter="does_not_matter"/>
</idMap> |
Retrieve webId from server
The web id can be entered directly in the id mapping configuration files as described above. Since 2025.02, it can also be retrieved from the server based on tags. The tags are easier to read and do not change as often as the webIds.
To use this option, a string property dataServerWebId should be configured. The id mapping then contains tags instead of webIds as externalLocation.
| Code Block | ||||
|---|---|---|---|---|
| ||||
<import>
<general>
<importType>pi_server_aveva</importType>
<serverUrl>https://my_base_url</serverUrl>
<user>username</user>
<password>password</password>
<relativeViewPeriod unit="day" start="-1" end="0" startOverrulable="true"/>
<idMapId>webId_mapping</idMapId>
</general>
<properties>
<string key="dataServerWebId" value="XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"></string>
</properties>
<timeSeriesSet>
...
</timeSeriesSet>
</import> |
The webId_mapping configuration is as follow. The location is set in the internalLocation attribute, the parameter in the internalParameter attribute, the tag in the externalLocation attribute. The value of externalParameter attribute is ignored.
| Code Block | ||||
|---|---|---|---|---|
| ||||
<idMap> <map internalLocation="Delft" internalParameter="H.m" externalLocation="H.m_Delft" externalParameter="does_not_matter"/> <map internalLocation="Delft" internalParameter="Q.m" externalLocation="Q.m_Delft="ZXhhbXBsZSB3ZWIgaWQgUS5tIERlbGZ0" externalParameter="does_not_matter"/> </idMap> |
Each web id is requested from a url build as follow:
https://my_base_url/piwebapi/points/search?dataserverwebid=dataServerWebId&query=Tag:tag&searchOption=ExactMatch with dataServerWebId read from the property and tag read from the id mapping.