permit.api.resources.get()
Fetch the resource and the resource information.
Parameters
resourceKey
- The key of the resource. This is the unique identifier of the resource.
Implementation
import io.permit.sdk.openapi.models.ResourceRead;
// accepts both the resource id and the resource key
ResourceRead resource = permit.api.resources.get("[RESOURCE ID OR KEY]");
// if you want to be explicit, you can use getByKey
ResourceRead resource2 = permit.api.resources.getByKey("[RESOURCE KEY]");
// or getById
ResourceRead resource3 = permit.api.resources.getById(new UUID("[RESOURCE ID]"));