Pennykite

projects.update

Update or archive a project

Saves name, description and archived state with optimistic concurrency. Send the `version` you loaded; if someone else saved first the call fails with CONFLICT and you must reload.

Transport: POST /api/rpc/projects/update using the oRPC RPC protocol. Call it through the typed client in app/sdk/client.ts; the request must be same-origin and carry a verified session cookie.

Input

projects.update input fields
FieldTypeRequiredNotes
namestringyesmin length 1; max length 120
descriptionstringnodefault ""; max length 4000
workspaceIdstringyesmin length 1
idstringyesmin length 1
versionintegeryesmin -9007199254740991; max 9007199254740991
archivedbooleanyes

Output

projects.update output fields
FieldTypeRequiredNotes
namestringyesmin length 1; max length 120
descriptionstringyesdefault ""; max length 4000
idstringyes
workspaceIdstringyes
archivedbooleanyes
versionintegeryesmin -9007199254740991; max 9007199254740991
createdAtstring (ISO 8601 date-time, UTC)yes
updatedAtstring (ISO 8601 date-time, UTC)yes

Errors

CodeStatusWhen
UNAUTHENTICATED401No verified session was sent with the request.
FORBIDDEN403You are not an active member of this workspace, or your role does not allow the action.
NOT_FOUND404No project with this ID exists in the workspace.
CONFLICT409The record changed since you loaded it; reload and try again.
QUOTA_EXCEEDED403The workspace already holds its maximum number of projects (archived projects count).

Was this page helpful?

On this page