December 19, 2014 at 3:58 pm #2145bradtumyParticipant
I am troubleshooting a synchronization issue in OpenIDM 3.0. I thought it was possible to query the system objects in the same manner as managed objects but can’t seem to find examples of this.
I display a user record from managed/users like this:
Can I do the same for system?
Any advice is appreciatedDecember 19, 2014 at 4:10 pm #2146Jake FeaselModerator
There is only one “queryId” value that is recognized on system endpoints – “query-all-ids”. The queryId that you give as an example is only defined within the repo configuration, and so does not apply to remote environments.
The good news is that you can instead use “queryFilter” queries instead. For example (unencoded for readability):
http://$OPENIDM_SERVER:$OPENIDM_SERVER_PORT/openidm/system/scriptedsql/account?_queryFilter=/userName eq "fred"
There is a good write-up on the use of queryFilter here: http://openidm.forgerock.org/doc/integrators-guide/index.html#constructing-queriesDecember 19, 2014 at 4:17 pm #2148bradtumyParticipant
Thanks Jake. That worked like a charm.
Is that actually querying the remote environment or looking at some local (cached or otherwise) representation? I am presuming it’s querying the actual source but I am asking because all of the expected attributes (Columns) are not being returned in the results.December 19, 2014 at 4:23 pm #2149Jake FeaselModerator
The queryFilter is used to construct an OpenICF query object, which is then handed off to the connector to execute. It is up to the connector to decide how to do so. In the case of scriptedsql, it is most likely using groovy to build a SQL query string which then is executed on the server. The results from there are then used to build the response object, which to be usable within OpenIDM must match the object type format defined in the provisioner config. See the implementation in sample3 for more examples.
- This reply was modified 6 years, 10 months ago by Jake Feasel.
You must be logged in to reply to this topic.