أنواع المشاريع ٢ — the categories a projects2 project is filed under (separate from Projects' types).
Two gates, two bodies (both 403): the community's page switch
(settings.pageVisibility.projects2, off by default) → FEATURE_DISABLED;
the plan lacks projects2 → FEATURE_NOT_AVAILABLE. Every route needs both.
Reads need no token; create/edit/delete need projects2:manage or
projects2:moderate. A name is capped like any category name. A
communityId in the body, if sent, must equal the path's (400 COMMUNITY_MISMATCH).
6 endpoints.
| Method | Path | Summary |
|---|---|---|
GET | /api/communities/{communityId}/projects2/types | List the community's projects2 types |
POST | /api/communities/{communityId}/projects2/types | Create a type (managers) |
DELETE | /api/communities/{communityId}/projects2/types/{id} | Delete a type (managers) |
GET | /api/communities/{communityId}/projects2/types/{id} | One type |
PUT | /api/communities/{communityId}/projects2/types/{id} | Rename or re-describe a type (managers) |
GET | /api/communities/{communityId}/projects2/types/project/{projectId} | The types of one projects2 project |
GET /api/communities/{communityId}/projects2/typesAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
q | query | no | string | — |
page | query | no | integer | — |
pageSize | query | no | integer | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | { success, data: ProjectType[], ...page } | — |
POST /api/communities/{communityId}/projects2/typesAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
Request body (required) — application/json
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | — |
description | string | no | — |
Responses
| Status | Description | Body |
|---|---|---|
201 | data is the ProjectType | — |
400 | Invalid name | — |
DELETE /api/communities/{communityId}/projects2/types/{id}Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
id | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Deleted | — |
GET /api/communities/{communityId}/projects2/types/{id}Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
id | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | data is the ProjectType | — |
404 | Not found | — |
PUT /api/communities/{communityId}/projects2/types/{id}Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
id | path | yes | string (uuid) | — |
Request body — application/json
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | — |
description | string | no | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | data is the ProjectType | — |
GET /api/communities/{communityId}/projects2/types/project/{projectId}Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
projectId | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | data is ProjectType[] | — |