{ "paths": { "/api/v1/api-keys/{apikey}": { "delete": { "tags": [ "API Keys" ], "summary": "Revoke an API Key", "description": "Revoke the current API key so that it cannot be used anymore", "parameters": [ { "name": "apikey", "in": "path", "required": true, "description": "The API Key to revoke", "schema": { "type": "string" } } ], "responses": { "200": { "description": "The key has been deleted" }, "404": { "description": "The key is not found for this user" } }, "security": [ { "API Key": [ "unrestricted" ], "Basic": [] } ] } }, "/api/v1/api-keys/current": { "get": { "tags": [ "API Keys" ], "summary": "Get the current API Key information", "description": "View information about the current API key", "responses": { "200": { "description": "Information about the current api key", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyData" } } } } }, "security": [ { "API Key": [] } ] }, "delete": { "tags": [ "API Keys" ], "summary": "Revoke the current API Key", "description": "Revoke the current API key so that it cannot be used anymore", "responses": { "200": { "description": "The key was revoked and is no longer usable", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyData" } } } } }, "security": [ { "API Key": [] } ] } }, "/api/v1/api-keys": { "post": { "tags": [ "API Keys" ], "summary": "Create a new API Key", "description": "Create a new API Key", "responses": { "200": { "description": "Information about the new api key", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyData" } } } } }, "requestBody": { "x-name": "request", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": false, "properties": { "label": { "type": "string", "description": "The label of the new API Key", "nullable": true }, "permissions": { "type": "array", "description": "The permissions granted to this API Key (See API Key Authentication)", "nullable": true, "items": { "type": "string" } } } } } } }, "security": [ { "API Key": [ "unrestricted" ], "Basic": [] } ] } } }, "components": { "schemas": { "ApiKeyData": { "type": "object", "additionalProperties": false, "properties": { "apiKey": { "type": "string", "description": "The API Key to use for API Key Authentication", "nullable": false }, "label": { "type": "string", "description": "The label given by the user to this API Key", "nullable": false }, "permissions": { "type": "array", "description": "The permissions associated to this API Key", "nullable": false, "items": { "type": "string" } } } } } }, "tags": [ { "name": "API Keys" } ] }