Get a workspace work item type's audiences
GET/api/v2/workspaces/{slug}/work-item-types/{pk}/audiences/
Get the audiences attached to a workspace work item type. Each active one restricts every work item of the type, in every project that uses it, except work items that have active audiences of their own. Audiences are listed oldest attachment first, active and inactive alike.
This route serves workspace types only. A type that a project owns returns 404 here. Read it with Get a work item type's audiences. Reads work in either work item type mode.
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.
pk:requiredstring (uuid)The id of the workspace work item type.
Response
audiencesarray of object. The audiences attached to the type, each withid,name,logo_props, andis_active. An empty array means the type restricts nothing.
Scopes
workspaces.work_item_types:read
Errors
| Status | Code | Cause |
|---|---|---|
401 | unauthorized | Missing or invalid credentials. |
402 | payment_required | Work item security isn't on your plan, or is switched off. |
403 | forbidden | Your role or token scope can't read the workspace's work item types. |
404 | not_found | No such workspace type, the type belongs to a project, or it's outside your tenant. |
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. |
Get a workspace work item type's audiences
bash
curl -X GET \
"https://api.plane.so/api/v2/workspaces/my-team/work-item-types/833d4a05-ec1d-469f-8c9d-73f354f44481/audiences/" \
-H "X-Api-Key: $PLANE_API_KEY"python
import requests
response = requests.get(
"https://api.plane.so/api/v2/workspaces/my-team/work-item-types/833d4a05-ec1d-469f-8c9d-73f354f44481/audiences/",
headers={"X-Api-Key": "your-api-key"},
)
print(response.json())javascript
const response = await fetch(
"https://api.plane.so/api/v2/workspaces/my-team/work-item-types/833d4a05-ec1d-469f-8c9d-73f354f44481/audiences/",
{
headers: {
"X-Api-Key": "your-api-key",
},
},
);
const data = await response.json();Response200
json
{
"audiences": [
{
"id": "8bcf2c8f-7bd0-4d0c-bdc6-82df9fa1f312",
"name": "Security response",
"logo_props": {},
"is_active": true
}
]
}
