المشاريع — a community's project showcase with optional progress tracking.
Plan: every route needs the projects feature (403 FEATURE_NOT_AVAILABLE).
Who reads what (GET / and GET /{id} accept an optional token):
- approved member → every project of the community;
- guest or signed-in non-member → only projects with
isGuestVisible: true, and only when the community exposes projects to guests; otherwise an empty page / 404. A token alone is not membership. creator.emailis removed for guests.
Who writes what:
- create:
projects:manage,projects:createorprojects:moderate; - edit / delete ANY project:
projects:manage,projects:moderateorprojects:edit; the creator (createdBy) may always edit and delete their own.projects:createalone does NOT edit other people's projects. assignedOwnerId(hand a project to another member) needsprojects:manageorprojects:moderate, and the target must be an APPROVED member of this community (403PROJECT_OWNER_ASSIGN_FORBIDDEN/ 400PROJECT_OWNER_NOT_MEMBER).- create and edit are refused to members restricted from media or suspended
(403
RESTRICTION_BLOCKED), and count against the storage quota. communityIdin the body is optional; if sent it must equal the path's (400COMMUNITY_MISMATCH).
5 endpoints.
| Method | Path | Summary |
|---|---|---|
GET | /api/communities/{communityId}/projects | List projects |
POST | /api/communities/{communityId}/projects | Create a project |
DELETE | /api/communities/{communityId}/projects/{id} | Delete a project (owner, or projects:manage / moderate / edit) |
GET | /api/communities/{communityId}/projects/{id} | Get one project |
PUT | /api/communities/{communityId}/projects/{id} | Edit a project (owner, or projects:manage / moderate / edit) |
GET /api/communities/{communityId}/projectsAuth: optional — a token changes what you can see (see "Who may read what").
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
search | query | no | string | Matches name |
typeIds | query | no | string | Comma-separated or JSON array of project type ids |
page | query | no | integer | — |
pageSize | query | no | integer | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | A page of projects the caller may see (empty for a non-member of a private community) | object |
POST /api/communities/{communityId}/projectsAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
Request body (required) — multipart/form-data
Type: ProjectWriteForm
Responses
| Status | Description | Body |
|---|---|---|
201 | Created; data is the Project | — |
400 | Missing names/description/logo, invalid image, negative currentAmount, COMMUNITY_MISMATCH, PROJECT_OWNER_NOT_MEMBER | — |
403 | Missing permission, RESTRICTION_BLOCKED, PROJECT_OWNER_ASSIGN_FORBIDDEN, FEATURE_NOT_AVAILABLE, or storage quota exceeded | — |
DELETE /api/communities/{communityId}/projects/{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 | — |
403 | Not the owner and no delete-any permission | — |
404 | Project not found | — |
GET /api/communities/{communityId}/projects/{id}Auth: optional — a token changes what you can see (see "Who may read what").
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
id | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | The project; data is a Project | — |
404 | Missing | — |
PUT /api/communities/{communityId}/projects/{id}Send only the fields to change. removeLogo is refused unless a new projectLogo is uploaded; removeBanner=true clears the banner. assignedOwnerId="" gives the project back to the caller.
Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string (uuid) | — |
id | path | yes | string (uuid) | — |
Request body — multipart/form-data
Type: object
Responses
| Status | Description | Body |
|---|---|---|
200 | Updated; data is the Project | — |
400 | Validation error, COMMUNITY_MISMATCH, PROJECT_OWNER_NOT_MEMBER | — |
403 | Not the owner and no edit-any permission, RESTRICTION_BLOCKED, PROJECT_OWNER_ASSIGN_FORBIDDEN, or storage quota exceeded | — |
404 | Project not found | — |