Skip to main content

4.12. Application Administrator - Restore deleted records

Id 4.12.
Description As an Application Administrator

I need to be able to recover records marked as deleted

So that I can rollback invalid changes
Priority High
Actors Application Administrator
API Calls

POST /sites/<site_id>/restoreĀ 

POST /blocks/<block_id>/restore

POST /units/<unit_id>/restore

POST /equipments/<equipment_id>/restore

Linked Processes
Status Implemented

Preconditions

  1. The User must be authenticated and have the Application Administrator role.
  2. The User must have a deleted record that he wants to recover

Postconditions

  1. The System recovers the selected record.

Main flow

  1. The Application Administrator retrieves a record marked as deleted.
  2. The Application Administrator recovers the record.
  3. The system validates the request parameters.
  4. The system recovers the deleted record.

Exceptions

[400 Bad Request] Invalid input:

If mandatory fields are missing or invalid, the system returns an error message.

[404 Not found] Data not found

If the Application Administrator attempts to recover a resources that does not exist, the system will return an error.

[409 Not deleted] Data not marked as deleted

If the Application Administrator attempts to recover a resources that is not marked as deleted, the system will return an error.

[500 Internal Server Error] System Error

If the system fails to save changes due to an internal error, it displays an appropriate message and logs the error for further investigation.