mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-28 05:46:36 +08:00
3790 lines
119 KiB
Go
3790 lines
119 KiB
Go
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
|
package docs
|
|
|
|
import "github.com/swaggo/swag"
|
|
|
|
const docTemplate = `{
|
|
"schemes": {{ marshal .Schemes }},
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "{{escape .Description}}",
|
|
"title": "{{.Title}}",
|
|
"contact": {},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "{{.BasePath}}",
|
|
"paths": {
|
|
"/api/access-logs/": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"AccessLogs"
|
|
],
|
|
"summary": "List access logs",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Node ID",
|
|
"name": "node_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Remote address",
|
|
"name": "remote_addr",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Host",
|
|
"name": "host",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Path",
|
|
"name": "path",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Page index",
|
|
"name": "p",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Sort by",
|
|
"name": "sort_by",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Sort order",
|
|
"name": "sort_order",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/access-logs/cleanup": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"AccessLogs"
|
|
],
|
|
"summary": "Cleanup access logs by retention days",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/access-logs/folds": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"AccessLogs"
|
|
],
|
|
"summary": "List folded access logs",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Node ID",
|
|
"name": "node_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Remote address",
|
|
"name": "remote_addr",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Host",
|
|
"name": "host",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Path",
|
|
"name": "path",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Page index",
|
|
"name": "p",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Sort by",
|
|
"name": "sort_by",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Sort order",
|
|
"name": "sort_order",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Fold minutes",
|
|
"name": "fold_minutes",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/access-logs/folds/ip-summary": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"AccessLogs"
|
|
],
|
|
"summary": "List folded access log IP summaries",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Node ID",
|
|
"name": "node_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Remote address",
|
|
"name": "remote_addr",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Host",
|
|
"name": "host",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Path",
|
|
"name": "path",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Bucket started at",
|
|
"name": "bucket_started_at",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Fold minutes",
|
|
"name": "fold_minutes",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Page index",
|
|
"name": "p",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Sort by",
|
|
"name": "sort_by",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Sort order",
|
|
"name": "sort_order",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/access-logs/ip-summary": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"AccessLogs"
|
|
],
|
|
"summary": "List access log IP summaries",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Node ID",
|
|
"name": "node_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Remote address",
|
|
"name": "remote_addr",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Host",
|
|
"name": "host",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Page index",
|
|
"name": "p",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Sort by",
|
|
"name": "sort_by",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Sort order",
|
|
"name": "sort_order",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/access-logs/ip-summary/trend": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"AccessLogs"
|
|
],
|
|
"summary": "Get access log IP trend",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Node ID",
|
|
"name": "node_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Remote address",
|
|
"name": "remote_addr",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Host",
|
|
"name": "host",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Hours",
|
|
"name": "hours",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Bucket minutes",
|
|
"name": "bucket_minutes",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/acme-accounts/default": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"AcmeAccounts"
|
|
],
|
|
"summary": "Get default ACME account",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/agent/apply-logs": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"AccessTokenAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Agent"
|
|
],
|
|
"summary": "Report agent apply result",
|
|
"parameters": [
|
|
{
|
|
"description": "Apply log payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.ApplyLogPayload"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/agent/config-versions/active": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"AccessTokenAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Agent"
|
|
],
|
|
"summary": "Get active config for agent",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/agent/nodes/heartbeat": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"AccessTokenAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Agent"
|
|
],
|
|
"summary": "Report agent heartbeat",
|
|
"parameters": [
|
|
{
|
|
"description": "Agent heartbeat payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.AgentNodePayload"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/agent/nodes/register": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"AccessTokenAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Agent"
|
|
],
|
|
"summary": "Register or discover agent node",
|
|
"parameters": [
|
|
{
|
|
"description": "Agent node payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.AgentNodePayload"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/agent/waf/ip-groups/sync": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"AccessTokenAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Agent"
|
|
],
|
|
"summary": "Sync WAF IP groups for agent",
|
|
"parameters": [
|
|
{
|
|
"description": "WAF IP group sync payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.AgentWAFIPGroupSyncInput"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/agent/ws": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"AccessTokenAuth": []
|
|
}
|
|
],
|
|
"tags": [
|
|
"Agent"
|
|
],
|
|
"summary": "Upgrade agent connection to websocket",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/apply-logs/": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ApplyLogs"
|
|
],
|
|
"summary": "List apply logs",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Node ID",
|
|
"name": "node_id",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/apply-logs/cleanup": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ApplyLogs"
|
|
],
|
|
"summary": "Cleanup apply logs",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/config-versions/": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ConfigVersions"
|
|
],
|
|
"summary": "List config versions",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/config-versions/active": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ConfigVersions"
|
|
],
|
|
"summary": "Get active config version",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/config-versions/cleanup": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ConfigVersions"
|
|
],
|
|
"summary": "Cleanup old config versions",
|
|
"parameters": [
|
|
{
|
|
"description": "Cleanup request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.CleanupConfigVersionRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/config-versions/diff": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ConfigVersions"
|
|
],
|
|
"summary": "Diff current draft against active version",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/config-versions/preview": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ConfigVersions"
|
|
],
|
|
"summary": "Preview config rendering",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/config-versions/publish": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ConfigVersions"
|
|
],
|
|
"summary": "Publish a new config version",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/config-versions/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ConfigVersions"
|
|
],
|
|
"summary": "Get config version detail",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Version ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/config-versions/{id}/activate": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ConfigVersions"
|
|
],
|
|
"summary": "Activate an existing config version",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Version ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/dashboard/overview": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Dashboard"
|
|
],
|
|
"summary": "Get dashboard overview",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/dns-accounts/": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"DnsAccounts"
|
|
],
|
|
"summary": "List DNS accounts",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"DnsAccounts"
|
|
],
|
|
"summary": "Create DNS account",
|
|
"parameters": [
|
|
{
|
|
"description": "DNS account payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.DnsAccountInput"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/dns-accounts/{id}/delete": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"DnsAccounts"
|
|
],
|
|
"summary": "Delete DNS account",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "DNS Account ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/dns-accounts/{id}/update": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"DnsAccounts"
|
|
],
|
|
"summary": "Update DNS account",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "DNS Account ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "DNS account payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.DnsAccountInput"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/flared/apply-log": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"TunnelTokenAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Flared"
|
|
],
|
|
"summary": "Report OpenFlared apply result",
|
|
"parameters": [
|
|
{
|
|
"description": "Apply log payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.ApplyLogPayload"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/flared/config/active": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"TunnelTokenAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Flared"
|
|
],
|
|
"summary": "Get active tunnel config for OpenFlared",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/flared/heartbeat": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"TunnelTokenAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Flared"
|
|
],
|
|
"summary": "Report OpenFlared heartbeat",
|
|
"parameters": [
|
|
{
|
|
"description": "Flared heartbeat payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.FlaredHeartbeatPayload"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/flared/ws": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"TunnelTokenAuth": []
|
|
}
|
|
],
|
|
"tags": [
|
|
"Flared"
|
|
],
|
|
"summary": "Upgrade OpenFlared connection to websocket",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/managed-domains/": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ManagedDomains"
|
|
],
|
|
"summary": "List managed domains",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ManagedDomains"
|
|
],
|
|
"summary": "Create managed domain",
|
|
"parameters": [
|
|
{
|
|
"description": "Managed domain payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.ManagedDomainInput"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/managed-domains/match": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ManagedDomains"
|
|
],
|
|
"summary": "Match certificate for domain",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Domain",
|
|
"name": "domain",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/managed-domains/{id}/delete": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ManagedDomains"
|
|
],
|
|
"summary": "Delete managed domain",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Managed domain ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/managed-domains/{id}/update": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ManagedDomains"
|
|
],
|
|
"summary": "Update managed domain",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Managed domain ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Managed domain payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.ManagedDomainInput"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/nodes/": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Nodes"
|
|
],
|
|
"summary": "List nodes",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Nodes"
|
|
],
|
|
"summary": "Create node",
|
|
"parameters": [
|
|
{
|
|
"description": "Node payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.NodeInput"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/nodes/bootstrap-token": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Nodes"
|
|
],
|
|
"summary": "Get global discovery token",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/nodes/bootstrap-token/rotate": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Nodes"
|
|
],
|
|
"summary": "Rotate global discovery token",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/nodes/{id}/agent-release": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Nodes"
|
|
],
|
|
"summary": "Check latest agent release for node",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Node ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "stable or preview",
|
|
"name": "channel",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/nodes/{id}/agent-update": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Nodes"
|
|
],
|
|
"summary": "Request agent self-update on node",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Node ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/nodes/{id}/delete": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Nodes"
|
|
],
|
|
"summary": "Delete node",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Node ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/nodes/{id}/force-sync": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Nodes"
|
|
],
|
|
"summary": "Request force sync config on node",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Node ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/nodes/{id}/observability": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Nodes"
|
|
],
|
|
"summary": "Get node observability details",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Node ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Lookback window in hours",
|
|
"name": "hours",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "Max records per section",
|
|
"name": "limit",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/nodes/{id}/observability/cleanup": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Nodes"
|
|
],
|
|
"summary": "Cleanup node health events",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Node ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/nodes/{id}/openresty-restart": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Nodes"
|
|
],
|
|
"summary": "Request openresty restart on node",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Node ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/nodes/{id}/update": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Nodes"
|
|
],
|
|
"summary": "Update node",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Node ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Node payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.NodeInput"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/option/": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Options"
|
|
],
|
|
"summary": "List editable options",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/option/database/cleanup": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Options"
|
|
],
|
|
"summary": "Cleanup observability tables",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/option/geoip/lookup": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Options"
|
|
],
|
|
"summary": "Test GeoIP lookup",
|
|
"parameters": [
|
|
{
|
|
"description": "GeoIP lookup payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.geoIPLookupRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/option/update": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Options"
|
|
],
|
|
"summary": "Update option",
|
|
"parameters": [
|
|
{
|
|
"description": "Option payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Option"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/option/update-batch": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Options"
|
|
],
|
|
"summary": "Batch update options",
|
|
"parameters": [
|
|
{
|
|
"description": "Batch option payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.optionBatchPayload"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/proxy-routes/": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ProxyRoutes"
|
|
],
|
|
"summary": "List proxy routes",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ProxyRoutes"
|
|
],
|
|
"summary": "Create proxy route",
|
|
"parameters": [
|
|
{
|
|
"description": "Proxy route payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.ProxyRouteInput"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/proxy-routes/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ProxyRoutes"
|
|
],
|
|
"summary": "Get proxy route detail",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Route ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/proxy-routes/{id}/delete": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ProxyRoutes"
|
|
],
|
|
"summary": "Delete proxy route",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Route ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/proxy-routes/{id}/update": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ProxyRoutes"
|
|
],
|
|
"summary": "Update proxy route",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Route ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Proxy route payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.ProxyRouteInput"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/relay/heartbeat": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"AccessTokenAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Relay"
|
|
],
|
|
"summary": "Report relay heartbeat",
|
|
"parameters": [
|
|
{
|
|
"description": "Relay heartbeat payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.RelayHeartbeatPayload"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/relay/ws": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"AccessTokenAuth": []
|
|
}
|
|
],
|
|
"tags": [
|
|
"Relay"
|
|
],
|
|
"summary": "Upgrade relay connection to websocket",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/status": {
|
|
"get": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Public"
|
|
],
|
|
"summary": "Get server status",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/tls-certificates/": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"TLSCertificates"
|
|
],
|
|
"summary": "List TLS certificates",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"TLSCertificates"
|
|
],
|
|
"summary": "Create TLS certificate from PEM",
|
|
"parameters": [
|
|
{
|
|
"description": "TLS certificate payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.TLSCertificateInput"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/tls-certificates/apply": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"TLSCertificates"
|
|
],
|
|
"summary": "Apply TLS certificate via ACME",
|
|
"parameters": [
|
|
{
|
|
"description": "TLS apply payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.TLSApplyInput"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/tls-certificates/import-file": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"TLSCertificates"
|
|
],
|
|
"summary": "Import TLS certificate from files",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Certificate name",
|
|
"name": "name",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Remark",
|
|
"name": "remark",
|
|
"in": "formData"
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Certificate file",
|
|
"name": "cert_file",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "Private key file",
|
|
"name": "key_file",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/tls-certificates/{id}": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"TLSCertificates"
|
|
],
|
|
"summary": "Get TLS certificate detail",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Certificate ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/tls-certificates/{id}/content": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"TLSCertificates"
|
|
],
|
|
"summary": "Get TLS certificate PEM content",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Certificate ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/tls-certificates/{id}/convert-acme": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"TLSCertificates"
|
|
],
|
|
"summary": "Convert uploaded TLS certificate to ACME managed certificate",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Certificate ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "TLS apply payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.TLSApplyInput"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/tls-certificates/{id}/delete": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"TLSCertificates"
|
|
],
|
|
"summary": "Delete TLS certificate",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Certificate ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/tls-certificates/{id}/renew": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"TLSCertificates"
|
|
],
|
|
"summary": "Renew TLS certificate",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Certificate ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/tls-certificates/{id}/update": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"TLSCertificates"
|
|
],
|
|
"summary": "Update TLS certificate from PEM",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Certificate ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "TLS certificate payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.TLSCertificateInput"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/tls-certificates/{id}/update-acme": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"TLSCertificates"
|
|
],
|
|
"summary": "Update ACME TLS certificate",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Certificate ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "TLS apply payload",
|
|
"name": "payload",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/service.TLSApplyInput"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/update/latest-release": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Update"
|
|
],
|
|
"summary": "Get latest GitHub release",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/update/logs/ws": {
|
|
"get": {
|
|
"tags": [
|
|
"Update"
|
|
],
|
|
"summary": "Stream server upgrade logs over websocket",
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/update/manual-upgrade": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Update"
|
|
],
|
|
"summary": "Confirm upgrade with previously uploaded server binary",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/update/manual-upload": {
|
|
"post": {
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Update"
|
|
],
|
|
"summary": "Upload server binary and inspect version before upgrade",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/update/upgrade": {
|
|
"post": {
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Update"
|
|
],
|
|
"summary": "Upgrade server binary from latest GitHub release",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"controller.CleanupConfigVersionRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"keep_count"
|
|
],
|
|
"properties": {
|
|
"keep_count": {
|
|
"type": "integer",
|
|
"minimum": 3
|
|
}
|
|
}
|
|
},
|
|
"controller.DnsAccountInput": {
|
|
"type": "object",
|
|
"properties": {
|
|
"authorization": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"controller.geoIPLookupRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"provider": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"controller.optionBatchPayload": {
|
|
"type": "object",
|
|
"properties": {
|
|
"options": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Option"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"model.Option": {
|
|
"type": "object",
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"service.AgentBufferedObservabilityRecord": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_logs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/service.AgentNodeAccessLog"
|
|
}
|
|
},
|
|
"openresty_observation": {
|
|
"$ref": "#/definitions/service.AgentNodeOpenrestyObservation"
|
|
},
|
|
"snapshot": {
|
|
"$ref": "#/definitions/service.AgentNodeMetricSnapshot"
|
|
},
|
|
"traffic_report": {
|
|
"$ref": "#/definitions/service.AgentNodeTrafficReport"
|
|
},
|
|
"window_started_at_unix": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"service.AgentNodeAccessLog": {
|
|
"type": "object",
|
|
"properties": {
|
|
"host": {
|
|
"type": "string"
|
|
},
|
|
"logged_at_unix": {
|
|
"type": "integer"
|
|
},
|
|
"path": {
|
|
"type": "string"
|
|
},
|
|
"remote_addr": {
|
|
"type": "string"
|
|
},
|
|
"status_code": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"service.AgentNodeHealthEvent": {
|
|
"type": "object",
|
|
"properties": {
|
|
"event_type": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"metadata": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"severity": {
|
|
"type": "string"
|
|
},
|
|
"triggered_at_unix": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"service.AgentNodeMetricSnapshot": {
|
|
"type": "object",
|
|
"properties": {
|
|
"captured_at_unix": {
|
|
"type": "integer"
|
|
},
|
|
"cpu_usage_percent": {
|
|
"type": "number"
|
|
},
|
|
"disk_read_bytes": {
|
|
"type": "integer"
|
|
},
|
|
"disk_write_bytes": {
|
|
"type": "integer"
|
|
},
|
|
"memory_total_bytes": {
|
|
"type": "integer"
|
|
},
|
|
"memory_used_bytes": {
|
|
"type": "integer"
|
|
},
|
|
"network_rx_bytes": {
|
|
"type": "integer"
|
|
},
|
|
"network_tx_bytes": {
|
|
"type": "integer"
|
|
},
|
|
"storage_total_bytes": {
|
|
"type": "integer"
|
|
},
|
|
"storage_used_bytes": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"service.AgentNodeOpenrestyObservation": {
|
|
"type": "object",
|
|
"properties": {
|
|
"captured_at_unix": {
|
|
"type": "integer"
|
|
},
|
|
"openresty_connections": {
|
|
"type": "integer"
|
|
},
|
|
"openresty_rx_bytes": {
|
|
"type": "integer"
|
|
},
|
|
"openresty_tx_bytes": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"service.AgentNodePayload": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_logs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/service.AgentNodeAccessLog"
|
|
}
|
|
},
|
|
"buffered_observability": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/service.AgentBufferedObservabilityRecord"
|
|
}
|
|
},
|
|
"current_version": {
|
|
"type": "string"
|
|
},
|
|
"ext_version": {
|
|
"type": "string"
|
|
},
|
|
"health_events": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/service.AgentNodeHealthEvent"
|
|
}
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"last_error": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"node_id": {
|
|
"type": "string"
|
|
},
|
|
"openresty_message": {
|
|
"type": "string"
|
|
},
|
|
"openresty_observation": {
|
|
"$ref": "#/definitions/service.AgentNodeOpenrestyObservation"
|
|
},
|
|
"openresty_status": {
|
|
"type": "string"
|
|
},
|
|
"profile": {
|
|
"$ref": "#/definitions/service.AgentNodeSystemProfile"
|
|
},
|
|
"snapshot": {
|
|
"$ref": "#/definitions/service.AgentNodeMetricSnapshot"
|
|
},
|
|
"traffic_report": {
|
|
"$ref": "#/definitions/service.AgentNodeTrafficReport"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
},
|
|
"waf_ip_group_checksums": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"service.AgentNodeSystemProfile": {
|
|
"type": "object",
|
|
"properties": {
|
|
"architecture": {
|
|
"type": "string"
|
|
},
|
|
"cpu_cores": {
|
|
"type": "integer"
|
|
},
|
|
"cpu_model": {
|
|
"type": "string"
|
|
},
|
|
"hostname": {
|
|
"type": "string"
|
|
},
|
|
"kernel_version": {
|
|
"type": "string"
|
|
},
|
|
"os_name": {
|
|
"type": "string"
|
|
},
|
|
"os_version": {
|
|
"type": "string"
|
|
},
|
|
"reported_at_unix": {
|
|
"type": "integer"
|
|
},
|
|
"total_disk_bytes": {
|
|
"type": "integer"
|
|
},
|
|
"total_memory_bytes": {
|
|
"type": "integer"
|
|
},
|
|
"uptime_seconds": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"service.AgentNodeTrafficReport": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error_count": {
|
|
"type": "integer"
|
|
},
|
|
"request_count": {
|
|
"type": "integer"
|
|
},
|
|
"source_countries": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"status_codes": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"top_domains": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"unique_visitor_count": {
|
|
"type": "integer"
|
|
},
|
|
"window_ended_at_unix": {
|
|
"type": "integer"
|
|
},
|
|
"window_started_at_unix": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"service.AgentWAFIPGroupSyncInput": {
|
|
"type": "object",
|
|
"properties": {
|
|
"checksums": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"service.ApplyLogPayload": {
|
|
"type": "object",
|
|
"properties": {
|
|
"checksum": {
|
|
"type": "string"
|
|
},
|
|
"main_config_checksum": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"node_id": {
|
|
"type": "string"
|
|
},
|
|
"result": {
|
|
"type": "string"
|
|
},
|
|
"route_config_checksum": {
|
|
"type": "string"
|
|
},
|
|
"support_file_count": {
|
|
"type": "integer"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"service.FlaredConnectedRelay": {
|
|
"type": "object",
|
|
"properties": {
|
|
"proxy_count": {
|
|
"type": "integer"
|
|
},
|
|
"relay_node_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"service.FlaredHeartbeatPayload": {
|
|
"type": "object",
|
|
"properties": {
|
|
"client_version": {
|
|
"type": "string"
|
|
},
|
|
"connected_relays": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/service.FlaredConnectedRelay"
|
|
}
|
|
},
|
|
"current_checksum": {
|
|
"type": "string"
|
|
},
|
|
"current_version": {
|
|
"type": "string"
|
|
},
|
|
"frp_version": {
|
|
"type": "string"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"tunnel_status": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"service.ManagedDomainInput": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cert_id": {
|
|
"type": "integer"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"remark": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"service.NodeInput": {
|
|
"type": "object",
|
|
"properties": {
|
|
"auto_update_enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"geo_latitude": {
|
|
"type": "number"
|
|
},
|
|
"geo_longitude": {
|
|
"type": "number"
|
|
},
|
|
"geo_manual_override": {
|
|
"type": "boolean"
|
|
},
|
|
"geo_name": {
|
|
"type": "string"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"ip_manual_override": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"node_type": {
|
|
"description": "TunnelRelay fields",
|
|
"type": "string"
|
|
},
|
|
"relay_agent_access_addr": {
|
|
"type": "string"
|
|
},
|
|
"relay_bind_port": {
|
|
"type": "integer"
|
|
},
|
|
"relay_client_access_addr": {
|
|
"type": "string"
|
|
},
|
|
"relay_client_proxy_url": {
|
|
"type": "string"
|
|
},
|
|
"relay_vhost_http_port": {
|
|
"type": "integer"
|
|
},
|
|
"relay_web_server_enabled": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"service.ProxyRouteCustomHeaderInput": {
|
|
"type": "object",
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"service.ProxyRouteInput": {
|
|
"type": "object",
|
|
"properties": {
|
|
"basic_auth_enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"basic_auth_password": {
|
|
"type": "string"
|
|
},
|
|
"basic_auth_username": {
|
|
"type": "string"
|
|
},
|
|
"cache_enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"cache_policy": {
|
|
"type": "string"
|
|
},
|
|
"cache_rules": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"cert_id": {
|
|
"type": "integer"
|
|
},
|
|
"cert_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"custom_headers": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/service.ProxyRouteCustomHeaderInput"
|
|
}
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"domain_cert_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"domains": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"enable_https": {
|
|
"type": "boolean"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"limit_conn_per_ip": {
|
|
"type": "integer"
|
|
},
|
|
"limit_conn_per_server": {
|
|
"type": "integer"
|
|
},
|
|
"limit_rate": {
|
|
"type": "string"
|
|
},
|
|
"origin_address": {
|
|
"type": "string"
|
|
},
|
|
"origin_host": {
|
|
"type": "string"
|
|
},
|
|
"origin_id": {
|
|
"type": "integer"
|
|
},
|
|
"origin_port": {
|
|
"type": "string"
|
|
},
|
|
"origin_scheme": {
|
|
"type": "string"
|
|
},
|
|
"origin_uri": {
|
|
"type": "string"
|
|
},
|
|
"origin_url": {
|
|
"type": "string"
|
|
},
|
|
"pow_config": {
|
|
"type": "string"
|
|
},
|
|
"pow_enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"redirect_http": {
|
|
"type": "boolean"
|
|
},
|
|
"remark": {
|
|
"type": "string"
|
|
},
|
|
"site_name": {
|
|
"type": "string"
|
|
},
|
|
"tunnel_id": {
|
|
"type": "integer"
|
|
},
|
|
"tunnel_node_id": {
|
|
"type": "integer"
|
|
},
|
|
"tunnel_target_addr": {
|
|
"type": "string"
|
|
},
|
|
"tunnel_target_protocol": {
|
|
"type": "string"
|
|
},
|
|
"upstream_type": {
|
|
"type": "string"
|
|
},
|
|
"upstreams": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"service.RelayHeartbeatPayload": {
|
|
"type": "object",
|
|
"properties": {
|
|
"frp_version": {
|
|
"type": "string"
|
|
},
|
|
"frps_client_count": {
|
|
"type": "integer"
|
|
},
|
|
"frps_connections": {
|
|
"type": "integer"
|
|
},
|
|
"frps_proxies": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/service.RelayProxyStat"
|
|
}
|
|
},
|
|
"frps_proxy_count": {
|
|
"type": "integer"
|
|
},
|
|
"health_events": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/service.AgentNodeHealthEvent"
|
|
}
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"profile": {
|
|
"$ref": "#/definitions/service.AgentNodeSystemProfile"
|
|
},
|
|
"relay_status": {
|
|
"type": "string"
|
|
},
|
|
"snapshot": {
|
|
"$ref": "#/definitions/service.AgentNodeMetricSnapshot"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"service.RelayProxyStat": {
|
|
"type": "object",
|
|
"properties": {
|
|
"client_addr": {
|
|
"type": "string"
|
|
},
|
|
"client_version": {
|
|
"type": "string"
|
|
},
|
|
"last_close_time": {
|
|
"type": "string"
|
|
},
|
|
"last_start_time": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"service.TLSApplyInput": {
|
|
"type": "object",
|
|
"properties": {
|
|
"acme_account_id": {
|
|
"type": "integer"
|
|
},
|
|
"auto_renew": {
|
|
"type": "boolean"
|
|
},
|
|
"disable_cname": {
|
|
"type": "boolean"
|
|
},
|
|
"dns1": {
|
|
"type": "string"
|
|
},
|
|
"dns2": {
|
|
"type": "string"
|
|
},
|
|
"dns_account_id": {
|
|
"type": "integer"
|
|
},
|
|
"key_algorithm": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"other_domains": {
|
|
"type": "string"
|
|
},
|
|
"primary_domain": {
|
|
"type": "string"
|
|
},
|
|
"remark": {
|
|
"type": "string"
|
|
},
|
|
"skip_dns": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"service.TLSCertificateInput": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cert_pem": {
|
|
"type": "string"
|
|
},
|
|
"key_pem": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"remark": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"AccessTokenAuth": {
|
|
"description": "Agent API 使用节点专属 Agent Token 或全局 Discovery Token",
|
|
"type": "apiKey",
|
|
"name": "X-Agent-Token",
|
|
"in": "header"
|
|
},
|
|
"BearerAuth": {
|
|
"description": "管理端可使用 Bearer Token,例如:Bearer \u003ctoken\u003e",
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
}`
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
var SwaggerInfo = &swag.Spec{
|
|
Version: "3.0",
|
|
Host: "",
|
|
BasePath: "/",
|
|
Schemes: []string{"http", "https"},
|
|
Title: "OpenFlare Server API",
|
|
Description: "OpenFlare Server 管理端与 Agent API 文档。",
|
|
InfoInstanceName: "swagger",
|
|
SwaggerTemplate: docTemplate,
|
|
LeftDelim: "{{",
|
|
RightDelim: "}}",
|
|
}
|
|
|
|
func init() {
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
}
|