Created
May 16, 2020 00:35
-
-
Save quenbyako/f2868d15dd7f79de43c0a7cdf9c84e20 to your computer and use it in GitHub Desktop.
kong openapi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.3 | |
# Added by API Auto Mocking Plugin | |
servers: | |
- description: локальный хост админки | |
url: https://localhost:8001/ | |
info: | |
description: api of kong gateway | |
version: "2.0.0" | |
title: kong admin api | |
paths: | |
/: | |
get: | |
summary: Retrieve Node Information | |
tags: | |
- Information Routes | |
responses: | |
200: | |
description: возвращает информацию о работе сервера | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
hostname: | |
type: string | |
node_id: | |
type: string | |
lua_version: | |
type: string | |
plugins: | |
type: object | |
properties: | |
available_on_server: | |
type: array | |
items: | |
type: string | |
enabled_in_cluster: | |
type: object | |
additionalProperties: | |
type: boolean | |
configuration: # ??? что это | |
type: object | |
tagline: | |
type: string | |
version: | |
type: string | |
/ca_certificates: | |
post: | |
summary: Create CA Certificate | |
tags: | |
- CA Certificate Object | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ca_certificate' | |
responses: | |
201: | |
description: '' | |
get: | |
summary: List All CA Certificates | |
tags: | |
- CA Certificate Object | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ca_certificate_list' | |
/ca_certificates/{certificate}: | |
get: | |
summary: Retrieve Certificate | |
tags: | |
- CA Certificate Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
201: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ca_certificate_list' | |
patch: | |
summary: Create Certificate | |
tags: | |
- CA Certificate Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ca_certificate' | |
responses: | |
201: | |
description: '' | |
put: | |
summary: Create Certificate | |
tags: | |
- CA Certificate Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ca_certificate' | |
responses: | |
201: | |
description: '' | |
delete: | |
summary: Retrieve Certificate | |
tags: | |
- CA Certificate Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
204: | |
description: '' | |
/certificates: | |
post: | |
summary: Create Certificate | |
tags: | |
- Certificate Object | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/certificate' | |
responses: | |
201: | |
description: '' | |
get: | |
summary: List All Certificates | |
tags: | |
- Certificate Object | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/certificate_list' | |
/certificates/{certificate}: | |
get: | |
summary: Retrieve Certificate | |
tags: | |
- Certificate Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
201: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/certificate_list' | |
patch: | |
summary: Create Certificate | |
tags: | |
- Certificate Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/certificate' | |
responses: | |
201: | |
description: '' | |
put: | |
summary: Create Certificate | |
tags: | |
- Certificate Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/certificate' | |
responses: | |
201: | |
description: '' | |
delete: | |
summary: Retrieve Certificate | |
tags: | |
- Certificate Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
204: | |
description: '' | |
/certificates/{certificate}/services: | |
post: | |
summary: Create Service Associated to a Specific Certificate | |
tags: | |
- Service Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
responses: | |
201: | |
description: '' | |
get: | |
summary: List Services Associated to a Specific Certificate | |
tags: | |
- Service Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service_list' | |
/certificates/{certificate}/services/{service}: | |
get: | |
summary: Retrieve Service Associated to a Specific Certificate | |
tags: | |
- Service Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
$ref: '#/components/responses/return_service' | |
patch: | |
summary: Update Service Associated to a Specific Certificate | |
tags: | |
- Service Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
responses: | |
200: | |
$ref: '#/components/responses/return_service' | |
put: | |
summary: Create Or Update Service | |
tags: | |
- Service Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
responses: | |
200: | |
$ref: '#/components/responses/return_service' | |
delete: | |
summary: Delete Service Associated to a Specific Certificate | |
tags: | |
- Service Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
204: | |
description: '' | |
/certificates/{certificate}/snis: | |
get: | |
summary: List SNIs Associated to a Specific Certificate | |
tags: | |
- SNI Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/sni_list' | |
/certificates/{certificate}/snis/{sni}: | |
get: | |
summary: Retrieve SNI Associated to a Specific Certificate | |
tags: | |
- SNI Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: sni | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/sni' | |
patch: | |
summary: Create SNI | |
tags: | |
- SNI Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: sni | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/sni' | |
responses: | |
201: | |
description: '' | |
put: | |
summary: Create SNI | |
tags: | |
- SNI Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: sni | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/sni' | |
responses: | |
201: | |
description: '' | |
delete: | |
summary: Create SNI | |
tags: | |
- SNI Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: sni | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
204: | |
description: '' | |
# /config: null | |
/consumers: | |
get: | |
summary: List All Consumers | |
tags: | |
- Consumer Object | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/consumer_list' | |
post: | |
summary: Create Consumer | |
tags: | |
- Consumer Object | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/consumer' | |
responses: | |
200: | |
description: '' | |
/consumers/{consumer}: | |
get: | |
summary: Retrieve Consumer | |
tags: | |
- Consumer Object | |
parameters: | |
- name: consumer | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/consumer' | |
delete: | |
summary: Delete Consumer | |
tags: | |
- Consumer Object | |
parameters: | |
- name: consumer | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
204: | |
description: '' | |
/consumers/{consumer}/plugins: | |
post: | |
summary: Retrieve Service Associated to a Specific Plugin | |
tags: | |
- Plugin Object | |
parameters: | |
- name: consumer | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
responses: | |
201: | |
description: '' | |
get: | |
summary: List All Plugins | |
tags: | |
- Plugin Object | |
parameters: | |
- name: consumer | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin_list' | |
/consumers/{consumer}/plugins/{plugin}: | |
get: | |
summary: Retrieve Plugin Associated to a Specific Service | |
tags: | |
- Plugin Object | |
parameters: | |
- name: consumer | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
patch: | |
summary: Retrieve Plugin Associated to a Specific Service | |
tags: | |
- Plugin Object | |
parameters: | |
- name: consumer | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
put: | |
summary: Create Or Update Plugin Associated to a Specific Consumer | |
tags: | |
- Plugin Object | |
parameters: | |
- name: consumer | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
201: | |
description: '' | |
delete: | |
summary: Create Or Update Plugin Associated to a Specific Consumer | |
tags: | |
- Plugin Object | |
parameters: | |
- name: consumer | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
204: | |
description: '' | |
/endpoints: | |
get: | |
summary: List all available endpoints provided by the Admin API. | |
tags: | |
- Information Routes | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
data: | |
type: array | |
items: | |
type: string | |
/plugins: | |
post: | |
summary: Retrieve Service Associated to a Specific Plugin | |
tags: | |
- Plugin Object | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
responses: | |
200: | |
description: '' | |
get: | |
summary: List All Plugins | |
tags: | |
- Plugin Object | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin_list' | |
/plugins/enabled: | |
get: | |
summary: Retrieve a list of all installed plugins on the Kong node. | |
tags: | |
- Plugin Object | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
enabled_plugins: | |
type: array | |
items: | |
type: string | |
/plugins/{plugin}: | |
get: | |
summary: Retrieve Plugin | |
tags: | |
- Plugin Object | |
parameters: | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
patch: | |
summary: Update Plugin | |
tags: | |
- Plugin Object | |
parameters: | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
put: | |
summary: Create Or Update Plugin | |
tags: | |
- Plugin Object | |
parameters: | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
201: | |
description: '' | |
delete: | |
summary: Create Or Update Plugin Associated to a Specific Consumer | |
tags: | |
- Plugin Object | |
parameters: | |
- name: consumer | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
204: | |
description: '' | |
/plugins/{plugin}/consumer: | |
get: | |
summary: Retrieve Consumer Associated to a Specific Plugin | |
tags: | |
- Consumer Object | |
parameters: | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/consumer' | |
patch: | |
summary: Update Consumer Associated to a Specific Plugin | |
tags: | |
- Consumer Object | |
parameters: | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/consumer' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/consumer' | |
put: | |
summary: Create Or Update Consumer Associated to a Specific Plugin | |
tags: | |
- Consumer Object | |
parameters: | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/consumer' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/consumer' | |
201: | |
description: '' | |
/plugins/{plugin}/route: | |
get: | |
summary: Retrieve Route Associated to a Specific Service | |
tags: | |
- Route Object | |
parameters: | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
patch: | |
summary: Update Route Associated to a Specific Plugin | |
tags: | |
- Route Object | |
parameters: | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
put: | |
summary: Create Or Update Route | |
tags: | |
- Route Object | |
parameters: | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
201: | |
description: '' | |
/plugins/{plugin}/service: | |
get: | |
summary: Retrieve Service Associated to a Specific Plugin | |
tags: | |
- Service Object | |
parameters: | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
patch: | |
summary: Update Service Associated to a Specific Plugin | |
tags: | |
- Service Object | |
parameters: | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
put: | |
summary: Create Or Update Service | |
tags: | |
- Service Object | |
parameters: | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
responses: | |
200: | |
$ref: '#/components/responses/return_service' | |
/routes: | |
post: | |
summary: Retrieve Service Associated to a Specific Plugin | |
tags: | |
- Route Object | |
parameters: | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
responses: | |
200: | |
description: '' | |
get: | |
summary: List All Routes | |
tags: | |
- Route Object | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route_list' | |
/routes/{route}: | |
get: | |
summary: Retrieve Route | |
tags: | |
- Route Object | |
parameters: | |
- name: route | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
patch: | |
summary: Update Route | |
tags: | |
- Route Object | |
parameters: | |
- name: route | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
put: | |
summary: Create Or Update Route | |
tags: | |
- Route Object | |
parameters: | |
- name: route | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
201: | |
description: '' | |
delete: | |
summary: Delete Route | |
tags: | |
- Route Object | |
parameters: | |
- name: route | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
204: | |
description: '' | |
/routes/{route}/plugins: | |
post: | |
summary: Retrieve Service Associated to a Specific Plugin | |
tags: | |
- Plugin Object | |
parameters: | |
- name: route | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
responses: | |
200: | |
description: '' | |
/routes/{route}/plugins/{plugin}: | |
get: | |
summary: Retrieve Plugin Associated to a Specific Route | |
tags: | |
- Plugin Object | |
parameters: | |
- name: route | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
patch: | |
summary: Update Plugin Associated to a Specific Route | |
tags: | |
- Plugin Object | |
parameters: | |
- name: route | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
put: | |
summary: Create Or Update Plugin Associated to a Specific Route | |
tags: | |
- Plugin Object | |
parameters: | |
- name: route | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
201: | |
description: '' | |
delete: | |
summary: Create Or Update Plugin Associated to a Specific Consumer | |
tags: | |
- Plugin Object | |
parameters: | |
- name: route | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
204: | |
description: '' | |
/routes/{route}/service: | |
get: | |
summary: Retrieve Service Associated to a Specific Route | |
tags: | |
- Service Object | |
parameters: | |
- name: route | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
patch: | |
summary: Update Service Associated to a Specific Route | |
tags: | |
- Service Object | |
parameters: | |
- name: route | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
put: | |
summary: Create Or Update Service Associated to a Specific Route | |
tags: | |
- Service Object | |
parameters: | |
- name: route | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
responses: | |
200: | |
$ref: '#/components/responses/return_service' | |
delete: | |
summary: Delete Service Associated to a Specific Route | |
tags: | |
- Service Object | |
parameters: | |
- name: route | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
204: | |
description: '' | |
/schemas/plugins/{entity}: | |
get: | |
summary: Retrieve the schema of a plugin’s configuration. | |
tags: | |
- Information Routes | |
parameters: | |
- name: entity | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
/schemas/{entity}/validate: | |
post: | |
summary: Check validity of a configuration against its entity schema. | |
tags: | |
- Information Routes | |
parameters: | |
- name: entity | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
/schemas/{entity}: | |
get: | |
summary: Retrieve the schema of an entity. | |
tags: | |
- Information Routes | |
parameters: | |
- name: entity | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
/services: | |
post: | |
summary: Create Service | |
tags: | |
- Service Object | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
responses: | |
201: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
get: | |
summary: List All Services | |
tags: | |
- Service Object | |
parameters: | |
- name: certificate | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service_list' | |
/services/{service}: | |
get: | |
summary: Retrieve Service | |
tags: | |
- Service Object | |
parameters: | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
patch: | |
summary: Update Service | |
tags: | |
- Service Object | |
parameters: | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
put: | |
summary: Create Or Update Service | |
tags: | |
- Service Object | |
parameters: | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
delete: | |
summary: Delete Service | |
tags: | |
- Service Object | |
parameters: | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
204: | |
description: '' | |
/services/{service}/plugins: | |
post: | |
summary: Retrieve Service Associated to a Specific Plugin | |
tags: | |
- Plugin Object | |
parameters: | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
responses: | |
200: | |
description: '' | |
/services/{service}/plugins/{plugin}: | |
get: | |
summary: Retrieve Plugin Associated to a Specific Service | |
tags: | |
- Plugin Object | |
parameters: | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
patch: | |
summary: Update Plugin Associated to a Specific Service | |
tags: | |
- Plugin Object | |
parameters: | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
put: | |
summary: Create Or Update Plugin Associated to a Specific Service | |
tags: | |
- Plugin Object | |
parameters: | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/plugin' | |
201: | |
description: '' | |
delete: | |
summary: Create Or Update Plugin Associated to a Specific Consumer | |
tags: | |
- Plugin Object | |
parameters: | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: plugin | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
204: | |
description: '' | |
/services/{service}/routes: | |
post: | |
summary: Retrieve Service Associated to a Specific Plugin | |
tags: | |
- Route Object | |
parameters: | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
responses: | |
200: | |
description: '' | |
get: | |
summary: List Routes Associated to a Specific Service | |
tags: | |
- Route Object | |
parameters: | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route_list' | |
/services/{service}/routes/{route}: | |
get: | |
summary: Retrieve Route Associated to a Specific Service | |
tags: | |
- Route Object | |
parameters: | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: route | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
patch: | |
summary: Update Route | |
tags: | |
- Route Object | |
parameters: | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: route | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
put: | |
summary: Create Or Update Route | |
tags: | |
- Route Object | |
parameters: | |
- name: service | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
- name: route | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/route' | |
201: | |
description: '' | |
/snis: | |
post: | |
summary: Create SNI | |
tags: | |
- SNI Object | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/sni' | |
responses: | |
201: | |
description: '' | |
get: | |
summary: List All SNI | |
tags: | |
- SNI Object | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/sni_list' | |
/snis/{sni}: | |
get: | |
summary: List All SNI | |
tags: | |
- SNI Object | |
parameters: | |
- name: sni | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/sni' | |
patch: | |
summary: Create SNI | |
tags: | |
- SNI Object | |
parameters: | |
- name: sni | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/sni' | |
responses: | |
201: | |
description: '' | |
put: | |
summary: Create SNI | |
tags: | |
- SNI Object | |
parameters: | |
- name: sni | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
requestBody: | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/sni' | |
responses: | |
201: | |
description: '' | |
delete: | |
summary: Create SNI | |
tags: | |
- SNI Object | |
parameters: | |
- name: sni | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
204: | |
description: '' | |
/status: | |
get: | |
summary: Retrieve Node Status | |
tags: | |
- Health Routes | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
database: | |
type: object | |
properties: | |
reachable: | |
type: boolean | |
memory: | |
type: object | |
properties: | |
workers_lua_vms: | |
type: array | |
items: | |
type: object | |
properties: | |
http_allocated_gc: | |
type: string | |
pid: | |
type: integer | |
lua_shared_dicts: | |
type: object | |
additionalProperties: | |
type: object | |
properties: | |
allocated_slabs: | |
type: string | |
capacity: | |
type: string | |
server: | |
type: object | |
properties: | |
connections_writing: | |
type: integer | |
total_requests: | |
type: integer | |
connections_handled: | |
type: integer | |
connections_accepted: | |
type: integer | |
connections_reading: | |
type: integer | |
connections_active: | |
type: integer | |
connections_waiting: | |
type: integer | |
/tags: | |
get: | |
summary: Returns a paginated list of all the tags in the system. | |
tags: | |
- Tags | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
next: | |
type: string | |
nullable: true | |
offset: | |
type: string | |
format: uuid | |
data: | |
type: array | |
items: | |
type: object | |
properties: | |
entity_id: | |
type: string | |
format: uuid | |
entity_name: | |
type: string | |
tag: | |
type: string | |
/tags/{tag_id}: | |
get: | |
summary: Returns the entities that have been tagged with the specified tag. | |
tags: | |
- Tags | |
parameters: | |
- name: tag_id | |
in: path | |
required: true | |
schema: | |
type: string | |
format: uuid | |
responses: | |
200: | |
description: '' | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
next: | |
type: string | |
nullable: true | |
offset: | |
type: string | |
format: uuid | |
data: | |
type: array | |
items: | |
type: object | |
properties: | |
entity_id: | |
type: string | |
format: uuid | |
entity_name: | |
type: string | |
tag: | |
type: string | |
# /targets: null | |
# /targets/{targets}: null | |
# /targets/{targets}/upstream: null | |
# /upstreams: null | |
# /upstreams/{upstreams}: null | |
# /upstreams/{upstreams}/health: null | |
# /upstreams/{upstreams}/targets: null | |
# /upstreams/{upstreams}/targets/all: null | |
# /upstreams/{upstreams}/targets/{targets}: null | |
# /upstreams/{upstreams}/targets/{targets}/healthy: null | |
# /upstreams/{upstreams}/targets/{targets}/unhealthy: null | |
# /upstreams/{upstreams}/targets/{targets}/{address}/healthy: null | |
# /upstreams/{upstreams}/targets/{targets}/{address}/unhealthy: null | |
components: | |
responses: | |
return_service: | |
description: '' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/service' | |
schemas: | |
service_list: | |
type: object | |
properties: | |
next: | |
type: string | |
data: | |
type: array | |
items: | |
$ref: '#/components/schemas/service' | |
service: | |
type: object | |
required: | |
- protocol | |
- host | |
- port | |
properties: | |
id: | |
type: string | |
format: uuid | |
created_at: | |
type: integer | |
format: timestamp | |
updated_at: | |
type: integer | |
format: timestamp | |
name: | |
description: The Service name. | |
type: string | |
retries: | |
description: The number of retries to execute upon failure to proxy. | |
type: integer | |
default: 5 | |
protocol: | |
description: The protocol used to communicate with the upstream. | |
type: string | |
default: 'http' | |
enum: | |
- 'grps' | |
- 'grpcs' | |
- 'http' | |
- 'https' | |
- 'tcp' | |
- 'tls' | |
host: | |
description: The host of the upstream server. | |
type: string | |
port: | |
description: The upstream server port. | |
type: integer | |
path: | |
description: The path to be used in requests to the upstream server. | |
type: string | |
connect_timeout: | |
description: The timeout in milliseconds for establishing a connection to the upstream server | |
type: integer | |
default: 60000 | |
write_timeout: | |
description: The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server. | |
type: integer | |
default: 60000 | |
read_timeout: | |
description: The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server. | |
type: integer | |
default: 60000 | |
tags: | |
description: An optional set of strings associated with the Service, for grouping and filtering. | |
type: array | |
items: | |
type: string | |
client_certificate: | |
description: Certificate to be used as client certificate while TLS handshaking to the upstream server. | |
type: object | |
properties: | |
id: | |
type: string | |
route_list: | |
type: object | |
properties: | |
next: | |
type: string | |
data: | |
type: array | |
items: | |
$ref: '#/components/schemas/route' | |
route: | |
type: object | |
required: | |
- protocols | |
properties: | |
id: | |
type: string | |
format: uuid | |
created_at: | |
type: integer | |
format: timestamp | |
updated_at: | |
type: integer | |
format: timestamp | |
name: | |
description: The name of the Route. | |
type: string | |
protocols: | |
description: A list of the protocols this Route should allow. When set to ["https"], HTTP requests are answered with a request to upgrade to HTTPS. | |
type: array | |
items: | |
type: string | |
enum: | |
- 'http' | |
- 'https' | |
- 'tcp' | |
- 'tls' | |
- 'grpc' | |
- 'grpcs' | |
default: | |
- 'http' | |
- 'https' | |
methods: | |
description: A list of HTTP methods that match this Route. | |
type: array | |
items: | |
type: string | |
pattern: '^%u+$' | |
hosts: | |
description: A list of domain names that match this Route. | |
type: array | |
items: | |
type: string | |
paths: | |
description: A list of paths that match this Route. | |
type: array | |
items: | |
type: string | |
headers: | |
description: One or more lists of values indexed by header name that will cause this Route to match if present in the request. The Host header cannot be used with this attribute. hosts should be specified using the hosts attribute. | |
type: object | |
additionalProperties: | |
type: array | |
items: | |
type: string | |
https_redirect_status_code: | |
description: The status code Kong responds with when all properties of a Route match except the protocol i.e. if the protocol of the request is HTTP instead of HTTPS. Location header is injected by Kong if the field is set to 301, 302, 307 or 308. | |
default: 426 | |
enum: | |
- 426 | |
- 301 | |
- 302 | |
- 307 | |
- 308 | |
regex_priority: | |
description: A number used to choose which route resolves a given request when several routes match it using regexes simultaneously. When two routes match the path and have the same regex_priority, the older one (lowest created_at) is used. Note that the priority for non-regex routes is different (longer non-regex routes are matched before shorter ones). Defaults to 0. | |
type: integer | |
default: 0 | |
strip_path: | |
description: When matching a Route via one of the paths, strip the matching prefix from the upstream request URL. | |
default: true | |
type: boolean | |
path_handling: | |
description: Controls how the Service path, Route path and requested path are combined when sending a request to the upstream. See above for a detailed description of each behavior. | |
type: string | |
enum: | |
- v0 | |
- v1 | |
default: v0 | |
preserve_host: | |
description: When matching a Route via one of the hosts domain names, use the request Host header in the upstream request headers. If set to false, the upstream Host header will be that of the Service’s host. | |
type: boolean | |
default: false | |
snis: | |
description: A list of SNIs that match this Route when using stream routing. | |
type: array | |
items: | |
type: string | |
sources: | |
description: A list of IP sources of incoming connections that match this Route when using stream routing. Each entry is an object with fields “ip” (optionally in CIDR range notation) and/or “port”. | |
type: array | |
items: | |
type: object | |
required: | |
- ip | |
properties: | |
ip: | |
type: string | |
port: | |
type: integer | |
minimum: 0 | |
maximum: 65535 | |
destinations: | |
description: A list of IP destinations of incoming connections that match this Route when using stream routing. Each entry is an object with fields “ip” (optionally in CIDR range notation) and/or “port”. | |
type: array | |
items: | |
type: object | |
required: | |
- ip | |
properties: | |
ip: | |
type: string | |
port: | |
type: integer | |
minimum: 0 | |
maximum: 65535 | |
tags: | |
description: An optional set of strings associated with the Route, for grouping and filtering. | |
type: array | |
items: | |
type: string | |
pattern: '^[%w%.%-%_~]+$' | |
service: | |
description: The Service this Route is associated to. This is where the Route proxies traffic to. With form-encoded, the notation is service.id=<service id> or service.name=<service name>. With JSON, use “"service":{"id":"<service id>"} or "service":{"name":"<service name>"} | |
type: object | |
properties: | |
id: | |
type: string | |
format: uuid | |
consumer_list: | |
type: object | |
properties: | |
next: | |
type: string | |
data: | |
type: array | |
items: | |
$ref: '#/components/schemas/consumer' | |
consumer: | |
type: object | |
properties: | |
id: | |
type: string | |
format: uuid | |
created_at: | |
type: integer | |
format: timestamp | |
username: | |
description: The unique username of the consumer. You must send either this field or custom_id with the request. | |
type: string | |
custom_id: | |
description: Field for storing an existing unique ID for the consumer - useful for mapping Kong with users in your existing database. You must send either this field or username with the request. | |
type: string | |
tags: | |
description: An optional set of strings associated with the Consumer, for grouping and filtering | |
type: array | |
items: | |
type: string | |
plugin_list: | |
type: object | |
properties: | |
next: | |
type: string | |
data: | |
type: array | |
items: | |
$ref: '#/components/schemas/plugin' | |
plugin: | |
type: object | |
required: | |
- name | |
- protocols | |
properties: | |
id: | |
type: string | |
format: uuid | |
name: | |
description: The name of the Plugin that’s going to be added. Currently the Plugin must be installed in every Kong instance separately. | |
type: string | |
created_at: | |
type: integer | |
format: timestamp | |
route: | |
description: If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the Route being used. | |
type: object | |
properties: | |
id: | |
type: string | |
format: uuid | |
service: | |
description: If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched. | |
type: object | |
properties: | |
id: | |
type: string | |
format: uuid | |
consumer: | |
description: If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated consumer. | |
type: object | |
properties: | |
id: | |
type: string | |
format: uuid | |
config: | |
description: The configuration properties for the Plugin which can be found on the plugins documentation page in the Kong Hub. | |
type: object | |
additionalProperties: true | |
protocols: | |
description: A list of the request protocols that will trigger this plugin. The default value, as well as the possible values allowed on this field, may change depending on the plugin type. For example, plugins that only work in stream mode will only support "tcp" and "tls". | |
type: array | |
default: | |
- 'grpc' | |
- 'grpcs' | |
- 'http' | |
- 'https' | |
items: | |
type: string | |
enum: | |
- 'grps' | |
- 'grpcs' | |
- 'http' | |
- 'https' | |
- 'tcp' | |
- 'tls' | |
enabled: | |
description: Whether the plugin is applied. | |
type: boolean | |
default: true | |
tags: | |
description: An optional set of strings associated with the Plugin, for grouping and filtering. | |
type: array | |
items: | |
type: string | |
certificate_list: | |
type: object | |
properties: | |
next: | |
type: string | |
data: | |
type: array | |
items: | |
$ref: '#/components/schemas/certificate' | |
certificate: | |
type: object | |
required: | |
- cert | |
- key | |
properties: | |
id: | |
type: string | |
format: uuid | |
created_at: | |
type: integer | |
format: timestamp | |
cert: | |
description: PEM-encoded public certificate chain of the SSL key pair. | |
type: string | |
key: | |
description: PEM-encoded private key of the SSL key pair. | |
type: string | |
tags: | |
description: An optional set of strings associated with the Certificate, for grouping and filtering. | |
type: array | |
items: | |
type: string | |
ca_certificate_list: | |
type: object | |
properties: | |
next: | |
type: string | |
data: | |
type: array | |
items: | |
$ref: '#/components/schemas/ca_certificate' | |
ca_certificate: | |
type: object | |
required: | |
- cert | |
properties: | |
id: | |
type: string | |
format: uuid | |
created_at: | |
type: integer | |
format: timestamp | |
cert: | |
type: string | |
tags: | |
type: array | |
items: | |
type: string | |
sni_list: | |
type: object | |
properties: | |
next: | |
type: string | |
data: | |
type: array | |
items: | |
$ref: '#/components/schemas/sni' | |
sni: | |
type: object | |
required: | |
- name | |
- certificate | |
properties: | |
id: | |
type: string | |
format: uuid | |
created_at: | |
type: integer | |
format: timestamp | |
name: | |
type: string | |
tags: | |
type: array | |
items: | |
type: string | |
certificate: | |
type: object | |
properties: | |
id: | |
type: string | |
format: uuid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment