Get work item type governance
Read how a governed workspace decides the workflow for one work item type. The response carries the governance mode, the mandated workflow under required, and the allowlist with the projects already using each workflow.
Read this before you change the mode. An allowlist entry with locked: true is a workflow some project's pick uses, so removing it from the allowlist needs acknowledge: true. See Work item type governance for the model.
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.
type_id:requiredstring (uuid)The work item type. It can be any type in the workspace.
Scopes
workspaces.workflows:read
Errors
| Status | Code | Cause |
|---|---|---|
401 | unauthorized | Missing or invalid credentials. |
402 | payment_required | Workspace governance isn't on your plan. |
403 | forbidden | Your role or token scope can't view workspace workflows. Plain workspace access, such as a guest's, isn't enough. |
404 | not_found | No such work item type in this workspace. |
406 | not_acceptable | The Accept header asks for a representation the API can't produce. |
409 | states_managed_at_project | The workspace doesn't have governance turned on, so workflows are managed in each project. |
429 | rate_limited | Throttled. Honor the Retry-After header before retrying. |
Why guests can't read this
The response names the projects whose pick uses each workflow, and a workspace guest isn't a member of most of them. Reading governance therefore needs permission to view workspace workflows, not only access to the workspace.
curl -X GET \
"https://api.plane.so/api/v2/workspaces/my-team/work-item-types/d1e7a4c9-2b58-4f36-9a0e-7c3b5d81f240/governance/" \
-H "X-Api-Key: $PLANE_API_KEY"import requests
response = requests.get(
"https://api.plane.so/api/v2/workspaces/my-team/work-item-types/d1e7a4c9-2b58-4f36-9a0e-7c3b5d81f240/governance/",
headers={"X-Api-Key": "your-api-key"},
)
print(response.json())const response = await fetch(
"https://api.plane.so/api/v2/workspaces/my-team/work-item-types/d1e7a4c9-2b58-4f36-9a0e-7c3b5d81f240/governance/",
{
headers: {
"X-Api-Key": "your-api-key",
},
},
);
const data = await response.json();{
"mode": "constrained",
"required_workflow_id": null,
"allowlist": [
{
"workflow_id": "a1f4c7e2-3b98-4d61-8e25-6c0b9d7f3a14",
"name": "Standard delivery",
"locked": true,
"in_use_by_project_ids": [
"4af68566-94a4-4eb3-94aa-50dc9427067b",
"7c19e5b3-2d84-4f6a-b0e7-93a1c5d8f246"
]
},
{
"workflow_id": "e6b2d9f1-48a7-4c3e-9f50-1d7a8c2b6e93",
"name": "Regulated release",
"locked": false,
"in_use_by_project_ids": []
}
]
}{
"mode": "any",
"required_workflow_id": null,
"allowlist": []
}{
"type": "conflict",
"code": "states_managed_at_project",
"detail": "Work item type governance is managed at the project level in this workspace."
}
