+ control: /clients: get the list of clients' IP addresses and names from /etc/hosts

This commit is contained in:
Simon Zolin
2019-03-19 18:47:22 +03:00
parent b6d0d94990
commit ed942f3e31
3 changed files with 129 additions and 0 deletions

View File

@@ -39,6 +39,9 @@ tags:
-
name: dhcp
description: 'Built-in DHCP server controls'
-
name: clients
description: 'Clients list operations'
-
name: install
description: 'First-time install configuration handlers'
@@ -668,6 +671,22 @@ paths:
application/json:
enabled: false
# --------------------------------------------------
# Clients list methods
# --------------------------------------------------
/clients:
get:
tags:
- clients
operationId: clientsStatus
summary: 'Get information about configured clients'
responses:
200:
description: OK
schema:
$ref: "#/definitions/Clients"
# --------------------------------------------------
# I18N methods
# --------------------------------------------------
@@ -1317,6 +1336,23 @@ definitions:
description: "Network interfaces dictionary (key is the interface name)"
additionalProperties:
$ref: "#/definitions/NetInterface"
Client:
type: "object"
description: "Client information"
properties:
ip:
type: "string"
description: "IP address"
example: "127.0.0.1"
name:
type: "string"
description: "Name"
example: "localhost"
Clients:
type: "array"
items:
$ref: "#/definitions/Client"
description: "Clients array"
InitialConfiguration:
type: "object"
description: "AdGuard Home initial configuration (for the first-install wizard)"