# Resource Server API Documentation

**URL:** https://forum.keycloak.org/t/resource-server-api-documentation/2434
**Category:** Getting advice
**Tags:** documentation
**Created:** [April 29, 2020, 3:31pm UTC](https://forum.keycloak.org/t/resource-server-api-documentation/2434 "2020-04-29T15:31:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Michael](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@Michael](https://forum.keycloak.org/u/Michael)
#### Post date: [April 29, 2020, 3:31pm UTC](https://forum.keycloak.org/t/resource-server-api-documentation/2434/1 "2020-04-29T15:31:52Z")

</div>

Hello,

I’m look for documentation on creating resources, permissions, policies via API but I’m not seeing any.

I’m seeing calls like  
`/auth/admin/realms/{realm}/clients/{client}/authz/resource-server/resource`  
in the admin console via browser dev tools, but I’m not seeing any record of those being documented anywhere.

Am I looking in the wrong place ([Keycloak Docs](https://www.keycloak.org/docs-api/9.0/rest-api/index.html)) or are these API’s not currently documented?

Thanks,  
Michael

---

<div class="post-metadata">

### Author: ![dionmcm](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dionmcm/32/737_2.png) [@dionmcm](https://forum.keycloak.org/u/dionmcm)
#### Post date: [May 18, 2020, 12:08am UTC](https://forum.keycloak.org/t/resource-server-api-documentation/2434/2 "2020-05-18T00:08:30Z")

</div>

I had the same problem, looking to do more or less the same thing, this is what I found.

The key for what I was doing was getting a PolicyStore, AdminPermissionManagement and GroupPermissionManagement instance

```
// Get the realm from the session.
RealmModel realm = session.getContext().getRealm();

// Get the authorization provider and its policy store from the realm.
AuthorizationProvider authorizationProvider = session.getProvider(AuthorizationProvider.class);
PolicyStore policyStore = authorizationProvider.getStoreFactory().getPolicyStore();

// Get the AdminPermissionManagement and GroupPermissionManagement objects for managing
// permissions.
AdminPermissionManagement permissions = AdminPermissions.management(session, realm);
GroupPermissionManagement groups =
    AdminPermissions.management(session, session.getContext().getRealm()).groups();

```

After that I could create a GroupPolicyRepresentation and use that with the PolicyStore to create the policies I needed.

I never found any documentation.
