Calling the search API with this body to find an access profile:
{
"indices": [
"accessprofiles"
],
"query": {
"query": "{access_profile_id}",
"fields": []
},
"includeNested": false,
"sort": [
"created"
]
}
It returns something like this:
[
{
"entitlements": [],
"requestCommentsRequired": ...,
"owner": ...,
"entitlementCount": 2,
"synced": ...,
"created": ...,
"description": ...,
"source": ...,
"segmentCount": 1,
"enabled": ...,
"segments": [
...
],
"name": ...,
"modified": ...,
"requestable": ...,
"id": ...,
"apps": [],
"_type": "accessprofile",
"type": "accessprofile",
"_version": "v2"
}
]
Note that it says that there are 2 entitlements in that access profile, even though the entitlement attribute is an empty list.
If we call the same query, but with "includeNested": true
, it will show the 2 entitlements in that list.
Since we say "includeNested": false
, it should not mention the entitlements attribute at all. Now the results are mentioning it, but with a wrong value (an array with 0 elements). Instead of giving a wrong value, it shouldn’t give that attribute at all.