List resources you can access
Return the ids of every resource of one type in the workspace that you can perform an action on. The action defaults to view. The response is an object with one array, resource_ids, and isn't paginated.
An id is in the list when one of these is true:
- You hold a grant on the resource, either the grant's relation allows the action or its
permissions_grantnames the action, and itspermissions_denydoesn't name the action. - The resource is granted to a teamspace you belong to, and that grant's relation allows the action.
Access that comes only from a parent doesn't add an id. For example, a workspace admin who hasn't joined a project can still open it, but the project isn't listed for resource_type=project. To test one resource, including inherited access, call Check a permission.
Any member of the workspace can call this endpoint, guests included.
Path Parameters
slug:requiredstringThe workspace slug. It appears in your Plane URLs. In https://app.plane.so/my-team/projects/, the slug is my-team.
Query Parameters
resource_type:requiredstringThe kind of resource to list, as the permission engine names it, for example project, cycle, module, initiative, or teamspace. Leaving it out returns 400 with resource_type is required.
action:optionalstringThe action you need to be able to perform. Plane joins it to resource_type to form a permission such as project:edit. Defaults to view.
Scopes
workspaces.permissions:read
Errors
| Status | Code | Cause |
|---|---|---|
400 | invalid_request | resource_type is missing. |
401 | unauthorized | Missing or invalid credentials. |
402 | payment_required | The feature this endpoint belongs to isn't enabled on your plan, or is switched off. |
403 | forbidden | You aren't a member of the workspace, or your token scope doesn't allow this. |
404 | not_found | No such workspace. |
406 | not_acceptable | The Accept header asks for a representation the API can't produce. |
429 | rate_limited | Throttled. Honor the Retry-After header before retrying. |
curl -X GET \
"https://api.plane.so/api/v2/workspaces/my-team/permissions/accessible/?resource_type=project&action=edit" \
-H "X-Api-Key: $PLANE_API_KEY"import requests
response = requests.get(
"https://api.plane.so/api/v2/workspaces/my-team/permissions/accessible/",
headers={"X-Api-Key": "your-api-key"},
params={"resource_type": "project", "action": "edit"},
)
print(response.json())const params = new URLSearchParams({ resource_type: "project", action: "edit" });
const response = await fetch(
`https://api.plane.so/api/v2/workspaces/my-team/permissions/accessible/?${params}`,
{
headers: {
"X-Api-Key": "your-api-key",
},
},
);
const data = await response.json();{
"resource_ids": ["4af68566-94a4-4eb3-94aa-50dc9427067b", "b2d94e71-6c3a-4f58-8e1d-7a0c5b9f2e46"]
}{
"type": "invalid_request",
"code": "invalid_request",
"detail": "resource_type is required."
}
