Skip to content
Francis Pion edited this page Jan 4, 2025 · 4 revisions

Welcome to the CMS wiki!

Conventions

  • All aggregates must define POST (creation), PUT (replace), PATCH (update) and DELETE (deletion) endpoints to execute commands modifying the aggregate.
  • All aggregates may define more endpoints to execute commands that are linked to specific tasks, such as setting the default language or publishing a content locale.
  • All aggregates must define a GET endpoint executing a query to search through entities.
  • All aggregates must define one GET endpoint per unique field, such as ID, default, unique names, etc. Those endpoints execute a query to read one entity.

Status Codes

Status codes must be used correctly.

  • 200 OK The operation has succeeded, with a return value.
  • 201 Created A new entity/aggregate has been created (must also be used with PUT endpoints).
  • 202 Accepted The operation has been accepted, but may not be completed yet.
  • 204 No Content The operation has succeeded, without return value.
  • 400 Bad Request The operation failed because an error has occurred on the client-side, such as bad input data.
  • 401 Unauthorized The operation was not executed, because the actor could not be identified.
  • 403 Forbidden The operation was not executed, because the actor does not have sufficient privileges.
  • 404 Not Found The operation references an entity which does not exist, such as the entity itself, or a related entity.
  • 409 Conflict The operation would create a conflict, such as two entities using the same unique name.
  • 500 Internal Server Error An unhandled error has occurred on the server-side.
  • 501 Not Implemented The operation is planned, but is not implemented yet.
Clone this wiki locally