Pull request #2323: AGDNS-2598-clients-search

Merge in DNS/adguard-home from AGDNS-2598-clients-search to master

Squashed commit of the following:

commit 9df3c19acad16203ccaa7752902bce8bc835c8fb
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Mon Dec 16 19:11:43 2024 +0300

    home: imp code

commit 7bf8f0a516b57fab6c19c24e4a156c87d9c4d03f
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Mon Dec 16 18:34:06 2024 +0300

    all: imp code

commit 2dd1c941232ceeaef4c506717096a8b8e8555e6e
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Fri Dec 13 17:35:11 2024 +0300

    all: clients search
This commit is contained in:
Stanislav Chzhen
2024-12-17 15:08:31 +03:00
parent dedbadafc4
commit fe07786d2d
8 changed files with 281 additions and 26 deletions

View File

@@ -934,6 +934,9 @@
'description': 'OK.'
'/clients/find':
'get':
'deprecated': true
'description': >
Deprecated: Use `POST /clients/search` instead.
'tags':
- 'clients'
'operationId': 'clientsFind'
@@ -957,6 +960,26 @@
'application/json':
'schema':
'$ref': '#/components/schemas/ClientsFindResponse'
'/clients/search':
'post':
'tags':
- 'clients'
'operationId': 'clientsSearch'
'summary': >
Get information about clients by their IP addresses, CIDRs, MAC addresses, or ClientIDs.
'requestBody':
'content':
'application/json':
'schema':
'$ref': '#/components/schemas/ClientsSearchRequest'
'required': true
'responses':
'200':
'description': 'OK.'
'content':
'application/json':
'schema':
'$ref': '#/components/schemas/ClientsFindResponse'
'/access/list':
'get':
'operationId': 'accessList'
@@ -2749,6 +2772,20 @@
'properties':
'name':
'type': 'string'
'ClientsSearchRequest':
'type': 'object'
'description': 'Client search request'
'properties':
'clients':
'type': 'array'
'items':
'$ref': '#/components/schemas/ClientsSearchRequestItem'
'ClientsSearchRequestItem':
'type': 'object'
'properties':
'id':
'type': 'string'
'description': 'Client IP address, CIDR, MAC address, or ClientID'
'ClientsFindResponse':
'type': 'array'
'description': 'Client search results.'