@@ -295,6 +295,61 @@ HTTP 200 Ok
295
295
}
296
296
```
297
297
298
+ ## Restore deleted hosts entry
299
+
300
+ ** URI:** https://hub.cfengine.com/api/hosts/restore-deleted/:host-id
301
+
302
+ ** Method:** POST
303
+
304
+ Restore host entry in reporting database.
305
+
306
+ Note: to be able to perform this action related RBAC rule (alias ` hosts-undelete.post ` ) should be enabled.
307
+
308
+ ** Responses:**
309
+
310
+ | HTTP response code | Description |
311
+ | ---------------------------| ----------------------------|
312
+ | 200 OK | Host is found and restored |
313
+ | 404 NOT FOUND | Host is not found |
314
+ | 500 Internal server error | Internal server error |
315
+
316
+ ** Example request (curl):**
317
+ ```
318
+ curl -k --user <username>:<password> -X POST https://hub.example.com/api/hosts/restore-deleted/SHA=2123f85b38189008ae12be159fb961584dda1249c94efed43fec2c70f233975d
319
+ ```
320
+ ** Example response:**
321
+
322
+ ```
323
+ HTTP 200 Ok
324
+ ```
325
+
326
+ ## Permanently delete host entry
327
+
328
+ ** URI:** https://hub.cfengine.com/api/hosts/delete-permanently/:host-id
329
+
330
+ ** Method:** POST
331
+
332
+ Permanently deletes host entry from the reporting database.
333
+
334
+ Note: to be able to perform this action related RBAC rule (alias ` hosts-delete-permanently.delete ` ) should be enabled.
335
+
336
+ ** Responses:**
337
+
338
+ | HTTP response code | Description |
339
+ | ---------------------------| -----------------------------------------------|
340
+ | 200 OK | Deleted host is found and removed permanently |
341
+ | 404 NOT FOUND | Host is not found |
342
+ | 500 Internal server error | Internal server error |
343
+
344
+ ** Example request (curl):**
345
+ ```
346
+ curl -k --user <username>:<password> -X DELETE https://hub.example.com/api/hosts/delete-permanently/SHA=2123f85b38189008ae12be159fb961584dda1249c94efed43fec2c70f233975d
347
+ ```
348
+ ** Example response:**
349
+
350
+ ```
351
+ HTTP 200 Ok
352
+ ```
298
353
299
354
## List monitoring attributes for host
300
355
0 commit comments