Example 3: Archiving and Deleting Projects

When a project is completed or no longer needed, you may want to lock its state (prevent further changes) and then remove it from the active roster. This workflow ensures a controlled, reversible step (archiving) before the permanent action of deletion.

Process:

  1. Archive the Project:

    • Endpoint: PUT /projects/{id}/archive

    • Action: Temporarily freeze the project to prevent modifications.

    • Result: Ensures the project remains intact but read-only, providing a safety net against accidental loss of data.

  2. Delete the Project:

    • Endpoint: DELETE /projects/{id}

    • Action: Permanently remove the archived project.

    • Result: Frees up storage and declutters your project list once you’re sure the data isn’t needed.


Example Use Case:
A long-term construction project that has reached completion and no longer needs active tracking. After archiving for record-keeping, the project can eventually be deleted to maintain a clean working environment.