Archive a completed alarm
PUT/alarming/archive
Marks a completed alarm as archived and records when, by whom and - optionally - why, on the alarm and as an entry of its history (archiveAction ARCHIVED, the reason as its content). An archived alarm keeps its status, severity and completion state; the flag is its own and the list leaves such alarms out unless asked for them (archiveFilter of getAllAlarms). Returns the stored alarm. Only an alarm that has ended (completionState COMPLETED) can be archived: a standing alarm is still a statement about the plant and is answered with 409. Archiving an alarm that is archived already changes nothing - it keeps the time, the user and the reason of the first time, two concurrent requests included, and writes no second history entry - and returns it as stored. Needs the same right as updateAlarm, the read right on the alarm's object. Responds 404 if the alarm does not exist.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- default
OK
the default error response
Unauthorized — the bearer token is missing, expired or invalid, or carries no role. Errors raised by the security aspects contain an ErrorDto body; requests rejected by the security filter chain may have an empty body.
Forbidden — the authenticated user lacks the required role or access rights.
Entity not found.
Conflict — the alarm is still standing and cannot be archived before it has ended.
the default error response