Add/Remove operations on Beta Patch Roles/Access Profiles endpoints

Hi @colin_mckibben ,

thank you very much for your detailed reply.

Indeed, you were right and I have since successfully managed to make the add work correctly based on your recommendation.

That being said, I am now struggling with the other side of the same coin - removal of an access profile / entitlement.
More specifically, I haven’t found a reliable solution for identifying the position of a specific access profile or entitlement within the nested array.

I am retrieving a single object (in this example a role) using the Beta GET endpoint (get-role | SailPoint Developer Community) and looking at the array stored within the accessProfiles property.
However, it seems that the order of this array is completely arbitrary, as adding/removing an access profile completely re-shuffles the array.
Furthermore, even if I do try and follow that order and use the position within the array as the path for the PATCH call (patch-role | SailPoint Developer Community), I somehow end up removing a different access profile than expected.

Example payload (should be following the spec):

[
  {
    "path": "/accessProfiles/3",
    "op": "remove"
  }
]

This ends up removing a different access profile than the one returned on the 4th position of the nested array retrieved by the GET request.