Files
oc-catalog/swagger/swagger.json

582 lines
19 KiB
Go
Raw Normal View History

2024-07-26 13:07:25 +02:00
{
"swagger": "2.0",
"info": {
"title": "oc-catalog",
"description": "OpenCloud catalog\n",
2024-07-26 13:07:25 +02:00
"version": "1.0.0",
"termsOfService": "http://cloud.o-forge.io/",
2024-07-26 13:07:25 +02:00
"contact": {
"email": "admin@o-cloud.io"
2024-07-26 13:07:25 +02:00
},
"license": {
2024-10-15 16:22:12 +02:00
"name": "AGPL",
"url": "https://www.gnu.org/licenses/agpl-3.0.html"
2024-07-26 13:07:25 +02:00
}
},
2026-04-01 15:56:05 +02:00
"basePath": "/oc",
2024-07-26 13:07:25 +02:00
"paths": {
2025-01-17 17:03:32 +01:00
"/enum/booking/status": {
"get": {
"tags": [
"enum"
],
"description": "get list of Infrastructure\n\u003cbr\u003e",
"operationId": "EnumController.BookingStatus",
"responses": {
"200": {
"description": "{resource} models.resource"
}
}
}
},
"/enum/infrastructure": {
"get": {
"tags": [
"enum"
],
"description": "get list of Infrastructure\n\u003cbr\u003e",
"operationId": "EnumController.EnumInfrastructure",
"responses": {
"200": {
"description": "{resource} models.resource"
}
}
}
},
"/enum/pricing/refund/type": {
"get": {
"tags": [
"enum"
],
"description": "get list of status\n\u003cbr\u003e",
"operationId": "EnumController.EnumRefundType",
"responses": {
"200": {
"description": "{resource} models.resource"
}
}
}
},
"/enum/pricing/strategy/buy": {
"get": {
"tags": [
"enum"
],
"description": "get list of status\n\u003cbr\u003e",
"operationId": "EnumController.EnumStrategyBuy",
"responses": {
"200": {
"description": "{resource} models.resource"
}
}
}
},
"/enum/pricing/strategy/data": {
"get": {
"tags": [
"enum"
],
"description": "get list of status\n\u003cbr\u003e",
"operationId": "EnumController.EnumStrategyData",
"responses": {
"200": {
"description": "{resource} models.resource"
}
}
}
},
"/enum/pricing/strategy/privilege": {
"get": {
"tags": [
"enum"
],
"description": "get list of status\n\u003cbr\u003e",
"operationId": "EnumController.EnumStrategyPrivilege",
"responses": {
"200": {
"description": "{resource} models.resource"
}
}
}
},
"/enum/pricing/strategy/privilege/storage": {
"get": {
"tags": [
"enum"
],
"description": "get list of status\n\u003cbr\u003e",
"operationId": "EnumController.EnumStrategyPrivilegeStorage",
"responses": {
"200": {
"description": "{resource} models.resource"
}
}
}
},
"/enum/pricing/strategy/storage": {
"get": {
"tags": [
"enum"
],
"description": "get list of status\n\u003cbr\u003e",
"operationId": "EnumController.EnumStrategyStorage",
"responses": {
"200": {
"description": "{resource} models.resource"
}
}
}
},
"/enum/pricing/strategy/time": {
"get": {
"tags": [
"enum"
],
"description": "get list of status\n\u003cbr\u003e",
"operationId": "EnumController.EnumStrategyTime",
"responses": {
"200": {
"description": "{resource} models.resource"
}
}
}
},
"/enum/resource/type": {
"get": {
"tags": [
"enum"
],
"description": "get list of status\n\u003cbr\u003e",
"operationId": "EnumController.EnumResourceType",
"responses": {
"200": {
"description": "{resource} models.resource"
}
}
}
},
"/enum/status": {
"get": {
"tags": [
"enum"
],
"description": "get list of status\n\u003cbr\u003e",
"operationId": "EnumController.EnumStatus",
"responses": {
"200": {
"description": "{resource} models.resource"
}
}
}
},
"/enum/storage/size": {
"get": {
"tags": [
"enum"
],
"description": "get list of StorageSize\n\u003cbr\u003e",
"operationId": "EnumController.EnumStorageSize",
"responses": {
"200": {
"description": "{resource} models.resource"
}
}
}
},
"/enum/storage/type": {
"get": {
"tags": [
"enum"
],
"description": "get list of StorageType\n\u003cbr\u003e",
"operationId": "EnumController.EnumStorageType",
"responses": {
"200": {
"description": "{resource} models.resource"
2024-07-26 13:07:25 +02:00
}
}
}
},
2026-01-12 14:37:37 +01:00
"/generic/": {
"get": {
"tags": [
"generic"
],
"description": "find compute by id\n\u003cbr\u003e",
"operationId": "GeneralController.GetAll",
"parameters": [
{
"in": "formData",
"name": "file",
"description": "File to upload",
"required": true,
"type": "file"
}
],
"responses": {
"200": {
"description": "{compute} models.workflow"
},
"406": {
"description": "{string} string \"Bad request\""
}
}
}
},
2026-04-01 15:56:05 +02:00
"/purchase/": {
2024-07-26 13:07:25 +02:00
"get": {
"tags": [
2026-04-01 15:56:05 +02:00
"purchase"
2024-07-26 13:07:25 +02:00
],
2026-04-01 15:56:05 +02:00
"description": "find compute by id\n\u003cbr\u003e",
"operationId": "PurchaseController.GetAll",
2025-01-17 17:03:32 +01:00
"parameters": [
{
"in": "query",
"name": "is_draft",
"description": "draft wished",
"type": "string"
}
],
2024-07-26 13:07:25 +02:00
"responses": {
"200": {
2026-04-01 15:56:05 +02:00
"description": "{compute} models.compute"
2024-07-26 13:07:25 +02:00
}
}
},
"post": {
"tags": [
2026-04-01 15:56:05 +02:00
"purchase"
2024-07-26 13:07:25 +02:00
],
2026-04-01 15:56:05 +02:00
"description": "create compute\n\u003cbr\u003e",
"operationId": "PurchaseController.Create",
2024-07-26 13:07:25 +02:00
"parameters": [
{
"in": "body",
2026-04-01 15:56:05 +02:00
"name": "compute",
"description": "body for compute content (Json format)",
2024-07-26 13:07:25 +02:00
"required": true,
"schema": {
"$ref": "#/definitions/json"
}
}
],
"responses": {
"200": {
2026-04-01 15:56:05 +02:00
"description": "{compute} models.compute"
2024-07-26 13:07:25 +02:00
}
}
}
},
2026-04-01 15:56:05 +02:00
"/purchase/search/{search}": {
2026-02-12 11:33:23 +01:00
"get": {
"tags": [
2026-04-01 15:56:05 +02:00
"purchase"
2026-02-12 11:33:23 +01:00
],
2026-04-01 15:56:05 +02:00
"description": "find compute by key word\n\u003cbr\u003e",
"operationId": "PurchaseController.Get",
2026-02-12 11:33:23 +01:00
"parameters": [
{
"in": "path",
"name": "search",
"description": "the search you want to get",
"required": true,
"type": "string"
},
{
"in": "query",
"name": "is_draft",
"description": "draft wished",
"type": "string"
}
],
"responses": {
"200": {
2026-04-01 15:56:05 +02:00
"description": "{compute} models.compute"
2026-02-12 11:33:23 +01:00
}
}
}
},
2026-04-01 15:56:05 +02:00
"/purchase/{id}": {
2024-07-26 13:07:25 +02:00
"get": {
"tags": [
2026-04-01 15:56:05 +02:00
"purchase"
2024-07-26 13:07:25 +02:00
],
2026-04-01 15:56:05 +02:00
"description": "find compute by id\n\u003cbr\u003e",
"operationId": "PurchaseController.Get",
2024-07-26 13:07:25 +02:00
"parameters": [
{
"in": "path",
"name": "id",
"description": "the id you want to get",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
2026-04-01 15:56:05 +02:00
"description": "{compute} models.compute"
2024-07-26 13:07:25 +02:00
}
}
2026-04-01 15:56:05 +02:00
}
},
"/resource/{type}": {
"get": {
2024-07-26 13:07:25 +02:00
"tags": [
2026-04-01 15:56:05 +02:00
"resource"
2024-07-26 13:07:25 +02:00
],
2026-04-01 15:56:05 +02:00
"description": "list all resources across all types\n\u003cbr\u003e",
"operationId": "ResourceController.GetAll",
2024-07-26 13:07:25 +02:00
"parameters": [
{
"in": "path",
2026-04-01 15:56:05 +02:00
"name": "type",
"description": "the type you want to get",
2024-07-26 13:07:25 +02:00
"required": true,
"type": "string"
},
2026-01-12 14:37:37 +01:00
{
"in": "query",
"name": "is_draft",
"description": "draft wished",
"type": "string"
}
],
"responses": {
"200": {
2026-04-01 15:56:05 +02:00
"description": "{resource} models.resource"
2026-01-12 14:37:37 +01:00
}
}
},
"post": {
"tags": [
2026-04-01 15:56:05 +02:00
"resource"
2026-01-12 14:37:37 +01:00
],
2026-04-01 15:56:05 +02:00
"description": "search resources across all types\n\u003cbr\u003e",
"operationId": "ResourceController.Post",
2026-01-12 14:37:37 +01:00
"parameters": [
2026-04-01 15:56:05 +02:00
{
"in": "path",
"name": "type",
"description": "the type you want to get",
"required": true,
"type": "string"
},
2026-01-12 14:37:37 +01:00
{
"in": "body",
2026-04-01 15:56:05 +02:00
"name": "data",
"description": "body for data content (Json format)",
2026-01-12 14:37:37 +01:00
"required": true,
"schema": {
"$ref": "#/definitions/json"
}
}
],
"responses": {
"200": {
2026-04-01 15:56:05 +02:00
"description": "{resource} models.resource"
2026-01-12 14:37:37 +01:00
}
}
}
},
2026-04-01 15:56:05 +02:00
"/resource/{type}/search/{search}": {
2026-01-12 14:37:37 +01:00
"get": {
"tags": [
2026-04-01 15:56:05 +02:00
"resource"
2026-01-12 14:37:37 +01:00
],
2026-04-01 15:56:05 +02:00
"description": "search resources across all types\n\u003cbr\u003e",
"operationId": "ResourceController.Search",
2026-01-12 14:37:37 +01:00
"parameters": [
{
"in": "path",
2026-04-01 15:56:05 +02:00
"name": "type",
"description": "the type you want to get",
2026-01-12 14:37:37 +01:00
"required": true,
"type": "string"
},
{
"in": "path",
2026-04-01 15:56:05 +02:00
"name": "search",
"description": "the search you want to get",
2026-01-12 14:37:37 +01:00
"required": true,
"type": "string"
2026-04-01 15:56:05 +02:00
},
2025-01-17 17:03:32 +01:00
{
"in": "query",
"name": "is_draft",
"description": "draft wished",
"type": "string"
}
],
"responses": {
"200": {
2024-07-30 10:07:34 +02:00
"description": "{resource} models.resource"
}
}
}
},
2026-04-01 15:56:05 +02:00
"/resource/{type}/{id}": {
"get": {
"tags": [
"resource"
],
2026-04-01 15:56:05 +02:00
"description": "search resources across all types\n\u003cbr\u003e",
"operationId": "ResourceController.Get",
"parameters": [
{
"in": "path",
2026-04-01 15:56:05 +02:00
"name": "type",
"description": "the type you want to get",
"required": true,
"type": "string"
2026-02-12 11:33:23 +01:00
},
{
"in": "path",
"name": "id",
2026-02-12 11:33:23 +01:00
"description": "the id you want to get",
"required": true,
"type": "string"
2026-04-01 15:56:05 +02:00
},
2025-01-17 17:03:32 +01:00
{
"in": "query",
"name": "is_draft",
"description": "draft wished",
"type": "string"
}
],
2024-07-26 13:07:25 +02:00
"responses": {
"200": {
2026-04-01 15:56:05 +02:00
"description": "{resource} models.resource"
2024-07-26 13:07:25 +02:00
}
}
},
2026-04-01 15:56:05 +02:00
"put": {
2026-02-12 11:33:23 +01:00
"tags": [
2026-04-01 15:56:05 +02:00
"resource"
2026-02-12 11:33:23 +01:00
],
2026-04-01 15:56:05 +02:00
"description": "search resources across all types\n\u003cbr\u003e",
"operationId": "ResourceController.Put",
2026-02-12 11:33:23 +01:00
"parameters": [
{
"in": "path",
2026-04-01 15:56:05 +02:00
"name": "type",
"description": "the type you want to get",
2026-02-12 11:33:23 +01:00
"required": true,
"type": "string"
},
2024-07-26 13:07:25 +02:00
{
"in": "path",
"name": "id",
"description": "the id you want to get",
"required": true,
"type": "string"
},
{
"in": "body",
2026-04-01 15:56:05 +02:00
"name": "data",
"description": "body for data content (Json format)",
2024-07-26 13:07:25 +02:00
"required": true,
"schema": {
2026-04-01 15:56:05 +02:00
"$ref": "#/definitions/json"
2024-07-26 13:07:25 +02:00
}
}
],
"responses": {
"200": {
2026-04-01 15:56:05 +02:00
"description": "{resource} models.resource"
2024-07-26 13:07:25 +02:00
}
}
},
"delete": {
"tags": [
2026-04-01 15:56:05 +02:00
"resource"
2024-07-26 13:07:25 +02:00
],
2026-04-01 15:56:05 +02:00
"description": "search resources across all types\n\u003cbr\u003e",
"operationId": "ResourceController.Delete",
2024-07-26 13:07:25 +02:00
"parameters": [
2026-04-01 15:56:05 +02:00
{
"in": "path",
"name": "type",
"description": "the type you want to get",
"required": true,
"type": "string"
},
2024-07-26 13:07:25 +02:00
{
"in": "path",
"name": "id",
2026-04-01 15:56:05 +02:00
"description": "the id you want to get",
2024-07-26 13:07:25 +02:00
"required": true,
"type": "string"
2026-04-01 15:56:05 +02:00
},
{
"in": "query",
"name": "is_draft",
"description": "draft wished",
"type": "string"
2024-07-26 13:07:25 +02:00
}
],
"responses": {
"200": {
2026-04-01 15:56:05 +02:00
"description": "{resource} models.resource"
2024-07-26 13:07:25 +02:00
}
}
}
},
"/version/": {
"get": {
"tags": [
"version"
],
"description": "get version\n\u003cbr\u003e",
"operationId": "VersionController.GetAll",
"responses": {
"200": {
"description": ""
}
2024-08-21 11:57:45 +02:00
}
}
},
"/version/status": {
"get": {
"tags": [
"version"
],
"description": "get status\n\u003cbr\u003e",
"operationId": "VersionController.Status",
"responses": {
"200": {
"description": ""
}
2024-07-26 13:07:25 +02:00
}
}
}
},
"definitions": {
"json": {
"title": "json",
"type": "object"
}
},
"tags": [
2026-01-12 14:37:37 +01:00
{
"name": "generic",
"description": "Operations about compute\n"
},
{
"name": "purchase",
"description": "Operations about compute\n"
},
{
"name": "resource",
2026-04-01 15:56:05 +02:00
"description": "ResourceController aggregates all resource types.\n"
2024-07-26 13:07:25 +02:00
},
2025-01-17 17:03:32 +01:00
{
"name": "enum",
"description": "Operations about resource\n"
},
2024-07-26 13:07:25 +02:00
{
"name": "version",
"description": "VersionController operations for Version\n"
}
]
}