Keycloak Authorization APIs to create Policies, Permissions and Resources


I have tired to create resource set using the below API and resources are getting create. these resources are visible in admin screen under Authorization → resources

POST https://server/auth/realms//authz/protection/resource_set

However, we have tried to create policy using the below API and the policy is not visible under Authorization policies
POST https://server/auth/realms//authz/protection/uma-policy

Can you please help on the correct API end points to create/update/delete/get Resources, Scopes, Polices and Permission in Keycloak.

Appreciate your help on this. Thanks

I Use keycloak java api for resource/policy/permission creation.

If you want to use Rest directly, check keycloak admin gui - it calls Rest api behind the scenes. Just do Inspect in browser and then check network traffic.

1 Like

Thanks Andriusk, I will check the APIs in browser and will update you.

Hi Andriusk,

yes, we can get APIs details in browser when we add resource/policy/permission in Admin Console. Thanks for you help.