{ "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Kusk Gateway API", "description": "This is the Kusk Gateway Management API" }, "servers": [ { "url": "http://localhost:4010", "description": "My local endpoint mockup" }, { "url": "http://147.75.33.177:8080", "description": "Testing endpoint" } ], "externalDocs": { "description": "Find out more about Kusk-Gateway", "url": "https://kubeshop.github.io/kusk-gateway/" }, "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" }, { "name": "static routes", "description": "Get the list of all static routes" } ], "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": "fleetname", "in": "query", "schema": { "type": "string" }, "required": false, "description": "optional filter on fleet" }, { "name": "fleetnamespace", "in": "query", "schema": { "type": "string" }, "required": false, "description": "optional filter on fleet" }, { "name": "namespace", "in": "query", "schema": { "type": "string" }, "required": false, "description": "optional filter on namespace" } ], "responses": { "200": { "description": "a list of apis", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ApiItem" } } } } } } } }, "/apis/{namespace}/{name}": { "get": { "tags": ["apis"], "summary": "Get an API instance by namespace and name", "operationId": "getApi", "parameters": [ { "name": "namespace", "in": "path", "required": true, "schema": { "type": "string", "default": "default" } }, { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "crd", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "returns the CRD of the API ( Raw Api Spec )" } ], "responses": { "200": { "description": "API item", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiItem" } } } }, "404": { "description": "API item not found" } } } }, "/services": { "get": { "tags": ["services"], "summary": "Get a list of services handled by kusk-gateway", "description": "Returns the list of services available in the cluster that are related to kusk-gateway", "operationId": "getServices", "parameters": [ { "name": "namespace", "in": "query", "schema": { "type": "string" }, "required": false, "description": "optional filter on namespace" } ], "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, "schema": { "type": "string" } }, { "name": "name", "in": "path", "required": true, "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", "schema": { "type": "string" }, "required": false, "description": "optional filter on namespace" } ], "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", "required": true, "schema": { "type": "string" }, "description": "the namespace of the fleet" }, { "name": "name", "in": "path", "required": true, "schema": { "type": "string" }, "description": "the name of the fleet" }, { "name": "crd", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "returns the fleet CRD" } ], "responses": { "200": { "description": "envoy fleet details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EnvoyFleetItem" } } } }, "404": { "description": "Envoy fleet not found by namespace-name combination" } } } }, "/staticroutes": { "get": { "tags": ["static routes"], "summary": "Get a list of static routes", "description": "Returns a list of static routes", "operationId": "getStaticRoutes", "parameters": [ { "name": "namespace", "in": "query", "schema": { "type": "string" }, "required": false, "description": "optional filter on namespace" } ], "responses": { "200": { "description": "list of static routes", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/StaticRouteItem" } } } } } } } }, "/staticroutes/{namespace}/{name}": { "get": { "tags": ["static routes"], "summary": "Get details for a single static route", "description": "Returns an object containing info about the static route corresponding to the namespace and name", "operationId": "getStaticRoute", "parameters": [ { "name": "namespace", "in": "path", "required": true, "schema": { "type": "string" }, "description": "the namespace of the static route" }, { "name": "name", "in": "path", "required": true, "schema": { "type": "string" }, "description": "the name of the static route" }, { "name": "crd", "in": "query", "required": false, "schema": { "type": "boolean" }, "description": "return the static route CRD" } ], "responses": { "200": { "description": "get static route details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StaticRouteItem" } } } }, "404": { "description": "Static Route not found by namespace-name combination" } } } } }, "components": { "schemas": { "ApiItem": { "type": "object", "required": ["name", "namespace", "fleet", "service", "version"], "properties": { "name": { "type": "string" }, "namespace": { "type": "string" }, "fleet": { "$ref": "#/components/schemas/ApiItem_Fleet" }, "service": { "$ref": "#/components/schemas/ApiItem_Service" }, "version": { "type": "string" }, "raw": { "type": "object" } } }, "ServiceItem": { "type": "object", "required": ["name", "status", "namespace"], "properties": { "name": { "type": "string" }, "status": { "type": "string", "enum": ["available", "unavailable"] }, "namespace": { "type": "string" } } }, "EnvoyFleetItem": { "type": "object", "required": ["name", "namespace"], "properties": { "name": { "type": "string" }, "namespace": { "type": "string" }, "apis": { "type": "array", "items": { "$ref": "#/components/schemas/ApiItem_Fleet" } }, "services": { "type": "array", "items": { "$ref": "#/components/schemas/ServiceItem" } }, "staticRoutes": { "type": "array", "items": { "$ref": "#/components/schemas/StaticRouteItem_Fleet" } }, "raw": { "type": "object" } } }, "StaticRouteItem": { "type": "object", "required": ["name", "namespace"], "properties": { "name": { "type": "string" }, "namespace": { "type": "string" }, "raw": { "type": "object" } } }, "ApiItem_Fleet": { "type": "object", "required": ["name", "namespace"], "properties": { "name": { "type": "string" }, "namespace": { "type": "string" } } }, "StaticRouteItem_Fleet": { "type": "object", "required": ["name", "namespace"], "properties": { "name": { "type": "string" }, "namespace": { "type": "string" } } }, "ApiItem_Service": { "type": "object", "required": ["name", "namespace"], "properties": { "name": { "type": "string" }, "namespace": { "type": "string" } } } } } }