mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-12-15 03:02:07 +03:00
+ openapi.yaml: add /clients handlers
This commit is contained in:
parent
8bf76c331d
commit
eb159e6997
@ -2,7 +2,7 @@ swagger: '2.0'
|
|||||||
info:
|
info:
|
||||||
title: 'AdGuard Home'
|
title: 'AdGuard Home'
|
||||||
description: 'AdGuard Home REST API. Admin web interface is built on top of this REST API.'
|
description: 'AdGuard Home REST API. Admin web interface is built on top of this REST API.'
|
||||||
version: 0.95.0
|
version: 0.96.0
|
||||||
schemes:
|
schemes:
|
||||||
- http
|
- http
|
||||||
basePath: /control
|
basePath: /control
|
||||||
@ -698,6 +698,54 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/Clients"
|
$ref: "#/definitions/Clients"
|
||||||
|
|
||||||
|
/clients/add:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- clients
|
||||||
|
operationId: clientsAdd
|
||||||
|
summary: 'Add a new client'
|
||||||
|
parameters:
|
||||||
|
- in: "body"
|
||||||
|
name: "body"
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/Client"
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: OK
|
||||||
|
|
||||||
|
/clients/delete:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- clients
|
||||||
|
operationId: clientsDelete
|
||||||
|
summary: 'Remove a client'
|
||||||
|
parameters:
|
||||||
|
- in: "body"
|
||||||
|
name: "body"
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/ClientDelete"
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: OK
|
||||||
|
|
||||||
|
/clients/update:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- clients
|
||||||
|
operationId: clientsUpdate
|
||||||
|
summary: 'Update client information'
|
||||||
|
parameters:
|
||||||
|
- in: "body"
|
||||||
|
name: "body"
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: "#/definitions/ClientUpdate"
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: OK
|
||||||
|
|
||||||
# --------------------------------------------------
|
# --------------------------------------------------
|
||||||
# I18N methods
|
# I18N methods
|
||||||
# --------------------------------------------------
|
# --------------------------------------------------
|
||||||
@ -1377,11 +1425,65 @@ definitions:
|
|||||||
type: "string"
|
type: "string"
|
||||||
description: "Name"
|
description: "Name"
|
||||||
example: "localhost"
|
example: "localhost"
|
||||||
|
mac:
|
||||||
|
type: "string"
|
||||||
|
use_global_settings:
|
||||||
|
type: "boolean"
|
||||||
|
filtering_enabled:
|
||||||
|
type: "boolean"
|
||||||
|
parental_enabled:
|
||||||
|
type: "boolean"
|
||||||
|
safebrowsing_enabled:
|
||||||
|
type: "boolean"
|
||||||
|
safesearch_enabled:
|
||||||
|
type: "boolean"
|
||||||
|
ClientAuto:
|
||||||
|
type: "object"
|
||||||
|
description: "Auto-Client information"
|
||||||
|
properties:
|
||||||
|
ip:
|
||||||
|
type: "string"
|
||||||
|
description: "IP address"
|
||||||
|
example: "127.0.0.1"
|
||||||
|
name:
|
||||||
|
type: "string"
|
||||||
|
description: "Name"
|
||||||
|
example: "localhost"
|
||||||
|
source:
|
||||||
|
type: "string"
|
||||||
|
description: "The source of this information"
|
||||||
|
example: "etc/hosts"
|
||||||
|
ClientUpdate:
|
||||||
|
type: "object"
|
||||||
|
description: "Client update request"
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: "string"
|
||||||
|
data:
|
||||||
|
$ref: "#/definitions/Client"
|
||||||
|
ClientDelete:
|
||||||
|
type: "object"
|
||||||
|
description: "Client delete request"
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: "string"
|
||||||
Clients:
|
Clients:
|
||||||
|
type: "object"
|
||||||
|
properties:
|
||||||
|
clients:
|
||||||
|
$ref: "#/definitions/ClientsArray"
|
||||||
|
auto_clients:
|
||||||
|
$ref: "#/definitions/ClientsAutoArray"
|
||||||
|
ClientsArray:
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
$ref: "#/definitions/Client"
|
$ref: "#/definitions/Client"
|
||||||
description: "Clients array"
|
description: "Clients array"
|
||||||
|
ClientsAutoArray:
|
||||||
|
type: "array"
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/ClientAuto"
|
||||||
|
description: "Auto-Clients array"
|
||||||
CheckConfigRequest:
|
CheckConfigRequest:
|
||||||
type: "object"
|
type: "object"
|
||||||
description: "Configuration to be checked"
|
description: "Configuration to be checked"
|
||||||
|
Loading…
Reference in New Issue
Block a user