You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developers/operations-api/system-operations.md
+109Lines changed: 109 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ _Operation is restricted to super_user roles only_
20
20
"message": "Restarting HarperDB. This may take up to 60 seconds."
21
21
}
22
22
```
23
+
23
24
---
24
25
25
26
## Restart Service
@@ -47,6 +48,7 @@ _Operation is restricted to super_user roles only_
47
48
```
48
49
49
50
---
51
+
50
52
## System Information
51
53
Returns detailed metrics on the host system.
52
54
@@ -61,3 +63,110 @@ _Operation is restricted to super_user roles only_
61
63
"operation": "system_information"
62
64
}
63
65
```
66
+
67
+
---
68
+
69
+
## Set Status
70
+
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.
71
+
72
+
_Operation is restricted to super_user roles only_
73
+
74
+
* operation _(required)_ - must always be `set_status`
75
+
* id _(required)_ - the key identifier for the status
76
+
* status _(required)_ - the status value to set (string between 1-512 characters)
77
+
78
+
### Body
79
+
```json
80
+
{
81
+
"operation": "set_status",
82
+
"id": "primary",
83
+
"status": "active"
84
+
}
85
+
```
86
+
87
+
### Response: 200
88
+
```json
89
+
{
90
+
"id": "primary",
91
+
"status": "active",
92
+
"__createdtime__": 1621364589543,
93
+
"__updatedtime__": 1621364589543
94
+
}
95
+
```
96
+
97
+
### Notes
98
+
- The `id` parameter must be one of the allowed status types: 'primary', 'maintenance', or 'availability'
99
+
- If no `id` is specified, it defaults to 'primary'
100
+
- For 'availability' status, only 'Available' or 'Unavailable' values are accepted
101
+
- For other status types, any string value is accepted
102
+
103
+
---
104
+
105
+
## Get Status
106
+
Retrieves a status value previously set with the set_status operation.
107
+
108
+
_Operation is restricted to super_user roles only_
109
+
110
+
* operation _(required)_ - must always be `get_status`
111
+
* id _(optional)_ - the key identifier for the status to retrieve (defaults to all statuses if not provided)
112
+
113
+
### Body
114
+
```json
115
+
{
116
+
"operation": "get_status",
117
+
"id": "primary"
118
+
}
119
+
```
120
+
121
+
### Response: 200
122
+
```json
123
+
{
124
+
"id": "primary",
125
+
"status": "active",
126
+
"__createdtime__": 1621364589543,
127
+
"__updatedtime__": 1621364589543
128
+
}
129
+
```
130
+
131
+
If no id parameter is provided, all status values will be returned:
132
+
```json
133
+
[
134
+
{
135
+
"id": "primary",
136
+
"status": "active",
137
+
"__createdtime__": 1621364589543,
138
+
"__updatedtime__": 1621364589543
139
+
},
140
+
{
141
+
"id": "maintenance",
142
+
"status": "scheduled",
143
+
"__createdtime__": 1621364600123,
144
+
"__updatedtime__": 1621364600123
145
+
}
146
+
]
147
+
```
148
+
149
+
---
150
+
151
+
## Clear Status
152
+
Removes a status entry by its ID.
153
+
154
+
_Operation is restricted to super_user roles only_
155
+
156
+
* operation _(required)_ - must always be `clear_status`
157
+
* id _(required)_ - the key identifier for the status to remove
0 commit comments