{ "swagger": "2.0", "info": { "title": "", "version": "" }, "host": "127.0.0.1:9993", "schemes": [ "http" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/api/v1/db/ping": { "get": { "operationId": "DbPingHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/DbPingResponse" } } }, "tags": [ "udeServer-api" ] } }, "/api/v1/directories": { "get": { "operationId": "ListDirectoriesHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/DirectoryListResp" } } }, "parameters": [ { "name": "page", "in": "query", "required": false, "type": "integer", "format": "int64" }, { "name": "pageSize", "in": "query", "required": false, "type": "integer", "format": "int64" } ], "tags": [ "udeServer-api" ], "consumes": [ "multipart/form-data" ] }, "post": { "operationId": "CreateDirectoryHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/DirectoryResp" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/CreateDirectoryReq" } } ], "tags": [ "udeServer-api" ] } }, "/api/v1/directories/{id}": { "get": { "operationId": "GetDirectoryHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/DirectoryResp" } } }, "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" } ], "tags": [ "udeServer-api" ] }, "delete": { "operationId": "DeleteDirectoryHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/DeleteResp" } } }, "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/DirectoryIdReq" } } ], "tags": [ "udeServer-api" ] }, "put": { "operationId": "UpdateDirectoryHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/DirectoryResp" } } }, "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/UpdateDirectoryReq" } } ], "tags": [ "udeServer-api" ] } }, "/api/v1/from/{name}": { "get": { "operationId": "UdeServerHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/Response" } } }, "parameters": [ { "name": "name", "in": "path", "required": true, "type": "string" } ], "tags": [ "udeServer-api" ] } }, "/api/v1/keys/create": { "post": { "operationId": "CreateKeyHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/KeyResp" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/CreateKeyReq" } } ], "tags": [ "udeServer-api" ] } }, "/api/v1/keys/delete": { "post": { "operationId": "DeleteKeyHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/DeleteResp" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/KeyIdReq" } } ], "tags": [ "udeServer-api" ] } }, "/api/v1/keys/detail": { "post": { "operationId": "GetKeyHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/KeyResp" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/KeyIdReq" } } ], "tags": [ "udeServer-api" ] } }, "/api/v1/keys/list": { "post": { "operationId": "ListKeysHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/KeyListResp" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ListKeysReq" } } ], "tags": [ "udeServer-api" ] } }, "/api/v1/keys/update": { "post": { "operationId": "UpdateKeyHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/KeyResp" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/UpdateKeyReq" } } ], "tags": [ "udeServer-api" ] } }, "/api/v1/services": { "get": { "operationId": "ListServicesHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/ServiceListResp" } } }, "parameters": [ { "name": "page", "in": "query", "required": false, "type": "integer", "format": "int64" }, { "name": "pageSize", "in": "query", "required": false, "type": "integer", "format": "int64" } ], "tags": [ "udeServer-api" ], "consumes": [ "multipart/form-data" ] }, "post": { "operationId": "CreateServiceHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/ServiceResp" } } }, "parameters": [ { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/CreateServiceReq" } } ], "tags": [ "udeServer-api" ] } }, "/api/v1/services/{id}": { "get": { "operationId": "GetServiceHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/ServiceResp" } } }, "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" } ], "tags": [ "udeServer-api" ] }, "delete": { "operationId": "DeleteServiceHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/DeleteResp" } } }, "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ServiceIdReq" } } ], "tags": [ "udeServer-api" ] }, "put": { "operationId": "UpdateServiceHandler", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/ServiceResp" } } }, "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string" }, { "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/UpdateServiceReq" } } ], "tags": [ "udeServer-api" ] } } }, "definitions": { "CreateDirectoryReq": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "serviceId": { "type": "integer", "format": "int64" }, "directory": { "type": "string" } }, "title": "CreateDirectoryReq", "required": [ "id" ] }, "CreateKeyReq": { "type": "object", "properties": { "name": { "type": "string" } }, "title": "CreateKeyReq", "required": [ "name" ] }, "CreateServiceReq": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "ip": { "type": "string" }, "port": { "type": "string" }, "iden": { "type": "string" }, "keyIden": { "type": "string" }, "keyAlgo": { "type": "string" }, "status": { "type": "string" } }, "title": "CreateServiceReq", "required": [ "id" ] }, "DbPingResponse": { "type": "object", "properties": { "ok": { "type": "boolean", "format": "boolean" }, "version": { "type": "string" }, "database": { "type": "string" } }, "title": "DbPingResponse", "required": [ "ok", "version", "database" ] }, "DeleteResp": { "type": "object", "properties": { "ok": { "type": "boolean", "format": "boolean" } }, "title": "DeleteResp", "required": [ "ok" ] }, "DirectoryIdReq": { "type": "object", "title": "DirectoryIdReq" }, "DirectoryListResp": { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/DirectoryResp" } }, "total": { "type": "integer", "format": "int64" } }, "title": "DirectoryListResp", "required": [ "list", "total" ] }, "DirectoryResp": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "serviceId": { "type": "integer", "format": "int64" }, "directory": { "type": "string" } }, "title": "DirectoryResp", "required": [ "id", "serviceId", "directory" ] }, "KeyIdReq": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" } }, "title": "KeyIdReq", "required": [ "id" ] }, "KeyListResp": { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/KeyResp" } }, "total": { "type": "integer", "format": "int64" } }, "title": "KeyListResp", "required": [ "list", "total" ] }, "KeyResp": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "iden": { "type": "string" }, "name": { "type": "string" }, "content": { "type": "string" }, "status": { "type": "string" }, "createAt": { "type": "string" } }, "title": "KeyResp", "required": [ "id", "iden", "name", "content", "status", "createAt" ] }, "ListDirectoryReq": { "type": "object", "properties": { "page": { "type": "integer", "format": "int64" }, "pageSize": { "type": "integer", "format": "int64" } }, "title": "ListDirectoryReq" }, "ListKeysReq": { "type": "object", "properties": { "page": { "type": "integer", "format": "int64" }, "pageSize": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "status": { "type": "string" } }, "title": "ListKeysReq" }, "ListServiceReq": { "type": "object", "properties": { "page": { "type": "integer", "format": "int64" }, "pageSize": { "type": "integer", "format": "int64" } }, "title": "ListServiceReq" }, "Request": { "type": "object", "title": "Request" }, "Response": { "type": "object", "properties": { "message": { "type": "string" } }, "title": "Response", "required": [ "message" ] }, "ServiceIdReq": { "type": "object", "title": "ServiceIdReq" }, "ServiceListResp": { "type": "object", "properties": { "list": { "type": "array", "items": { "$ref": "#/definitions/ServiceResp" } }, "total": { "type": "integer", "format": "int64" } }, "title": "ServiceListResp", "required": [ "list", "total" ] }, "ServiceResp": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "ip": { "type": "string" }, "port": { "type": "string" }, "iden": { "type": "string" }, "keyIden": { "type": "string" }, "keyAlgo": { "type": "string" }, "status": { "type": "string" }, "createAt": { "type": "string" } }, "title": "ServiceResp", "required": [ "id", "name", "ip", "port", "iden", "keyIden", "keyAlgo", "status", "createAt" ] }, "UpdateDirectoryReq": { "type": "object", "properties": { "serviceId": { "type": "integer", "format": "int64" }, "directory": { "type": "string" } }, "title": "UpdateDirectoryReq" }, "UpdateKeyReq": { "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "status": { "type": "string" } }, "title": "UpdateKeyReq", "required": [ "id", "status" ] }, "UpdateServiceReq": { "type": "object", "properties": { "name": { "type": "string" }, "ip": { "type": "string" }, "port": { "type": "string" }, "iden": { "type": "string" }, "keyIden": { "type": "string" }, "keyAlgo": { "type": "string" }, "status": { "type": "string" } }, "title": "UpdateServiceReq" } }, "securityDefinitions": { "apiKey": { "type": "apiKey", "description": "Enter JWT Bearer token **_only_**", "name": "Authorization", "in": "header" } } }