add swagger
This commit is contained in:
555
swagger/swagger.json
Normal file
555
swagger/swagger.json
Normal file
@@ -0,0 +1,555 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"title": "oc-datacenter",
|
||||
"description": "Monitor owned datacenter activity\n",
|
||||
"version": "1.0.0",
|
||||
"termsOfService": "http://cloud.o-forge.io/",
|
||||
"contact": {
|
||||
"email": "admin@o-cloud.io"
|
||||
},
|
||||
"license": {
|
||||
"name": "AGPL",
|
||||
"url": "https://www.gnu.org/licenses/agpl-3.0.html"
|
||||
}
|
||||
},
|
||||
"basePath": "/oc/",
|
||||
"paths": {
|
||||
"/": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"oc-datacenter/controllersDatacenterController"
|
||||
],
|
||||
"description": "find booking by id\n\u003cbr\u003e",
|
||||
"operationId": "DatacenterController.GetAll",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "query",
|
||||
"name": "is_draft",
|
||||
"description": "draft wished",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{booking} models.booking"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admiralty/kubeconfig/{execution}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"admiralty"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "execution",
|
||||
"description": "execution id of the workflow",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admiralty/node/{execution}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"admiralty"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "execution",
|
||||
"description": "execution id of the workflow",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admiralty/secret/{execution}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"admiralty"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "execution",
|
||||
"description": "execution id of the workflow",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"tags": [
|
||||
"admiralty"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "execution",
|
||||
"description": "execution id of the workflow",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "body",
|
||||
"name": "kubeconfig",
|
||||
"description": "Kubeconfig to use when creating secret",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controllers.RemoteKubeconfig"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admiralty/source/{execution}": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"admiralty"
|
||||
],
|
||||
"description": "Create an Admiralty Source on remote cluster\n\u003cbr\u003e",
|
||||
"operationId": "AdmiraltyController.CreateSource",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "execution",
|
||||
"description": "execution id of the workflow",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admiralty/target/{execution}": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"admiralty"
|
||||
],
|
||||
"description": "Create an Admiralty Target in the namespace associated to the executionID\n\u003cbr\u003e",
|
||||
"operationId": "AdmiraltyController.CreateAdmiraltyTarget",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "execution",
|
||||
"description": "execution id of the workflow",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admiralty/targets": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"admiralty"
|
||||
],
|
||||
"description": "find all Admiralty Target\n\u003cbr\u003e",
|
||||
"operationId": "AdmiraltyController.GetAllTargets",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admiralty/targets/{execution}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"admiralty"
|
||||
],
|
||||
"description": "find one Admiralty Target\n\u003cbr\u003e",
|
||||
"operationId": "AdmiraltyController.GetOneTarget",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"description": "the name of the target to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/booking/": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"booking"
|
||||
],
|
||||
"description": "find booking by id\n\u003cbr\u003e",
|
||||
"operationId": "BookingController.GetAll",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "query",
|
||||
"name": "is_draft",
|
||||
"description": "draft wished",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{booking} models.booking"
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"tags": [
|
||||
"booking"
|
||||
],
|
||||
"description": "create booking\n\u003cbr\u003e",
|
||||
"operationId": "BookingController.Post.",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "body",
|
||||
"name": "booking",
|
||||
"description": "the booking you want to post",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "is_draft",
|
||||
"description": "draft wished",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/booking/check/{id}/{start_date}/{end_date}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"booking"
|
||||
],
|
||||
"description": "check booking\n\u003cbr\u003e",
|
||||
"operationId": "BookingController.Check",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"description": "id of the datacenter",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "path",
|
||||
"name": "start_date",
|
||||
"description": "2006-01-02T15:04:05",
|
||||
"type": "string",
|
||||
"default": "the booking start date"
|
||||
},
|
||||
{
|
||||
"in": "path",
|
||||
"name": "end_date",
|
||||
"description": "2006-01-02T15:04:05",
|
||||
"type": "string",
|
||||
"default": "the booking end date"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "is_draft",
|
||||
"description": "draft wished",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.object"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/booking/search/execution/{id}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"booking"
|
||||
],
|
||||
"description": "search bookings by execution\n\u003cbr\u003e",
|
||||
"operationId": "BookingController.Search",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"description": "id execution",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "is_draft",
|
||||
"description": "draft wished",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{workspace} models.workspace"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/booking/search/{start_date}/{end_date}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"booking"
|
||||
],
|
||||
"description": "search bookings\n\u003cbr\u003e",
|
||||
"operationId": "BookingController.Search",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "start_date",
|
||||
"description": "the word search you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "path",
|
||||
"name": "end_date",
|
||||
"description": "the word search you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "is_draft",
|
||||
"description": "draft wished",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{workspace} models.workspace"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/booking/{id}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"booking"
|
||||
],
|
||||
"description": "find booking by id\n\u003cbr\u003e",
|
||||
"operationId": "BookingController.Get",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"description": "the id you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{booking} models.booking"
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"tags": [
|
||||
"booking"
|
||||
],
|
||||
"description": "create computes\n\u003cbr\u003e",
|
||||
"operationId": "BookingController.Update",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"description": "the compute id you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "body",
|
||||
"name": "body",
|
||||
"description": "The compute content",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/models.compute"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{compute} models.compute"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/session/token/{id}/{duration}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"session"
|
||||
],
|
||||
"description": "find booking by id\n\u003cbr\u003e",
|
||||
"operationId": "SessionController.GetToken",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"description": "id of the datacenter",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "path",
|
||||
"name": "duration",
|
||||
"description": "duration of the token",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{booking} models.booking"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/version/": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"version"
|
||||
],
|
||||
"description": "get version\n\u003cbr\u003e",
|
||||
"operationId": "VersionController.GetAll",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/version/status": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"version"
|
||||
],
|
||||
"description": "get status\n\u003cbr\u003e",
|
||||
"operationId": "VersionController.Status",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/{id}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"oc-datacenter/controllersDatacenterController"
|
||||
],
|
||||
"description": "find booking by id\n\u003cbr\u003e",
|
||||
"operationId": "DatacenterController.Get",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"description": "the id you want to get",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "is_draft",
|
||||
"description": "draft wished",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "{booking} models.booking"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"controllers.RemoteKubeconfig": {
|
||||
"title": "RemoteKubeconfig",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Data": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.compute": {
|
||||
"title": "compute",
|
||||
"type": "object"
|
||||
},
|
||||
"models.object": {
|
||||
"title": "object",
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "oc-datacenter/controllersDatacenterController",
|
||||
"description": "Operations about workspace\n"
|
||||
},
|
||||
{
|
||||
"name": "booking",
|
||||
"description": "Operations about workspace\n"
|
||||
},
|
||||
{
|
||||
"name": "version",
|
||||
"description": "VersionController operations for Version\n"
|
||||
},
|
||||
{
|
||||
"name": "admiralty",
|
||||
"description": "Operations about the admiralty objects of the datacenter\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user