Skip to content

Commit 9f4ec3f

Browse files
committed
Add status operations
1 parent e5bcd70 commit 9f4ec3f

File tree

1 file changed

+104
-0
lines changed

1 file changed

+104
-0
lines changed

docs/developers/operations-api/system-operations.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,107 @@ _Operation is restricted to super_user roles only_
6161
"operation": "system_information"
6262
}
6363
```
64+
65+
---
66+
## Set Status
67+
Sets a status value that can be used for application-specific status tracking. Status values are stored in memory and are not persisted across restarts.
68+
69+
_Operation is restricted to super_user roles only_
70+
71+
* operation _(required)_ - must always be `set_status`
72+
* id _(required)_ - the key identifier for the status
73+
* status _(required)_ - the status value to set (string between 1-512 characters)
74+
75+
### Body
76+
```json
77+
{
78+
"operation": "set_status",
79+
"id": "primary",
80+
"status": "active"
81+
}
82+
```
83+
84+
### Response: 200
85+
```json
86+
{
87+
"id": "primary",
88+
"status": "active",
89+
"__createdtime__": 1621364589543,
90+
"__updatedtime__": 1621364589543
91+
}
92+
```
93+
94+
### Notes
95+
- The `id` parameter must be one of the allowed status types: 'primary', 'maintenance', or 'availability'
96+
- If no `id` is specified, it defaults to 'primary'
97+
- For 'availability' status, only 'Available' or 'Unavailable' values are accepted
98+
- For other status types, any string value is accepted
99+
100+
---
101+
## Get Status
102+
Retrieves a status value previously set with the set_status operation.
103+
104+
_Operation is restricted to super_user roles only_
105+
106+
* operation _(required)_ - must always be `get_status`
107+
* id _(optional)_ - the key identifier for the status to retrieve (defaults to all statuses if not provided)
108+
109+
### Body
110+
```json
111+
{
112+
"operation": "get_status",
113+
"id": "primary"
114+
}
115+
```
116+
117+
### Response: 200
118+
```json
119+
{
120+
"id": "primary",
121+
"status": "active",
122+
"__createdtime__": 1621364589543,
123+
"__updatedtime__": 1621364589543
124+
}
125+
```
126+
127+
If no id parameter is provided, all status values will be returned:
128+
```json
129+
[
130+
{
131+
"id": "primary",
132+
"status": "active",
133+
"__createdtime__": 1621364589543,
134+
"__updatedtime__": 1621364589543
135+
},
136+
{
137+
"id": "maintenance",
138+
"status": "scheduled",
139+
"__createdtime__": 1621364600123,
140+
"__updatedtime__": 1621364600123
141+
}
142+
]
143+
```
144+
145+
---
146+
## Clear Status
147+
Removes a status entry by its ID.
148+
149+
_Operation is restricted to super_user roles only_
150+
151+
* operation _(required)_ - must always be `clear_status`
152+
* id _(required)_ - the key identifier for the status to remove
153+
154+
### Body
155+
```json
156+
{
157+
"operation": "clear_status",
158+
"id": "primary"
159+
}
160+
```
161+
162+
### Response: 200
163+
```json
164+
{
165+
"message": "Status successfully cleared"
166+
}
167+
```

0 commit comments

Comments
 (0)