queryFilter for retreiving user using a nested attribute as the filter

This topic contains 1 voice and has 0 replies.

  • Author
    Posts
  • #23184
     jm89 
    Participant

    Hi,

    I’m trying to use the rest api to return managed users who have a certain relationship property(_refProperties).

    For example below is an extract of the JSON for a user. Is it possible to write a query filter to return users who have the “customProperty” (inside_ refProperties) with value “test”?

    {
        "result": [
            {
                "_id": "1234",
                "userName": "user1",
                "address": {
                    "_ref": "managed/address/f7145ae2-d77b-4dcd-980f-67ddb8cddfbc",
                    "_refResourceCollection": "managed/address",
                    "_refResourceId": "f7145ae2-d77b-4dcd-980f-67ddb8cddfbc",
                    "_refProperties": {
    	            "customProperty": "test"
                        "_id": "8498f37c-61ba-48d6-918b-bb1fc9d342ea",
                        "_rev": "0000000089eea504"
                    }
                }
    			
    	   }
    	]
    }

    I tried writing the query like the below, but not too sure on the syntax.

    http://openidm.example.com/openidm/managed/user?_queryFilter=roles/_refProperties/customProperty eq "value1"&_fields=userName

    Any ideas how i would go about writing this query? I’m using opendj as my user store.

    Thanks.

    • This topic was modified 1 week, 3 days ago by  jm89.
    • This topic was modified 1 week, 3 days ago by  jm89.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

©2018 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?