oc-peer/swagger/swagger.json

243 lines
7.7 KiB
JSON
Raw Normal View History

2024-07-11 11:40:11 +02:00
{
"swagger": "2.0",
"info": {
2024-10-15 10:51:12 +02:00
"title": "oc-peer",
2024-09-04 17:23:30 +02:00
"description": "Manage OpenCloud peers\n",
2024-07-11 11:40:11 +02:00
"version": "1.0.0",
2024-09-04 17:23:30 +02:00
"termsOfService": "http://cloud.o-forge.io/",
2024-07-11 11:40:11 +02:00
"contact": {
2024-09-04 17:23:30 +02:00
"email": "admin@o-cloud.io"
2024-07-11 11:40:11 +02:00
},
"license": {
2024-10-15 10:51:12 +02:00
"name": "AGPL",
"url": "https://www.gnu.org/licenses/agpl-3.0.html"
2024-07-11 11:40:11 +02:00
}
},
2024-07-24 10:25:08 +02:00
"basePath": "/oc/",
2024-07-11 11:40:11 +02:00
"paths": {
2024-10-15 10:51:12 +02:00
"/": {
2024-07-11 11:40:11 +02:00
"get": {
"tags": [
2024-10-15 10:51:12 +02:00
"oc-peer/controllersPeerController"
2024-07-11 11:40:11 +02:00
],
2024-08-26 12:07:54 +02:00
"description": "find all peer\n\u003cbr\u003e",
"operationId": "PeerController.GetAll",
2024-07-11 11:40:11 +02:00
"responses": {
"200": {
2024-08-26 12:07:54 +02:00
"description": "{peer} models.peer"
2024-07-11 11:40:11 +02:00
}
}
}
},
2024-10-15 10:51:12 +02:00
"/search/{search}": {
2024-07-24 10:25:08 +02:00
"get": {
"tags": [
2024-10-15 10:51:12 +02:00
"oc-peer/controllersPeerController"
2024-08-26 12:07:54 +02:00
],
"description": "search workspace\n\u003cbr\u003e",
"operationId": "PeerController.Search",
"parameters": [
{
"in": "path",
"name": "search",
"description": "the word search you want to get",
"required": true,
"type": "string"
}
2024-07-24 10:25:08 +02:00
],
"responses": {
"200": {
2024-08-26 12:07:54 +02:00
"description": "{workspace} models.workspace"
2024-07-24 10:25:08 +02:00
}
}
}
},
2024-10-15 10:51:12 +02:00
"/status/": {
"post": {
"tags": [
"status"
],
"description": "get peer status if it's alive\n\u003cbr\u003e",
"operationId": "StatusController.Status",
"parameters": [
{
"in": "body",
"name": "body",
"description": "of",
"schema": {
"$ref": "#/definitions/list"
}
}
],
"responses": {
"200": {
"description": "{status} models.status"
}
}
}
},
"/version/": {
"get": {
"tags": [
"version"
],
"description": "get version\n\u003cbr\u003e",
"operationId": "VersionController.GetAll",
"responses": {
"200": {
"description": ""
}
}
}
},
"/{id}": {
2024-08-06 11:09:38 +02:00
"get": {
"tags": [
2024-10-15 10:51:12 +02:00
"oc-peer/controllersPeerController"
2024-08-06 11:09:38 +02:00
],
2024-08-26 12:07:54 +02:00
"description": "find peer by peerid\n\u003cbr\u003e",
"operationId": "PeerController.Get",
2024-08-06 11:09:38 +02:00
"parameters": [
{
"in": "path",
2024-08-26 12:07:54 +02:00
"name": "id",
"description": "the peer id you want to get",
2024-08-06 11:09:38 +02:00
"required": true,
"type": "string"
2024-08-26 12:07:54 +02:00
}
],
"responses": {
"200": {
"description": "{peer} models.peer"
}
}
},
"put": {
"tags": [
2024-10-15 10:51:12 +02:00
"oc-peer/controllersPeerController"
2024-08-26 12:07:54 +02:00
],
"description": "create peers\n\u003cbr\u003e",
"operationId": "PeerController.Update",
"parameters": [
2024-08-06 11:09:38 +02:00
{
"in": "path",
2024-08-26 12:07:54 +02:00
"name": "id",
"description": "the peer id you want to get",
2024-08-06 11:09:38 +02:00
"required": true,
"type": "string"
2024-08-26 12:07:54 +02:00
},
{
"in": "body",
"name": "body",
"description": "The peer content",
"required": true,
"schema": {
"$ref": "#/definitions/models.peer"
}
2024-08-06 11:09:38 +02:00
}
],
"responses": {
"200": {
2024-08-26 12:07:54 +02:00
"description": "",
"schema": {
"$ref": "#/definitions/models.peer"
}
2024-08-06 11:09:38 +02:00
}
}
}
2024-10-15 16:55:29 +02:00
},
"/{id}/blacklist": {
"post": {
"tags": [
"oc-peer/controllersPeerController"
],
"description": "add blacklist peer by peerid\n\u003cbr\u003e",
"operationId": "PeerController.Blacklist",
"parameters": [
{
"in": "path",
"name": "id",
"description": "the peer id you want to blacklist",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{peer} models.peer"
}
}
}
},
"/{id}/partner": {
"post": {
"tags": [
"oc-peer/controllersPeerController"
],
"description": "add partner peer by peerid\n\u003cbr\u003e",
"operationId": "PeerController.Partner",
"parameters": [
{
"in": "path",
"name": "id",
"description": "the peer id you want to partner",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{peer} models.peer"
}
}
}
},
"/{id}/undo_state": {
"post": {
"tags": [
"oc-peer/controllersPeerController"
],
"description": "delete state peer by peerid\n\u003cbr\u003e",
"operationId": "PeerController.DeleteState",
"parameters": [
{
"in": "path",
"name": "id",
"description": "the peer id you want to delete state",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "{peer} models.peer"
}
}
}
2024-08-26 12:07:54 +02:00
}
},
"definitions": {
"list": {
"title": "list",
"type": "object"
},
"models.peer": {
"title": "peer",
"type": "object"
2024-07-11 11:40:11 +02:00
}
},
"tags": [
2024-08-06 11:09:38 +02:00
{
2024-08-26 12:07:54 +02:00
"name": "status",
"description": "Operations about workflow\n"
},
{
2024-10-15 10:51:12 +02:00
"name": "oc-peer/controllersPeerController",
2024-08-06 11:09:38 +02:00
"description": "Operations about workflow\n"
},
2024-07-11 11:40:11 +02:00
{
"name": "version",
"description": "VersionController operations for Version\n"
}
]
}