{ "openapi": "3.0.0", "info": { "title": "Kusk Gateway API", "description": "This is the Kusk Gateway Management API", "version": "1.0.0" }, "externalDocs": { "description": "Find out more about Kusk-Gateway", "url": "https://kubeshop.github.io/kusk-gateway/" }, "servers": [ { "url": "http://localhost:4010", "description": "My local endpoint mockup" } ], "tags": [ { "name": "apis", "description": "Get the list of the APIs" }, { "name": "services", "description": "Get the list of all services" }, { "name": "fleets", "description": "Get the list of all envoy fleets" } ], "paths": { "/apis": { "get": { "tags": ["apis"], "summary": "Get a list of APIs", "description": "Returns the list of APIs available in the cluster", "operationId": "getApis", "parameters": [ { "name": "fleet", "in": "query", "description": "optional filter on fleet", "required": false, "style": "form", "explode": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "a list of apis", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ApiItem" } } } } } } } }, "/apis/{apiId}/openapispec": { "get": { "tags": ["apis"], "summary": "Get the OpenAPI spec by API id", "description": "Returns the OpenAPI specification", "operationId": "getApiOpenApiSpec", "parameters": [ { "name": "apiId", "in": "path", "required": true, "style": "simple", "explode": false, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "OpenAPI spec object", "content": { "application/json": { "schema": { "type": "object" } } } }, "404": { "description": "OpenAPI spec not found" } } } }, "/services": { "get": { "tags": ["services"], "summary": "Get a list of services", "description": "Returns the list of services available in the cluster", "operationId": "getServices", "parameters": [ { "name": "namespace", "in": "query", "description": "optional filter on namespace", "required": false, "style": "form", "explode": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "list of services", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceItem" } } } } } } } }, "/services/{namespace}/{name}": { "get": { "tags": ["services"], "summary": "Get details for a single service", "description": "Returns an object containing info about the service corresponding to the namespace and name", "operationId": "getService", "parameters": [ { "name": "namespace", "in": "path", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "name", "in": "path", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "service details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServiceItem" } } } }, "404": { "description": "Service not found by namespace-name combination" } } } }, "/fleets": { "get": { "tags": ["fleets"], "summary": "Get a list of envoy fleets", "description": "Returns a list of envoy fleets that are available in the cluster", "operationId": "getEnvoyFleets", "parameters": [ { "name": "namespace", "in": "query", "description": "optional filter on namespace", "required": false, "style": "form", "explode": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "list of envoy fleets", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/EnvoyFleetItem" } } } } } } } }, "/fleets/{namespace}/{name}": { "get": { "tags": ["fleets"], "summary": "Get details for a single envoy fleet", "description": "Returns an object containing info about the envoy fleet corresponding to the namespace and name", "operationId": "getEnvoyFleet", "parameters": [ { "name": "namespace", "in": "path", "description": "the namespace of the fleet", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } }, { "name": "name", "in": "path", "description": "the name of the fleet", "required": true, "style": "simple", "explode": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "envoy fleet details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnvoyFleetItem" } } } }, "404": { "description": "Envoy fleet not found by namespace-name combination" } } } } }, "components": { "schemas": { "ApiItem": { "required": ["fleet", "id", "name", "service", "status"], "type": "object", "properties": { "name": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "fleet": { "$ref": "#/components/schemas/ApiItem_Fleet" }, "service": { "$ref": "#/components/schemas/ApiItem_Service" } } }, "ServiceItem": { "required": ["id", "name", "status"], "type": "object", "properties": { "name": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "status": { "type": "string", "enum": ["available", "unavailable"] } } }, "EnvoyFleetItem": { "required": ["id", "name"], "type": "object", "properties": { "name": { "type": "string" }, "id": { "type": "string", "format": "uuid" } } }, "ApiItem_Fleet": { "required": ["name", "namespace"], "type": "object", "properties": { "name": { "type": "string" }, "namespace": { "type": "string" } } }, "ApiItem_Service": { "required": ["name", "namespace"], "type": "object", "properties": { "name": { "type": "string" }, "namespace": { "type": "string" } } } } } }