mirror of
https://github.com/h44z/wg-portal.git
synced 2025-06-28 17:27:01 +00:00
Deployed 6a96925 to master with MkDocs 1.6.1 and mike 2.1.3
This commit is contained in:
parent
ccdd8a73b9
commit
376476d093
@ -692,6 +692,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Interfaces
|
- Interfaces
|
||||||
put:
|
put:
|
||||||
|
description: This endpoint updates an existing interface with the provided data. All required fields must be filled (e.g. name, private key, public key, ...).
|
||||||
operationId: interfaces_handleUpdatePut
|
operationId: interfaces_handleUpdatePut
|
||||||
parameters:
|
parameters:
|
||||||
- description: The interface identifier.
|
- description: The interface identifier.
|
||||||
@ -739,6 +740,7 @@ paths:
|
|||||||
- Interfaces
|
- Interfaces
|
||||||
/interface/new:
|
/interface/new:
|
||||||
post:
|
post:
|
||||||
|
description: This endpoint creates a new interface with the provided data. All required fields must be filled (e.g. name, private key, public key, ...).
|
||||||
operationId: interfaces_handleCreatePost
|
operationId: interfaces_handleCreatePost
|
||||||
parameters:
|
parameters:
|
||||||
- description: The interface data.
|
- description: The interface data.
|
||||||
@ -779,6 +781,34 @@ paths:
|
|||||||
summary: Create a new interface record.
|
summary: Create a new interface record.
|
||||||
tags:
|
tags:
|
||||||
- Interfaces
|
- Interfaces
|
||||||
|
/interface/prepare:
|
||||||
|
get:
|
||||||
|
description: This endpoint returns a new interface with default values (fresh key pair, valid name, new IP address pool, ...).
|
||||||
|
operationId: interfaces_handlePrepareGet
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/models.Interface'
|
||||||
|
"401":
|
||||||
|
description: Unauthorized
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/models.Error'
|
||||||
|
"403":
|
||||||
|
description: Forbidden
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/models.Error'
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/models.Error'
|
||||||
|
security:
|
||||||
|
- BasicAuth: []
|
||||||
|
summary: Prepare a new interface record.
|
||||||
|
tags:
|
||||||
|
- Interfaces
|
||||||
/metrics/by-interface/{id}:
|
/metrics/by-interface/{id}:
|
||||||
get:
|
get:
|
||||||
operationId: metrics_handleMetricsForInterfaceGet
|
operationId: metrics_handleMetricsForInterfaceGet
|
||||||
@ -967,7 +997,7 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Peers
|
- Peers
|
||||||
put:
|
put:
|
||||||
description: Only admins can update existing records.
|
description: Only admins can update existing records. The peer record must contain all required fields (e.g., public key, allowed IPs).
|
||||||
operationId: peers_handleUpdatePut
|
operationId: peers_handleUpdatePut
|
||||||
parameters:
|
parameters:
|
||||||
- description: The peer identifier.
|
- description: The peer identifier.
|
||||||
@ -1078,7 +1108,7 @@ paths:
|
|||||||
- Peers
|
- Peers
|
||||||
/peer/new:
|
/peer/new:
|
||||||
post:
|
post:
|
||||||
description: Only admins can create new records.
|
description: Only admins can create new records. The peer record must contain all required fields (e.g., public key, allowed IPs).
|
||||||
operationId: peers_handleCreatePost
|
operationId: peers_handleCreatePost
|
||||||
parameters:
|
parameters:
|
||||||
- description: The peer data.
|
- description: The peer data.
|
||||||
@ -1119,6 +1149,48 @@ paths:
|
|||||||
summary: Create a new peer record.
|
summary: Create a new peer record.
|
||||||
tags:
|
tags:
|
||||||
- Peers
|
- Peers
|
||||||
|
/peer/prepare/{id}:
|
||||||
|
get:
|
||||||
|
description: This endpoint is used to prepare a new peer record. The returned data contains a fresh key pair and valid ip address.
|
||||||
|
operationId: peers_handlePrepareGet
|
||||||
|
parameters:
|
||||||
|
- description: The interface identifier.
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/models.Peer'
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/models.Error'
|
||||||
|
"401":
|
||||||
|
description: Unauthorized
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/models.Error'
|
||||||
|
"403":
|
||||||
|
description: Forbidden
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/models.Error'
|
||||||
|
"404":
|
||||||
|
description: Not Found
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/models.Error'
|
||||||
|
"500":
|
||||||
|
description: Internal Server Error
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/models.Error'
|
||||||
|
security:
|
||||||
|
- BasicAuth: []
|
||||||
|
summary: Prepare a new peer record for the given WireGuard interface.
|
||||||
|
tags:
|
||||||
|
- Peers
|
||||||
/provisioning/data/peer-config:
|
/provisioning/data/peer-config:
|
||||||
get:
|
get:
|
||||||
description: Normal users can only access their own record. Admins can access all records.
|
description: Normal users can only access their own record. Admins can access all records.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user