4.27. Organisation Administrator - Restore records deleted by the organisation
| Id | 4.27. |
| Description | As an Organisation Administrator I need to be able to recover records marked as deleted by my organisation. So that I can rollback invalid changes |
| Priority | High |
| Actors | Organisation 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
- The User must be authenticated and have the Organisation Administrator role.
- The User must have a deleted record that he wants to recover
- The record must have been deleted by a user in his organisation
Postconditions
- The System recovers the selected record.
Main flow
- The Organisation Administrator retrieves a record marked as deleted.
- The Organisation Administrator recovers the record.
- The system validates the request parameters.
- 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 Organisation 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 Organisation 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.
No comments to display
No comments to display