On this page

أنواع المشاريع — the categories a project is filed under.

Mounted at /api/project-types, OUTSIDE /communities/{id}: the community comes from the communityId query parameter or the X-Tenant-Id header. On create, a communityId in the body must equal that one (400 COMMUNITY_MISMATCH). Reads need no token; create/edit/delete need projects:manage or projects:moderate.

6 endpoints.

MethodPathSummary
GET/api/project-typesList the community's project types
POST/api/project-typesCreate a project type (managers)
DELETE/api/project-types/{id}Delete a type (managers)
GET/api/project-types/{id}One project type
PUT/api/project-types/{id}Rename or re-describe a type (managers)
GET/api/project-types/project/{projectId}The types of one project

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
communityIdqueryyesstring (uuid)—
qquerynostring—
pagequerynointeger—
pageSizequerynointeger—

Responses

StatusDescriptionBody
200{ success, data: ProjectType[], ...page }—

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
communityIdqueryyesstring (uuid)—

Request body (required) — application/json

FieldTypeRequiredDescription
namestringyes—
descriptionstringno—

Responses

StatusDescriptionBody
201data is the ProjectType—
400name missing—

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
idpathyesstring (uuid)—
communityIdqueryyesstring (uuid)—

Responses

StatusDescriptionBody
200Deleted—

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
idpathyesstring (uuid)—
communityIdqueryyesstring (uuid)—

Responses

StatusDescriptionBody
200data is the ProjectType—
404Not found—

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
idpathyesstring (uuid)—
communityIdqueryyesstring (uuid)—

Request body — application/json

FieldTypeRequiredDescription
namestringno—
descriptionstringno—

Responses

StatusDescriptionBody
200data is the ProjectType—

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
projectIdpathyesstring (uuid)—
communityIdqueryyesstring (uuid)—

Responses

StatusDescriptionBody
200data is ProjectType[]—