List your permissions on a resource
Return the actions for one resource as an alphabetical list of can_<action> names, for example can_view and can_edit. The response wraps the list in an object, {"permissions": [...]}.
An unknown resource_type returns 200 with an empty list, not an error.
Any member of the workspace can call this endpoint, guests included.
The list doesn't depend on your access
In this release, permissions names every action the resource type supports, including actions you can't perform. Two callers with different roles get the same list. To find out whether you can perform an action, call Check a permission.
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
Both parameters are required. Leaving either out returns 400 with resource_type and resource_id are required.
resource_type:requiredstringThe kind of resource, as the permission engine names it, for example workspace, project, workitem, cycle, module, page for a project page, wiki for a workspace page, initiative, or teamspace.
resource_id:requiredstring (uuid)The id of the resource. A value that isn't a UUID returns 400 with resource_id must be a UUID.
Scopes
workspaces.permissions:read
Errors
| Status | Code | Cause |
|---|---|---|
400 | invalid_request | resource_type or resource_id is missing, or resource_id isn't a UUID. |
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/resource/?resource_type=project&resource_id=4af68566-94a4-4eb3-94aa-50dc9427067b" \
-H "X-Api-Key: $PLANE_API_KEY"import requests
response = requests.get(
"https://api.plane.so/api/v2/workspaces/my-team/permissions/resource/",
headers={"X-Api-Key": "your-api-key"},
params={
"resource_type": "project",
"resource_id": "4af68566-94a4-4eb3-94aa-50dc9427067b",
},
)
print(response.json())const params = new URLSearchParams({
resource_type: "project",
resource_id: "4af68566-94a4-4eb3-94aa-50dc9427067b",
});
const response = await fetch(
`https://api.plane.so/api/v2/workspaces/my-team/permissions/resource/?${params}`,
{
headers: {
"X-Api-Key": "your-api-key",
},
},
);
const data = await response.json();{
"permissions": [
"can_archive",
"can_browse",
"can_create",
"can_delete",
"can_edit",
"can_manage",
"can_publish",
"can_react",
"can_view"
]
}{
"type": "invalid_request",
"code": "invalid_request",
"detail": "resource_type and resource_id are required."
}
