Add /api/action/flush/arp flushing both the network and network_addresses tables in pihole-FTL.db

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2023-05-24 20:47:51 +02:00
parent 3b404ff9a0
commit b5a6ae44aa
7 changed files with 67 additions and 1 deletions
+25
View File
@@ -163,3 +163,28 @@ components:
allOf:
- $ref: 'common.yaml#/components/errors/unauthorized'
- $ref: 'common.yaml#/components/schemas/took'
flush_arp:
post:
summary: Flush the network table
tags:
- Actions
operationId: "action_flusharp"
description: |
Flushes the network table. This includes emptying the ARP table and removing both all known devices and their associated addresses.
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- $ref: 'common.yaml#/components/schemas/success'
- $ref: 'common.yaml#/components/schemas/took'
'401':
description: Unauthorized
content:
application/json:
schema:
allOf:
- $ref: 'common.yaml#/components/errors/unauthorized'
- $ref: 'common.yaml#/components/schemas/took'
+3
View File
@@ -233,6 +233,9 @@ paths:
/action/flush/logs:
$ref: 'action.yaml#/components/paths/flush_logs'
/action/flush/arp:
$ref: 'action.yaml#/components/paths/flush_arp'
/action/reboot:
$ref: 'action.yaml#/components/paths/reboot'