Remove /v1/about cluster API endpoint

This commit is contained in:
Ingo Oppermann
2024-04-09 15:56:40 +02:00
parent 487529c598
commit 3b11c84545
7 changed files with 817 additions and 197 deletions

View File

@@ -96,7 +96,6 @@ func NewAPI(config APIConfig) (API, error) {
doc.GET("", echoSwagger.EchoWrapHandler(echoSwagger.InstanceName("ClusterAPI"))) doc.GET("", echoSwagger.EchoWrapHandler(echoSwagger.InstanceName("ClusterAPI")))
a.router.GET("/", a.Version) a.router.GET("/", a.Version)
a.router.GET("/v1/about", a.About)
a.router.GET("/v1/barrier/:name", a.Barrier) a.router.GET("/v1/barrier/:name", a.Barrier)
@@ -155,24 +154,6 @@ func (a *api) Version(c echo.Context) error {
return c.JSON(http.StatusOK, Version.String()) return c.JSON(http.StatusOK, Version.String())
} }
// About returns info about the cluster
// @Summary Cluster info
// @Description Cluster info
// @Tags v1.0.0
// @ID cluster-1-about
// @Produce json
// @Success 200 {string} string
// @Success 500 {object} Error
// @Router /v1/about [get]
func (a *api) About(c echo.Context) error {
about, err := a.cluster.About()
if err != nil {
return Err(http.StatusInternalServerError, "", "%s", err.Error())
}
return c.JSON(http.StatusOK, about)
}
// Barrier returns if the barrier already has been passed // Barrier returns if the barrier already has been passed
// @Summary Has the barrier already has been passed // @Summary Has the barrier already has been passed
// @Description Has the barrier already has been passed // @Description Has the barrier already has been passed

View File

@@ -51,33 +51,6 @@ const docTemplateClusterAPI = `{
} }
} }
}, },
"/v1/about": {
"get": {
"description": "Cluster info",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Cluster info",
"operationId": "cluster-1-about",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/v1/barrier/{name}": { "/v1/barrier/{name}": {
"get": { "get": {
"description": "Has the barrier already has been passed", "description": "Has the barrier already has been passed",
@@ -1493,6 +1466,9 @@ const docTemplateClusterAPI = `{
"enable": { "enable": {
"type": "boolean" "type": "boolean"
}, },
"id": {
"type": "string"
},
"node_recover_timeout_sec": { "node_recover_timeout_sec": {
"description": "seconds", "description": "seconds",
"type": "integer", "type": "integer",

View File

@@ -43,33 +43,6 @@
} }
} }
}, },
"/v1/about": {
"get": {
"description": "Cluster info",
"produces": [
"application/json"
],
"tags": [
"v1.0.0"
],
"summary": "Cluster info",
"operationId": "cluster-1-about",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/cluster.Error"
}
}
}
}
},
"/v1/barrier/{name}": { "/v1/barrier/{name}": {
"get": { "get": {
"description": "Has the barrier already has been passed", "description": "Has the barrier already has been passed",
@@ -1485,6 +1458,9 @@
"enable": { "enable": {
"type": "boolean" "type": "boolean"
}, },
"id": {
"type": "string"
},
"node_recover_timeout_sec": { "node_recover_timeout_sec": {
"description": "seconds", "description": "seconds",
"type": "integer", "type": "integer",

View File

@@ -242,6 +242,8 @@ definitions:
type: integer type: integer
enable: enable:
type: boolean type: boolean
id:
type: string
node_recover_timeout_sec: node_recover_timeout_sec:
description: seconds description: seconds
format: int64 format: int64
@@ -882,24 +884,6 @@ paths:
summary: The cluster version summary: The cluster version
tags: tags:
- v1.0.0 - v1.0.0
/v1/about:
get:
description: Cluster info
operationId: cluster-1-about
produces:
- application/json
responses:
"200":
description: OK
schema:
type: string
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/cluster.Error'
summary: Cluster info
tags:
- v1.0.0
/v1/barrier/{name}: /v1/barrier/{name}:
get: get:
description: Has the barrier already has been passed description: Has the barrier already has been passed

View File

@@ -405,30 +405,6 @@ const docTemplate = `{
"name": "glob", "name": "glob",
"in": "query" "in": "query"
}, },
{
"type": "integer",
"description": "minimal size of files",
"name": "size_min",
"in": "query"
},
{
"type": "integer",
"description": "maximal size of files",
"name": "size_max",
"in": "query"
},
{
"type": "integer",
"description": "minimal last modification time",
"name": "lastmod_start",
"in": "query"
},
{
"type": "integer",
"description": "maximal last modification time",
"name": "lastmod_end",
"in": "query"
},
{ {
"type": "string", "type": "string",
"description": "none, name, size, lastmod", "description": "none, name, size, lastmod",
@@ -1009,14 +985,14 @@ const docTemplate = `{
"ApiKeyAuth": [] "ApiKeyAuth": []
} }
], ],
"description": "List the files of a proxy node by its ID", "description": "List the resources of a proxy node by its ID",
"produces": [ "produces": [
"application/json" "application/json"
], ],
"tags": [ "tags": [
"v16.?.?" "v16.?.?"
], ],
"summary": "List the files of a proxy node by its ID", "summary": "List the resources of a proxy node by its ID",
"operationId": "cluster-3-get-node-files", "operationId": "cluster-3-get-node-files",
"parameters": [ "parameters": [
{ {
@@ -1043,6 +1019,259 @@ const docTemplate = `{
} }
} }
}, },
"/api/v3/cluster/node/{id}/fs/{storage}": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "List all files on a filesystem on a node. The listing can be ordered by name, size, or date of last modification in ascending or descending order.",
"produces": [
"application/json"
],
"tags": [
"v16.?.?"
],
"summary": "List all files on a filesystem on a node",
"operationId": "cluster-3-node-fs-list-files",
"parameters": [
{
"type": "string",
"description": "Node ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Name of the filesystem",
"name": "storage",
"in": "path",
"required": true
},
{
"type": "string",
"description": "glob pattern for file names",
"name": "glob",
"in": "query"
},
{
"type": "string",
"description": "none, name, size, lastmod",
"name": "sort",
"in": "query"
},
{
"type": "string",
"description": "asc, desc",
"name": "order",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/api.FileInfo"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
}
},
"/api/v3/cluster/node/{id}/fs/{storage}/{filepath}": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Fetch a file from a filesystem on a node",
"produces": [
"application/data",
"application/json"
],
"tags": [
"v16.?.?"
],
"summary": "Fetch a file from a filesystem on a node",
"operationId": "cluster-3-node-fs-get-file",
"parameters": [
{
"type": "string",
"description": "Node ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Name of the filesystem",
"name": "storage",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Path to file",
"name": "filepath",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "file"
}
},
"301": {
"description": "Moved Permanently",
"schema": {
"type": "string"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Writes or overwrites a file on a filesystem on a node",
"consumes": [
"application/data"
],
"produces": [
"text/plain",
"application/json"
],
"tags": [
"v16.?.?"
],
"summary": "Add a file to a filesystem on a node",
"operationId": "cluster-3-node-fs-put-file",
"parameters": [
{
"type": "string",
"description": "Node ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Name of the filesystem",
"name": "storage",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Path to file",
"name": "filepath",
"in": "path",
"required": true
},
{
"description": "File data",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "integer"
}
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
},
"delete": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Remove a file from a filesystem on a node",
"produces": [
"text/plain"
],
"tags": [
"v16.?.?"
],
"summary": "Remove a file from a filesystem on a node",
"operationId": "cluster-3-node-fs-delete-file",
"parameters": [
{
"type": "string",
"description": "Node ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Name of the filesystem",
"name": "storage",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Path to file",
"name": "filepath",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
}
},
"/api/v3/cluster/node/{id}/process": { "/api/v3/cluster/node/{id}/process": {
"get": { "get": {
"security": [ "security": [
@@ -2338,8 +2567,8 @@ const docTemplate = `{
"type": "string" "type": "string"
} }
}, },
"507": { "400": {
"description": "Insufficient Storage", "description": "Bad Request",
"schema": { "schema": {
"$ref": "#/definitions/api.Error" "$ref": "#/definitions/api.Error"
} }
@@ -4646,9 +4875,6 @@ const docTemplate = `{
"api.ClusterAbout": { "api.ClusterAbout": {
"type": "object", "type": "object",
"properties": { "properties": {
"address": {
"type": "string"
},
"degraded": { "degraded": {
"type": "boolean" "type": "boolean"
}, },
@@ -4659,9 +4885,9 @@ const docTemplate = `{
"type": "string" "type": "string"
}, },
"leader": { "leader": {
"type": "boolean" "$ref": "#/definitions/api.ClusterAboutLeader"
}, },
"name": { "node_id": {
"type": "string" "type": "string"
}, },
"nodes": { "nodes": {
@@ -4670,14 +4896,37 @@ const docTemplate = `{
"$ref": "#/definitions/api.ClusterNode" "$ref": "#/definitions/api.ClusterNode"
} }
}, },
"public_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"raft": { "raft": {
"$ref": "#/definitions/api.ClusterRaft" "$ref": "#/definitions/api.ClusterRaft"
}, },
"status": {
"type": "string"
},
"version": { "version": {
"type": "string" "type": "string"
} }
} }
}, },
"api.ClusterAboutLeader": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"elected_seconds": {
"type": "integer"
},
"id": {
"type": "string"
}
}
},
"api.ClusterKVS": { "api.ClusterKVS": {
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
@@ -4773,6 +5022,9 @@ const docTemplate = `{
}, },
"status": { "status": {
"type": "string" "type": "string"
},
"version": {
"type": "string"
} }
} }
}, },
@@ -4986,6 +5238,9 @@ const docTemplate = `{
"enable": { "enable": {
"type": "boolean" "type": "boolean"
}, },
"id": {
"type": "string"
},
"node_recover_timeout_sec": { "node_recover_timeout_sec": {
"description": "seconds", "description": "seconds",
"type": "integer", "type": "integer",
@@ -5523,6 +5778,9 @@ const docTemplate = `{
"api.Event": { "api.Event": {
"type": "object", "type": "object",
"properties": { "properties": {
"caller": {
"type": "string"
},
"data": { "data": {
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
@@ -5547,6 +5805,9 @@ const docTemplate = `{
"api.EventFilter": { "api.EventFilter": {
"type": "object", "type": "object",
"properties": { "properties": {
"caller": {
"type": "string"
},
"data": { "data": {
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
@@ -5665,6 +5926,9 @@ const docTemplate = `{
"dst_name": { "dst_name": {
"type": "string" "type": "string"
}, },
"filter": {
"type": "string"
},
"format": { "format": {
"type": "string" "type": "string"
}, },
@@ -5680,6 +5944,9 @@ const docTemplate = `{
"layout": { "layout": {
"type": "string" "type": "string"
}, },
"name": {
"type": "string"
},
"outpad": { "outpad": {
"type": "string" "type": "string"
}, },
@@ -5687,12 +5954,6 @@ const docTemplate = `{
"description": "Hz", "description": "Hz",
"type": "integer" "type": "integer"
}, },
"src_filter": {
"type": "string"
},
"src_name": {
"type": "string"
},
"timebase": { "timebase": {
"type": "string" "type": "string"
}, },
@@ -7348,6 +7609,9 @@ const docTemplate = `{
"enable": { "enable": {
"type": "boolean" "type": "boolean"
}, },
"id": {
"type": "string"
},
"node_recover_timeout_sec": { "node_recover_timeout_sec": {
"description": "seconds", "description": "seconds",
"type": "integer", "type": "integer",

View File

@@ -397,30 +397,6 @@
"name": "glob", "name": "glob",
"in": "query" "in": "query"
}, },
{
"type": "integer",
"description": "minimal size of files",
"name": "size_min",
"in": "query"
},
{
"type": "integer",
"description": "maximal size of files",
"name": "size_max",
"in": "query"
},
{
"type": "integer",
"description": "minimal last modification time",
"name": "lastmod_start",
"in": "query"
},
{
"type": "integer",
"description": "maximal last modification time",
"name": "lastmod_end",
"in": "query"
},
{ {
"type": "string", "type": "string",
"description": "none, name, size, lastmod", "description": "none, name, size, lastmod",
@@ -1001,14 +977,14 @@
"ApiKeyAuth": [] "ApiKeyAuth": []
} }
], ],
"description": "List the files of a proxy node by its ID", "description": "List the resources of a proxy node by its ID",
"produces": [ "produces": [
"application/json" "application/json"
], ],
"tags": [ "tags": [
"v16.?.?" "v16.?.?"
], ],
"summary": "List the files of a proxy node by its ID", "summary": "List the resources of a proxy node by its ID",
"operationId": "cluster-3-get-node-files", "operationId": "cluster-3-get-node-files",
"parameters": [ "parameters": [
{ {
@@ -1035,6 +1011,259 @@
} }
} }
}, },
"/api/v3/cluster/node/{id}/fs/{storage}": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "List all files on a filesystem on a node. The listing can be ordered by name, size, or date of last modification in ascending or descending order.",
"produces": [
"application/json"
],
"tags": [
"v16.?.?"
],
"summary": "List all files on a filesystem on a node",
"operationId": "cluster-3-node-fs-list-files",
"parameters": [
{
"type": "string",
"description": "Node ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Name of the filesystem",
"name": "storage",
"in": "path",
"required": true
},
{
"type": "string",
"description": "glob pattern for file names",
"name": "glob",
"in": "query"
},
{
"type": "string",
"description": "none, name, size, lastmod",
"name": "sort",
"in": "query"
},
{
"type": "string",
"description": "asc, desc",
"name": "order",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/api.FileInfo"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
}
},
"/api/v3/cluster/node/{id}/fs/{storage}/{filepath}": {
"get": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Fetch a file from a filesystem on a node",
"produces": [
"application/data",
"application/json"
],
"tags": [
"v16.?.?"
],
"summary": "Fetch a file from a filesystem on a node",
"operationId": "cluster-3-node-fs-get-file",
"parameters": [
{
"type": "string",
"description": "Node ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Name of the filesystem",
"name": "storage",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Path to file",
"name": "filepath",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "file"
}
},
"301": {
"description": "Moved Permanently",
"schema": {
"type": "string"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
},
"put": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Writes or overwrites a file on a filesystem on a node",
"consumes": [
"application/data"
],
"produces": [
"text/plain",
"application/json"
],
"tags": [
"v16.?.?"
],
"summary": "Add a file to a filesystem on a node",
"operationId": "cluster-3-node-fs-put-file",
"parameters": [
{
"type": "string",
"description": "Node ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Name of the filesystem",
"name": "storage",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Path to file",
"name": "filepath",
"in": "path",
"required": true
},
{
"description": "File data",
"name": "data",
"in": "body",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "integer"
}
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"type": "string"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
},
"delete": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "Remove a file from a filesystem on a node",
"produces": [
"text/plain"
],
"tags": [
"v16.?.?"
],
"summary": "Remove a file from a filesystem on a node",
"operationId": "cluster-3-node-fs-delete-file",
"parameters": [
{
"type": "string",
"description": "Node ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Name of the filesystem",
"name": "storage",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Path to file",
"name": "filepath",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/api.Error"
}
}
}
}
},
"/api/v3/cluster/node/{id}/process": { "/api/v3/cluster/node/{id}/process": {
"get": { "get": {
"security": [ "security": [
@@ -2330,8 +2559,8 @@
"type": "string" "type": "string"
} }
}, },
"507": { "400": {
"description": "Insufficient Storage", "description": "Bad Request",
"schema": { "schema": {
"$ref": "#/definitions/api.Error" "$ref": "#/definitions/api.Error"
} }
@@ -4638,9 +4867,6 @@
"api.ClusterAbout": { "api.ClusterAbout": {
"type": "object", "type": "object",
"properties": { "properties": {
"address": {
"type": "string"
},
"degraded": { "degraded": {
"type": "boolean" "type": "boolean"
}, },
@@ -4651,9 +4877,9 @@
"type": "string" "type": "string"
}, },
"leader": { "leader": {
"type": "boolean" "$ref": "#/definitions/api.ClusterAboutLeader"
}, },
"name": { "node_id": {
"type": "string" "type": "string"
}, },
"nodes": { "nodes": {
@@ -4662,14 +4888,37 @@
"$ref": "#/definitions/api.ClusterNode" "$ref": "#/definitions/api.ClusterNode"
} }
}, },
"public_domains": {
"type": "array",
"items": {
"type": "string"
}
},
"raft": { "raft": {
"$ref": "#/definitions/api.ClusterRaft" "$ref": "#/definitions/api.ClusterRaft"
}, },
"status": {
"type": "string"
},
"version": { "version": {
"type": "string" "type": "string"
} }
} }
}, },
"api.ClusterAboutLeader": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"elected_seconds": {
"type": "integer"
},
"id": {
"type": "string"
}
}
},
"api.ClusterKVS": { "api.ClusterKVS": {
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
@@ -4765,6 +5014,9 @@
}, },
"status": { "status": {
"type": "string" "type": "string"
},
"version": {
"type": "string"
} }
} }
}, },
@@ -4978,6 +5230,9 @@
"enable": { "enable": {
"type": "boolean" "type": "boolean"
}, },
"id": {
"type": "string"
},
"node_recover_timeout_sec": { "node_recover_timeout_sec": {
"description": "seconds", "description": "seconds",
"type": "integer", "type": "integer",
@@ -5515,6 +5770,9 @@
"api.Event": { "api.Event": {
"type": "object", "type": "object",
"properties": { "properties": {
"caller": {
"type": "string"
},
"data": { "data": {
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
@@ -5539,6 +5797,9 @@
"api.EventFilter": { "api.EventFilter": {
"type": "object", "type": "object",
"properties": { "properties": {
"caller": {
"type": "string"
},
"data": { "data": {
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
@@ -5657,6 +5918,9 @@
"dst_name": { "dst_name": {
"type": "string" "type": "string"
}, },
"filter": {
"type": "string"
},
"format": { "format": {
"type": "string" "type": "string"
}, },
@@ -5672,6 +5936,9 @@
"layout": { "layout": {
"type": "string" "type": "string"
}, },
"name": {
"type": "string"
},
"outpad": { "outpad": {
"type": "string" "type": "string"
}, },
@@ -5679,12 +5946,6 @@
"description": "Hz", "description": "Hz",
"type": "integer" "type": "integer"
}, },
"src_filter": {
"type": "string"
},
"src_name": {
"type": "string"
},
"timebase": { "timebase": {
"type": "string" "type": "string"
}, },
@@ -7340,6 +7601,9 @@
"enable": { "enable": {
"type": "boolean" "type": "boolean"
}, },
"id": {
"type": "string"
},
"node_recover_timeout_sec": { "node_recover_timeout_sec": {
"description": "seconds", "description": "seconds",
"type": "integer", "type": "integer",

View File

@@ -70,8 +70,6 @@ definitions:
type: object type: object
api.ClusterAbout: api.ClusterAbout:
properties: properties:
address:
type: string
degraded: degraded:
type: boolean type: boolean
degraded_error: degraded_error:
@@ -79,18 +77,33 @@ definitions:
id: id:
type: string type: string
leader: leader:
type: boolean $ref: '#/definitions/api.ClusterAboutLeader'
name: node_id:
type: string type: string
nodes: nodes:
items: items:
$ref: '#/definitions/api.ClusterNode' $ref: '#/definitions/api.ClusterNode'
type: array type: array
public_domains:
items:
type: string
type: array
raft: raft:
$ref: '#/definitions/api.ClusterRaft' $ref: '#/definitions/api.ClusterRaft'
status:
type: string
version: version:
type: string type: string
type: object type: object
api.ClusterAboutLeader:
properties:
address:
type: string
elected_seconds:
type: integer
id:
type: string
type: object
api.ClusterKVS: api.ClusterKVS:
additionalProperties: additionalProperties:
$ref: '#/definitions/api.ClusterKVSValue' $ref: '#/definitions/api.ClusterKVSValue'
@@ -155,6 +168,8 @@ definitions:
type: number type: number
status: status:
type: string type: string
version:
type: string
type: object type: object
api.ClusterNodeFiles: api.ClusterNodeFiles:
properties: properties:
@@ -296,6 +311,8 @@ definitions:
type: integer type: integer
enable: enable:
type: boolean type: boolean
id:
type: string
node_recover_timeout_sec: node_recover_timeout_sec:
description: seconds description: seconds
format: int64 format: int64
@@ -659,6 +676,8 @@ definitions:
type: object type: object
api.Event: api.Event:
properties: properties:
caller:
type: string
data: data:
additionalProperties: additionalProperties:
type: string type: string
@@ -675,6 +694,8 @@ definitions:
type: object type: object
api.EventFilter: api.EventFilter:
properties: properties:
caller:
type: string
data: data:
additionalProperties: additionalProperties:
type: string type: string
@@ -753,6 +774,8 @@ definitions:
type: string type: string
dst_name: dst_name:
type: string type: string
filter:
type: string
format: format:
type: string type: string
height: height:
@@ -763,15 +786,13 @@ definitions:
type: string type: string
layout: layout:
type: string type: string
name:
type: string
outpad: outpad:
type: string type: string
sampling: sampling:
description: Hz description: Hz
type: integer type: integer
src_filter:
type: string
src_name:
type: string
timebase: timebase:
type: string type: string
type: type:
@@ -1958,6 +1979,8 @@ definitions:
type: integer type: integer
enable: enable:
type: boolean type: boolean
id:
type: string
node_recover_timeout_sec: node_recover_timeout_sec:
description: seconds description: seconds
format: int64 format: int64
@@ -2780,22 +2803,6 @@ paths:
in: query in: query
name: glob name: glob
type: string type: string
- description: minimal size of files
in: query
name: size_min
type: integer
- description: maximal size of files
in: query
name: size_max
type: integer
- description: minimal last modification time
in: query
name: lastmod_start
type: integer
- description: maximal last modification time
in: query
name: lastmod_end
type: integer
- description: none, name, size, lastmod - description: none, name, size, lastmod
in: query in: query
name: sort name: sort
@@ -3168,7 +3175,7 @@ paths:
- v16.?.? - v16.?.?
/api/v3/cluster/node/{id}/files: /api/v3/cluster/node/{id}/files:
get: get:
description: List the files of a proxy node by its ID description: List the resources of a proxy node by its ID
operationId: cluster-3-get-node-files operationId: cluster-3-get-node-files
parameters: parameters:
- description: Node ID - description: Node ID
@@ -3189,7 +3196,175 @@ paths:
$ref: '#/definitions/api.Error' $ref: '#/definitions/api.Error'
security: security:
- ApiKeyAuth: [] - ApiKeyAuth: []
summary: List the files of a proxy node by its ID summary: List the resources of a proxy node by its ID
tags:
- v16.?.?
/api/v3/cluster/node/{id}/fs/{storage}:
get:
description: List all files on a filesystem on a node. The listing can be ordered
by name, size, or date of last modification in ascending or descending order.
operationId: cluster-3-node-fs-list-files
parameters:
- description: Node ID
in: path
name: id
required: true
type: string
- description: Name of the filesystem
in: path
name: storage
required: true
type: string
- description: glob pattern for file names
in: query
name: glob
type: string
- description: none, name, size, lastmod
in: query
name: sort
type: string
- description: asc, desc
in: query
name: order
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/api.FileInfo'
type: array
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/api.Error'
security:
- ApiKeyAuth: []
summary: List all files on a filesystem on a node
tags:
- v16.?.?
/api/v3/cluster/node/{id}/fs/{storage}/{filepath}:
delete:
description: Remove a file from a filesystem on a node
operationId: cluster-3-node-fs-delete-file
parameters:
- description: Node ID
in: path
name: id
required: true
type: string
- description: Name of the filesystem
in: path
name: storage
required: true
type: string
- description: Path to file
in: path
name: filepath
required: true
type: string
produces:
- text/plain
responses:
"200":
description: OK
schema:
type: string
"404":
description: Not Found
schema:
$ref: '#/definitions/api.Error'
security:
- ApiKeyAuth: []
summary: Remove a file from a filesystem on a node
tags:
- v16.?.?
get:
description: Fetch a file from a filesystem on a node
operationId: cluster-3-node-fs-get-file
parameters:
- description: Node ID
in: path
name: id
required: true
type: string
- description: Name of the filesystem
in: path
name: storage
required: true
type: string
- description: Path to file
in: path
name: filepath
required: true
type: string
produces:
- application/data
- application/json
responses:
"200":
description: OK
schema:
type: file
"301":
description: Moved Permanently
schema:
type: string
"404":
description: Not Found
schema:
$ref: '#/definitions/api.Error'
security:
- ApiKeyAuth: []
summary: Fetch a file from a filesystem on a node
tags:
- v16.?.?
put:
consumes:
- application/data
description: Writes or overwrites a file on a filesystem on a node
operationId: cluster-3-node-fs-put-file
parameters:
- description: Node ID
in: path
name: id
required: true
type: string
- description: Name of the filesystem
in: path
name: storage
required: true
type: string
- description: Path to file
in: path
name: filepath
required: true
type: string
- description: File data
in: body
name: data
required: true
schema:
items:
type: integer
type: array
produces:
- text/plain
- application/json
responses:
"201":
description: Created
schema:
type: string
"400":
description: Bad Request
schema:
$ref: '#/definitions/api.Error'
security:
- ApiKeyAuth: []
summary: Add a file to a filesystem on a node
tags: tags:
- v16.?.? - v16.?.?
/api/v3/cluster/node/{id}/process: /api/v3/cluster/node/{id}/process:
@@ -4081,8 +4256,8 @@ paths:
description: No Content description: No Content
schema: schema:
type: string type: string
"507": "400":
description: Insufficient Storage description: Bad Request
schema: schema:
$ref: '#/definitions/api.Error' $ref: '#/definitions/api.Error'
security: security: