swagger: "2.0" info: description: "This is a sample server for FF-Wireguard" version: "1.0.0" title: "Freifunk API Server" termsOfService: "http://swagger.io/terms/" contact: email: "tech@freifunk-dresden.de" license: name: "Apache 2.0" url: "http://www.apache.org/licenses/LICENSE-2.0.html" host: "api.freifunk-dresden.de" basePath: "/v2" tags: - name: "wireguard" description: "Wireguard operations" externalDocs: description: "Find out more about our server" url: "http://freifunk-dresden.de" schemes: - "https" - "http" paths: /wireguard/register: get: tags: - "wireguard" summary: "Register node" description: "" operationId: "nodeRegister" produces: - "application/xml" - "application/json" parameters: - name: "node" in: "query" description: "node number" required: true type: "string" - name: "key" in: "query" description: "Public key" required: true type: "string" responses: "200": description: "successful operation" schema: type: "string" headers: X-Expires-After: type: "string" format: "date-time" description: "date in UTC when token expires" "400": description: "Can't register node" /wireguard/publickey: get: tags: - "wireguard" summary: "Get server public key" description: "Wireguard public key" operationId: "getPubKey" produces: - "application/xml" - "application/json" parameters: [] responses: default: description: "successful operation" schema: type: "string" securityDefinitions: api_key: type: "apiKey" name: "api_key" in: "header" definitions: Node: type: "object" properties: node: type: "integer" format: "int32" pubkey: type: "string" description: "node public key" xml: name: "node" ApiResponse: type: "object" properties: code: type: "integer" format: "int32" type: type: "string" message: type: "string" externalDocs: description: "Find out more about Swagger" url: "http://swagger.io"