route/proto/route.swagger.json

359 lines
6.9 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "route.proto",
"version": "version not set"
},
"schemes": [
"http",
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/v1/backends": {
"get": {
"operationId": "List",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/routeBackendList"
}
}
},
"parameters": [
{
"name": "domain",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "user",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"Backends"
]
}
},
"/v1/backends/{id}/kill": {
"post": {
"operationId": "Kill",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/routeNil"
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Backends"
]
}
},
"/v1/routes": {
"get": {
"operationId": "GetAll",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/routeGetAllRoutesResponse"
}
}
},
"tags": [
"Routes"
]
},
"post": {
"operationId": "Put",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/routeIDResponse"
}
}
},
"tags": [
"Routes"
]
}
},
"/v1/routes/{host}": {
"get": {
"operationId": "Get",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/routeRoute"
}
}
},
"parameters": [
{
"name": "host",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Routes"
]
},
"delete": {
"operationId": "Delete",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/routeIDResponse"
}
}
},
"parameters": [
{
"name": "host",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"Routes"
]
}
},
"/v1/tokens": {
"get": {
"operationId": "GetAll",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/routeTokenSet"
}
}
},
"tags": [
"Tokens"
]
},
"delete": {
"operationId": "Delete",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/routeNil"
}
}
},
"tags": [
"Tokens"
]
},
"post": {
"operationId": "Put",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/routeToken"
}
}
},
"tags": [
"Tokens"
]
}
},
"/v1/tokens/deactivate": {
"post": {
"operationId": "Deactivate",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/routeNil"
}
}
},
"tags": [
"Tokens"
]
}
},
"/v1/tokens/one": {
"get": {
"operationId": "Get",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/routeToken"
}
}
},
"parameters": [
{
"name": "token",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "id",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"Tokens"
]
}
}
},
"definitions": {
"routeBackend": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"proto": {
"type": "string"
},
"user": {
"type": "string"
},
"domain": {
"type": "string"
},
"phi": {
"type": "number",
"format": "float"
},
"host": {
"type": "string"
}
}
},
"routeBackendList": {
"type": "object",
"properties": {
"bs": {
"$ref": "#/definitions/routeBackendSelector"
},
"backends": {
"type": "array",
"items": {
"$ref": "#/definitions/routeBackend"
}
}
}
},
"routeBackendSelector": {
"type": "object",
"properties": {
"domain": {
"type": "string"
},
"user": {
"type": "string"
}
}
},
"routeGetAllRoutesResponse": {
"type": "object",
"properties": {
"routes": {
"type": "array",
"items": {
"$ref": "#/definitions/routeRoute"
}
}
}
},
"routeIDResponse": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
},
"routeNil": {
"type": "object"
},
"routeRoute": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"creator": {
"type": "string"
},
"host": {
"type": "string"
}
}
},
"routeToken": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"body": {
"type": "string"
},
"scopes": {
"type": "array",
"items": {
"type": "string"
}
},
"active": {
"type": "boolean",
"format": "boolean"
}
}
},
"routeTokenSet": {
"type": "object",
"properties": {
"tokens": {
"type": "array",
"items": {
"$ref": "#/definitions/routeToken"
}
}
}
}
}
}