130 lines
3.2 KiB
YAML
130 lines
3.2 KiB
YAML
openapi: 3.0.2
|
|
info:
|
|
title: OpenVPN Admin API
|
|
description: API for managing OpenVPN and clients
|
|
version: 0.0.1
|
|
paths:
|
|
/clients:
|
|
get:
|
|
tags:
|
|
- client
|
|
summary: List all clients
|
|
operationId: get_client_clients_get
|
|
parameters:
|
|
- description: VPN client name
|
|
required: false
|
|
schema:
|
|
title: Client Name
|
|
type: string
|
|
description: VPN client name
|
|
name: client_name
|
|
in: query
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
title: Response Get Client Clients Get
|
|
'422':
|
|
description: Validation Error
|
|
|
|
post:
|
|
tags:
|
|
- client
|
|
summary: Add a new client
|
|
operationId: post_client_clients_post
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PostClientRequest'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema: { }
|
|
'422':
|
|
description: Validation Error
|
|
|
|
/openvpn/config:
|
|
get:
|
|
tags:
|
|
- openvpn
|
|
summary: Get OpenVPN configuration
|
|
operationId: get_openvpn_openvpn_config_get
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
title: Response Get Openvpn Openvpn Config Get
|
|
type: string
|
|
put:
|
|
tags:
|
|
- openvpn
|
|
summary: Update OpenVPN configuration
|
|
operationId: put_openvpn_openvpn_config_put
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/PutOpenvpnRequest'
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema: { }
|
|
'422':
|
|
description: Validation Error
|
|
post:
|
|
tags:
|
|
- openvpn
|
|
summary: Init OpenVPN
|
|
operationId: post_openvpn_openvpn_config_post
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
title: Response Post Openvpn Openvpn Config Post
|
|
type: string
|
|
components:
|
|
schemas:
|
|
PostClientRequest:
|
|
title: PostClientRequest
|
|
required:
|
|
- name
|
|
type: object
|
|
properties:
|
|
name:
|
|
title: Name
|
|
type: string
|
|
description: |-
|
|
NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
|
|
Do not edit the class manually.
|
|
|
|
PostClientRequest - a model defined in OpenAPI
|
|
|
|
name: The name of this PostClientRequest.
|
|
PutOpenvpnRequest:
|
|
title: PutOpenvpnRequest
|
|
type: object
|
|
properties:
|
|
config:
|
|
title: Config
|
|
type: string
|
|
description: |-
|
|
NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
|
|
Do not edit the class manually.
|
|
|
|
PutOpenvpnRequest - a model defined in OpenAPI
|
|
|
|
config: The config of this PutOpenvpnRequest [Optional].
|