2024-08-13 11:17:09 +02:00
|
|
|
{
|
|
|
|
"swagger": "2.0",
|
|
|
|
"info": {
|
2024-09-04 17:32:30 +02:00
|
|
|
"title": "oc-datacenter",
|
|
|
|
"description": "Monitor owned datacenter activity\n",
|
2024-08-13 11:17:09 +02:00
|
|
|
"version": "1.0.0",
|
2024-09-04 17:32:30 +02:00
|
|
|
"termsOfService": "http://cloud.o-forge.io/",
|
2024-08-13 11:17:09 +02:00
|
|
|
"contact": {
|
2024-09-04 17:32:30 +02:00
|
|
|
"email": "admin@o-cloud.io"
|
2024-08-13 11:17:09 +02:00
|
|
|
},
|
|
|
|
"license": {
|
2024-11-13 08:10:20 +01:00
|
|
|
"name": "AGPL",
|
|
|
|
"url": "https://www.gnu.org/licenses/agpl-3.0.html"
|
2024-08-13 11:17:09 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"basePath": "/oc/",
|
|
|
|
"paths": {
|
|
|
|
"/booking/": {
|
|
|
|
"get": {
|
|
|
|
"tags": [
|
|
|
|
"booking"
|
|
|
|
],
|
|
|
|
"description": "find booking by id\n\u003cbr\u003e",
|
|
|
|
"operationId": "BookingController.GetAll",
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "{booking} models.booking"
|
|
|
|
}
|
|
|
|
}
|
2024-08-21 12:04:12 +02:00
|
|
|
},
|
|
|
|
"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"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/models.object"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-08-13 11:17:09 +02:00
|
|
|
}
|
|
|
|
},
|
2024-09-04 17:32:30 +02:00
|
|
|
"/booking/check/{id}/{start_date}/{end_date}": {
|
2024-08-13 11:17:09 +02:00
|
|
|
"get": {
|
|
|
|
"tags": [
|
|
|
|
"booking"
|
|
|
|
],
|
|
|
|
"description": "check booking\n\u003cbr\u003e",
|
|
|
|
"operationId": "BookingController.Check",
|
|
|
|
"parameters": [
|
2024-08-26 12:08:43 +02:00
|
|
|
{
|
|
|
|
"in": "path",
|
2024-09-04 17:32:30 +02:00
|
|
|
"name": "id",
|
2024-08-26 12:08:43 +02:00
|
|
|
"description": "id of the datacenter",
|
|
|
|
"type": "string"
|
|
|
|
},
|
2024-08-13 11:17:09 +02:00
|
|
|
{
|
|
|
|
"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"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "",
|
|
|
|
"schema": {
|
|
|
|
"$ref": "#/definitions/models.object"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2024-11-13 08:10:20 +01:00
|
|
|
"/booking/search/{start_date}/{end_date}": {
|
2024-08-13 11:17:09 +02:00
|
|
|
"get": {
|
|
|
|
"tags": [
|
|
|
|
"booking"
|
|
|
|
],
|
2024-11-13 08:10:20 +01:00
|
|
|
"description": "search bookings\n\u003cbr\u003e",
|
2024-08-13 11:17:09 +02:00
|
|
|
"operationId": "BookingController.Search",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"in": "path",
|
2024-11-13 08:10:20 +01:00
|
|
|
"name": "start_date",
|
|
|
|
"description": "the word search you want to get",
|
|
|
|
"required": true,
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"in": "path",
|
|
|
|
"name": "end_date",
|
2024-08-13 11:17:09 +02:00
|
|
|
"description": "the word search you want to get",
|
|
|
|
"required": true,
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
2024-11-13 08:10:20 +01:00
|
|
|
"description": "{workspace} models.workspace"
|
2024-08-13 11:17:09 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"/version/": {
|
|
|
|
"get": {
|
|
|
|
"tags": [
|
|
|
|
"version"
|
|
|
|
],
|
|
|
|
"description": "get version\n\u003cbr\u003e",
|
|
|
|
"operationId": "VersionController.GetAll",
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-08-21 12:04:12 +02:00
|
|
|
},
|
|
|
|
"/version/status": {
|
|
|
|
"get": {
|
|
|
|
"tags": [
|
|
|
|
"version"
|
|
|
|
],
|
|
|
|
"description": "get status\n\u003cbr\u003e",
|
|
|
|
"operationId": "VersionController.Status",
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-08-13 11:17:09 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"definitions": {
|
|
|
|
"models.object": {
|
|
|
|
"title": "object",
|
|
|
|
"type": "object"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"tags": [
|
|
|
|
{
|
|
|
|
"name": "booking",
|
|
|
|
"description": "Operations about workspace\n"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "version",
|
|
|
|
"description": "VersionController operations for Version\n"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|