The existing V3 API for patching/updating existing Access Profile accepts the entitlements argument but it replaces the existing entitlements instead of adding it.
For a single use, this API works fine but we are looking to add entitlements to existing set of entitlements in existing access profile in bulk. To achieve this we always have to do a GET call then append the entitlements map before calling the PATCH.
Having functionality in PATCH API for Access Profiles or a new API that could just append the new entitlements to the existing entitlements would be good to have.
where N is the index of new entitlement, which will be same as the number of current entitlements as this index starts with 0.
However, you can add only one entitlement using this and, if you need to add multiple, then will have to iterate through the entitlements and call the PATCH operation inside each iteration
You are right… you still have to make a GET call to get the count of current entitlements.
Unfortunately, there is no append option to add a new item to the entitlements that is an array inside Access profile object. It surely is a nice to have feature