Updates to Assigning Permissions to Resources in OnePlan APIs
This article explains changes to the Create Resource and Update Resource APIs to assign permissions to resources.
With the release of the Enterprise Security Group feature (released September 2023), there is an update to how permissions are assigned to resources in our APIs. Specifically, the following APIs are affected by the new security groups feature:
Create Resource API: https://my.oneplan.ai/ApiHelp/Api/POST-api-resources
Update Resource API: https://my.oneplan.ai/ApiHelp/Api/POST-api-resources-id
Previously we used "GlobalPermissions" to assign a specific resource's permission in OnePlan. With the September 2023 release, "GlobalPermissions" will no longer be supported and will be removed.
Instead, we will now be using "OnePlanSecurityGroup" property to assign the resource's security group. This property will accept the GUID value that represents the security group.
![OnePlanSecurityGroupPropertyAPI.png](../../image/16660a4f757185.png)
To get your security groups' GUIDs, use the following query: https://my.oneplan.ai/ApiHelp/Api/GET-api-securitygroups. The query will return list of security groups and search for the "id" property.
In order to set "None" security group to a resource, you will need to set the "OnePlanSecurityGroup" property to an empty guid (00000000-0000-0000-0000-000000000000).
If "OnePlanSecurityGroup" is set to null or if "OnePlanSecurityGroup" is not included in the API request body, the following will be applied:
A default security group will be assigned only if you have a default security group selected in your OnePlan group settings
Otherwise, the resource group will be "None"