diff --git a/cluster/api.go b/cluster/api.go index 41eb96d0..32da5c7f 100644 --- a/cluster/api.go +++ b/cluster/api.go @@ -96,7 +96,6 @@ func NewAPI(config APIConfig) (API, error) { doc.GET("", echoSwagger.EchoWrapHandler(echoSwagger.InstanceName("ClusterAPI"))) a.router.GET("/", a.Version) - a.router.GET("/v1/about", a.About) 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()) } -// 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 // @Summary Has the barrier already has been passed // @Description Has the barrier already has been passed diff --git a/cluster/docs/ClusterAPI_docs.go b/cluster/docs/ClusterAPI_docs.go index af7a2f3a..61b995ed 100644 --- a/cluster/docs/ClusterAPI_docs.go +++ b/cluster/docs/ClusterAPI_docs.go @@ -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}": { "get": { "description": "Has the barrier already has been passed", @@ -1493,6 +1466,9 @@ const docTemplateClusterAPI = `{ "enable": { "type": "boolean" }, + "id": { + "type": "string" + }, "node_recover_timeout_sec": { "description": "seconds", "type": "integer", diff --git a/cluster/docs/ClusterAPI_swagger.json b/cluster/docs/ClusterAPI_swagger.json index 609f8e5c..e7dd2113 100644 --- a/cluster/docs/ClusterAPI_swagger.json +++ b/cluster/docs/ClusterAPI_swagger.json @@ -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}": { "get": { "description": "Has the barrier already has been passed", @@ -1485,6 +1458,9 @@ "enable": { "type": "boolean" }, + "id": { + "type": "string" + }, "node_recover_timeout_sec": { "description": "seconds", "type": "integer", diff --git a/cluster/docs/ClusterAPI_swagger.yaml b/cluster/docs/ClusterAPI_swagger.yaml index e6c83e7c..f31820fb 100644 --- a/cluster/docs/ClusterAPI_swagger.yaml +++ b/cluster/docs/ClusterAPI_swagger.yaml @@ -242,6 +242,8 @@ definitions: type: integer enable: type: boolean + id: + type: string node_recover_timeout_sec: description: seconds format: int64 @@ -882,24 +884,6 @@ paths: summary: The cluster version tags: - 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}: get: description: Has the barrier already has been passed diff --git a/docs/docs.go b/docs/docs.go index d7279c9b..07fc04e8 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -405,30 +405,6 @@ const docTemplate = `{ "name": "glob", "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", "description": "none, name, size, lastmod", @@ -1009,14 +985,14 @@ const docTemplate = `{ "ApiKeyAuth": [] } ], - "description": "List the files of a proxy node by its ID", + "description": "List the resources of a proxy node by its ID", "produces": [ "application/json" ], "tags": [ "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", "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": { "get": { "security": [ @@ -2338,8 +2567,8 @@ const docTemplate = `{ "type": "string" } }, - "507": { - "description": "Insufficient Storage", + "400": { + "description": "Bad Request", "schema": { "$ref": "#/definitions/api.Error" } @@ -4646,9 +4875,6 @@ const docTemplate = `{ "api.ClusterAbout": { "type": "object", "properties": { - "address": { - "type": "string" - }, "degraded": { "type": "boolean" }, @@ -4659,9 +4885,9 @@ const docTemplate = `{ "type": "string" }, "leader": { - "type": "boolean" + "$ref": "#/definitions/api.ClusterAboutLeader" }, - "name": { + "node_id": { "type": "string" }, "nodes": { @@ -4670,14 +4896,37 @@ const docTemplate = `{ "$ref": "#/definitions/api.ClusterNode" } }, + "public_domains": { + "type": "array", + "items": { + "type": "string" + } + }, "raft": { "$ref": "#/definitions/api.ClusterRaft" }, + "status": { + "type": "string" + }, "version": { "type": "string" } } }, + "api.ClusterAboutLeader": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "elected_seconds": { + "type": "integer" + }, + "id": { + "type": "string" + } + } + }, "api.ClusterKVS": { "type": "object", "additionalProperties": { @@ -4773,6 +5022,9 @@ const docTemplate = `{ }, "status": { "type": "string" + }, + "version": { + "type": "string" } } }, @@ -4986,6 +5238,9 @@ const docTemplate = `{ "enable": { "type": "boolean" }, + "id": { + "type": "string" + }, "node_recover_timeout_sec": { "description": "seconds", "type": "integer", @@ -5523,6 +5778,9 @@ const docTemplate = `{ "api.Event": { "type": "object", "properties": { + "caller": { + "type": "string" + }, "data": { "type": "object", "additionalProperties": { @@ -5547,6 +5805,9 @@ const docTemplate = `{ "api.EventFilter": { "type": "object", "properties": { + "caller": { + "type": "string" + }, "data": { "type": "object", "additionalProperties": { @@ -5665,6 +5926,9 @@ const docTemplate = `{ "dst_name": { "type": "string" }, + "filter": { + "type": "string" + }, "format": { "type": "string" }, @@ -5680,6 +5944,9 @@ const docTemplate = `{ "layout": { "type": "string" }, + "name": { + "type": "string" + }, "outpad": { "type": "string" }, @@ -5687,12 +5954,6 @@ const docTemplate = `{ "description": "Hz", "type": "integer" }, - "src_filter": { - "type": "string" - }, - "src_name": { - "type": "string" - }, "timebase": { "type": "string" }, @@ -7348,6 +7609,9 @@ const docTemplate = `{ "enable": { "type": "boolean" }, + "id": { + "type": "string" + }, "node_recover_timeout_sec": { "description": "seconds", "type": "integer", diff --git a/docs/swagger.json b/docs/swagger.json index a1ba41b2..23e3f3b0 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -397,30 +397,6 @@ "name": "glob", "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", "description": "none, name, size, lastmod", @@ -1001,14 +977,14 @@ "ApiKeyAuth": [] } ], - "description": "List the files of a proxy node by its ID", + "description": "List the resources of a proxy node by its ID", "produces": [ "application/json" ], "tags": [ "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", "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": { "get": { "security": [ @@ -2330,8 +2559,8 @@ "type": "string" } }, - "507": { - "description": "Insufficient Storage", + "400": { + "description": "Bad Request", "schema": { "$ref": "#/definitions/api.Error" } @@ -4638,9 +4867,6 @@ "api.ClusterAbout": { "type": "object", "properties": { - "address": { - "type": "string" - }, "degraded": { "type": "boolean" }, @@ -4651,9 +4877,9 @@ "type": "string" }, "leader": { - "type": "boolean" + "$ref": "#/definitions/api.ClusterAboutLeader" }, - "name": { + "node_id": { "type": "string" }, "nodes": { @@ -4662,14 +4888,37 @@ "$ref": "#/definitions/api.ClusterNode" } }, + "public_domains": { + "type": "array", + "items": { + "type": "string" + } + }, "raft": { "$ref": "#/definitions/api.ClusterRaft" }, + "status": { + "type": "string" + }, "version": { "type": "string" } } }, + "api.ClusterAboutLeader": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "elected_seconds": { + "type": "integer" + }, + "id": { + "type": "string" + } + } + }, "api.ClusterKVS": { "type": "object", "additionalProperties": { @@ -4765,6 +5014,9 @@ }, "status": { "type": "string" + }, + "version": { + "type": "string" } } }, @@ -4978,6 +5230,9 @@ "enable": { "type": "boolean" }, + "id": { + "type": "string" + }, "node_recover_timeout_sec": { "description": "seconds", "type": "integer", @@ -5515,6 +5770,9 @@ "api.Event": { "type": "object", "properties": { + "caller": { + "type": "string" + }, "data": { "type": "object", "additionalProperties": { @@ -5539,6 +5797,9 @@ "api.EventFilter": { "type": "object", "properties": { + "caller": { + "type": "string" + }, "data": { "type": "object", "additionalProperties": { @@ -5657,6 +5918,9 @@ "dst_name": { "type": "string" }, + "filter": { + "type": "string" + }, "format": { "type": "string" }, @@ -5672,6 +5936,9 @@ "layout": { "type": "string" }, + "name": { + "type": "string" + }, "outpad": { "type": "string" }, @@ -5679,12 +5946,6 @@ "description": "Hz", "type": "integer" }, - "src_filter": { - "type": "string" - }, - "src_name": { - "type": "string" - }, "timebase": { "type": "string" }, @@ -7340,6 +7601,9 @@ "enable": { "type": "boolean" }, + "id": { + "type": "string" + }, "node_recover_timeout_sec": { "description": "seconds", "type": "integer", diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 5a85588c..2d6f8336 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -70,8 +70,6 @@ definitions: type: object api.ClusterAbout: properties: - address: - type: string degraded: type: boolean degraded_error: @@ -79,18 +77,33 @@ definitions: id: type: string leader: - type: boolean - name: + $ref: '#/definitions/api.ClusterAboutLeader' + node_id: type: string nodes: items: $ref: '#/definitions/api.ClusterNode' type: array + public_domains: + items: + type: string + type: array raft: $ref: '#/definitions/api.ClusterRaft' + status: + type: string version: type: string type: object + api.ClusterAboutLeader: + properties: + address: + type: string + elected_seconds: + type: integer + id: + type: string + type: object api.ClusterKVS: additionalProperties: $ref: '#/definitions/api.ClusterKVSValue' @@ -155,6 +168,8 @@ definitions: type: number status: type: string + version: + type: string type: object api.ClusterNodeFiles: properties: @@ -296,6 +311,8 @@ definitions: type: integer enable: type: boolean + id: + type: string node_recover_timeout_sec: description: seconds format: int64 @@ -659,6 +676,8 @@ definitions: type: object api.Event: properties: + caller: + type: string data: additionalProperties: type: string @@ -675,6 +694,8 @@ definitions: type: object api.EventFilter: properties: + caller: + type: string data: additionalProperties: type: string @@ -753,6 +774,8 @@ definitions: type: string dst_name: type: string + filter: + type: string format: type: string height: @@ -763,15 +786,13 @@ definitions: type: string layout: type: string + name: + type: string outpad: type: string sampling: description: Hz type: integer - src_filter: - type: string - src_name: - type: string timebase: type: string type: @@ -1958,6 +1979,8 @@ definitions: type: integer enable: type: boolean + id: + type: string node_recover_timeout_sec: description: seconds format: int64 @@ -2780,22 +2803,6 @@ paths: in: query name: glob 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 in: query name: sort @@ -3168,7 +3175,7 @@ paths: - v16.?.? /api/v3/cluster/node/{id}/files: 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 parameters: - description: Node ID @@ -3189,7 +3196,175 @@ paths: $ref: '#/definitions/api.Error' security: - 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: - v16.?.? /api/v3/cluster/node/{id}/process: @@ -4081,8 +4256,8 @@ paths: description: No Content schema: type: string - "507": - description: Insufficient Storage + "400": + description: Bad Request schema: $ref: '#/definitions/api.Error' security: