From 376476d09325723df303608b2d3cc451b7121a05 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 9 May 2025 14:20:10 +0000 Subject: [PATCH] Deployed 6a96925 to master with MkDocs 1.6.1 and mike 2.1.3 --- master/documentation/rest-api/swagger.yaml | 76 +++++++++++++++++++++- 1 file changed, 74 insertions(+), 2 deletions(-) diff --git a/master/documentation/rest-api/swagger.yaml b/master/documentation/rest-api/swagger.yaml index 46c00ae..fb6cd00 100644 --- a/master/documentation/rest-api/swagger.yaml +++ b/master/documentation/rest-api/swagger.yaml @@ -692,6 +692,7 @@ paths: tags: - Interfaces 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 parameters: - description: The interface identifier. @@ -739,6 +740,7 @@ paths: - Interfaces /interface/new: 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 parameters: - description: The interface data. @@ -779,6 +781,34 @@ paths: summary: Create a new interface record. tags: - 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}: get: operationId: metrics_handleMetricsForInterfaceGet @@ -967,7 +997,7 @@ paths: tags: - Peers 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 parameters: - description: The peer identifier. @@ -1078,7 +1108,7 @@ paths: - Peers /peer/new: 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 parameters: - description: The peer data. @@ -1119,6 +1149,48 @@ paths: summary: Create a new peer record. tags: - 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: get: description: Normal users can only access their own record. Admins can access all records.