{ "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": "path", "name": "type", "description": "the word type you want to get", "required": true, "type": "string" }, { "in": "query", "name": "is_draft", "description": "draft wished", "type": "string" }, { "in": "query", "name": "offset", "description": "false", "type": "string" }, { "in": "query", "name": "limit", "description": "false", "type": "string" } ], "responses": { "200": { "description": "{booking} models.booking" } } } }, "/allowed-image/": { "get": { "tags": [ "allowed-image" ], "description": "Retourne toutes les images autorisées à persister sur ce peer\n\u003cbr\u003e", "operationId": "AllowedImageController.GetAll", "parameters": [ { "in": "query", "name": "offset", "description": "false", "type": "string" }, { "in": "query", "name": "limit", "description": "false", "type": "string" } ], "responses": { "200": { "description": "", "schema": { "type": "array", "items": { "$ref": "#/definitions/allowed_image.AllowedImage" } } } } }, "post": { "tags": [ "allowed-image" ], "description": "Ajoute une image à la liste des images autorisées (peer admin uniquement)\n\u003cbr\u003e", "operationId": "AllowedImageController.Post", "parameters": [ { "in": "body", "name": "body", "description": "Image à autoriser", "required": true, "schema": { "$ref": "#/definitions/allowed_image.AllowedImage" } } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/allowed_image.AllowedImage" } } } } }, "/allowed-image/{id}": { "get": { "tags": [ "allowed-image" ], "description": "Retourne une image autorisée par son ID\n\u003cbr\u003e", "operationId": "AllowedImageController.Get", "parameters": [ { "in": "path", "name": "id", "description": "ID de l'image autorisée", "required": true, "type": "string" } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/allowed_image.AllowedImage" } } } }, "delete": { "tags": [ "allowed-image" ], "description": "Supprime une image de la liste des images autorisées (peer admin uniquement, entrées bootstrap non supprimables)\n\u003cbr\u003e", "operationId": "AllowedImageController.Delete", "parameters": [ { "in": "path", "name": "id", "description": "ID de l'image autorisée", "required": true, "type": "string" } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/allowed_image.AllowedImage" } } } } }, "/logs/{id}": { "get": { "tags": [ "oc-datacenter/controllersDatacenterController" ], "description": "find booking by id\n\u003cbr\u003e", "operationId": "DatacenterController.Log", "parameters": [ { "in": "path", "name": "id", "description": "the id you want to get", "required": true, "type": "string" } ], "responses": { "200": { "description": "{booking} models.booking" } } } }, "/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": "" } } } }, "/{type}": { "post": { "tags": [ "oc-datacenter/controllersDatacenterController" ], "description": "search resources across all types\n\u003cbr\u003e", "operationId": "DatacenterController.Post", "parameters": [ { "in": "path", "name": "type", "description": "the type you want to get", "required": true, "type": "string" }, { "in": "body", "name": "data", "description": "body for data content (Json format)", "required": true, "schema": { "$ref": "#/definitions/json" } } ], "responses": { "200": { "description": "{resource} models.resource" } } } }, "/{type}/extended/search": { "post": { "tags": [ "oc-datacenter/controllersDatacenterController" ], "description": "search workspace\n\u003cbr\u003e", "operationId": "DatacenterController.Search", "parameters": [ { "in": "query", "name": "is_draft", "description": "false", "type": "string" }, { "in": "query", "name": "offset", "description": "false", "type": "string" }, { "in": "query", "name": "limit", "description": "false", "type": "string" }, { "in": "body", "name": "data", "description": "body for data content (Json format)", "required": true, "schema": { "$ref": "#/definitions/json" } } ], "responses": { "200": { "description": "{workspace} models.workspace" } } } }, "/{type}/search/{search}": { "get": { "tags": [ "oc-datacenter/controllersDatacenterController" ], "description": "search datacenter\n\u003cbr\u003e", "operationId": "DatacenterController.Search", "parameters": [ { "in": "path", "name": "type", "description": "the type you want to get", "required": true, "type": "string" }, { "in": "path", "name": "search", "description": "the word search you want to get", "required": true, "type": "string" }, { "in": "query", "name": "is_draft", "description": "draft wished", "type": "string" }, { "in": "query", "name": "offset", "description": "false", "type": "string" }, { "in": "query", "name": "limit", "description": "false", "type": "string" } ], "responses": { "200": { "description": "{workspace} models.workspace" } } } }, "/{type}/{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": "path", "name": "type", "description": "the word type you want to get", "required": true, "type": "string" }, { "in": "query", "name": "is_draft", "description": "draft wished", "type": "string" } ], "responses": { "200": { "description": "{booking} models.booking" } } }, "delete": { "tags": [ "oc-datacenter/controllersDatacenterController" ], "description": "find booking by id\n\u003cbr\u003e", "operationId": "DatacenterController.Delete", "parameters": [ { "in": "path", "name": "id", "description": "the id you want to get", "required": true, "type": "string" }, { "in": "path", "name": "type", "description": "the word type 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": { "allowed_image.AllowedImage": { "title": "AllowedImage", "type": "object" }, "json": { "title": "json", "type": "object" } }, "tags": [ { "name": "oc-datacenter/controllersDatacenterController", "description": "Operations about workspace\n" }, { "name": "version", "description": "VersionController operations for Version\n" }, { "name": "allowed-image", "description": "AllowedImageController gère la liste locale des images autorisées à persister\nsur ce peer après l'exécution d'un workflow.\n\nGET /allowed-image/ → tous les utilisateurs authentifiés\nGET /allowed-image/:id → tous les utilisateurs authentifiés\nPOST /allowed-image/ → peer admin uniquement\nDELETE /allowed-image/:id → peer admin uniquement (bloqué si IsDefault)\n" } ] }