Dear forum,
after getting the custom REST request working, I am wondering, if there is some undocumented function available, to convert JSON array to several XDS instances.
Given the following REST response:
<nds dtdversion="3.0">
<source>
<product build="20181130_1107" version="1.0.2.0">Identity Manager REST Driver</product>
<contact>NetIQ Corporation.</contact>
</source>
<output>
<status level="success" type="driver-general">
<driver-operation-data class-name="opx2_user" command="query" dest-dn="">
<response method="GET" url="">https://server/odata/user">
<url-token filter="?$filter%20=%20name%20eq%20'N10001'"/>
<header Authorization="Basic ******************************=" content-type="application/json"/>
<value message="OK" status="200">{"value":[{"name":"Peter Paker"},{"name":"John Doe"}]}</value>
</response>
</driver-operation-data>
</status>
</output>
</nds>
I intend to introduce a ITP to insert in this case two instance elements to the output like this:
<nds dtdversion="3.0">
<source>
<product build="20181130_1107" version="1.0.2.0">Identity Manager REST Driver</product>
<contact>NetIQ Corporation.</contact>
</source>
<output>
<status level="success" type="driver-general">
<driver-operation-data class-name="opx2_user" command="query" dest-dn="">
<response method="GET" url="">https://server/odata/user">
<url-token filter=""/>
<header Authorization="Basic ******************************=" content-type="application/json"/>
<value message="OK" status="200">{"value":[{"name":"Peter Paker"},{"name":"John Doe"}]}</value>
</response>
</driver-operation-data>
</status>
<instance src-dn="John Doe">
<attr attr-name="name">
<value>John Doe</value>
</attr attr-name>
</instance>
<instance src-dn="Peter Paker">
<attr attr-name="name">
<value>Peter Paker</value>
</attr attr-name>
</instance>
</output>
</nds>
I am wondering if the jsonParse functins intrioduced in the documentation might be heplpful to solve this challage, or if it has to be solved manually in the policy!
Kind regards
Throsten