2024-07-26 13:07:25 +02:00
|
|
|
swagger: "2.0"
|
|
|
|
|
info:
|
2024-09-05 09:22:06 +02:00
|
|
|
title: oc-catalog
|
2024-07-26 13:07:25 +02:00
|
|
|
description: |
|
2024-09-05 09:22:06 +02:00
|
|
|
OpenCloud catalog
|
2024-07-26 13:07:25 +02:00
|
|
|
version: 1.0.0
|
2024-09-05 09:22:06 +02:00
|
|
|
termsOfService: http://cloud.o-forge.io/
|
2024-07-26 13:07:25 +02:00
|
|
|
contact:
|
2024-09-05 09:22:06 +02:00
|
|
|
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
|
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
|
2024-07-26 14:39:57 +02:00
|
|
|
description: |-
|
2025-01-17 17:03:32 +01:00
|
|
|
get list of Infrastructure
|
2024-07-26 14:39:57 +02:00
|
|
|
<br>
|
2025-01-17 17:03:32 +01:00
|
|
|
operationId: EnumController.BookingStatus
|
2024-07-26 14:39:57 +02:00
|
|
|
responses:
|
|
|
|
|
"200":
|
2025-01-17 17:03:32 +01:00
|
|
|
description: '{resource} models.resource'
|
|
|
|
|
/enum/infrastructure:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- enum
|
|
|
|
|
description: |-
|
|
|
|
|
get list of Infrastructure
|
|
|
|
|
<br>
|
|
|
|
|
operationId: EnumController.EnumInfrastructure
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{resource} models.resource'
|
|
|
|
|
/enum/pricing/refund/type:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- enum
|
|
|
|
|
description: |-
|
|
|
|
|
get list of status
|
|
|
|
|
<br>
|
|
|
|
|
operationId: EnumController.EnumRefundType
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{resource} models.resource'
|
|
|
|
|
/enum/pricing/strategy/buy:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- enum
|
|
|
|
|
description: |-
|
|
|
|
|
get list of status
|
|
|
|
|
<br>
|
|
|
|
|
operationId: EnumController.EnumStrategyBuy
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{resource} models.resource'
|
|
|
|
|
/enum/pricing/strategy/data:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- enum
|
|
|
|
|
description: |-
|
|
|
|
|
get list of status
|
|
|
|
|
<br>
|
|
|
|
|
operationId: EnumController.EnumStrategyData
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{resource} models.resource'
|
|
|
|
|
/enum/pricing/strategy/privilege:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- enum
|
|
|
|
|
description: |-
|
|
|
|
|
get list of status
|
|
|
|
|
<br>
|
|
|
|
|
operationId: EnumController.EnumStrategyPrivilege
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{resource} models.resource'
|
|
|
|
|
/enum/pricing/strategy/privilege/storage:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- enum
|
|
|
|
|
description: |-
|
|
|
|
|
get list of status
|
|
|
|
|
<br>
|
|
|
|
|
operationId: EnumController.EnumStrategyPrivilegeStorage
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{resource} models.resource'
|
|
|
|
|
/enum/pricing/strategy/storage:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- enum
|
|
|
|
|
description: |-
|
|
|
|
|
get list of status
|
|
|
|
|
<br>
|
|
|
|
|
operationId: EnumController.EnumStrategyStorage
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{resource} models.resource'
|
|
|
|
|
/enum/pricing/strategy/time:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- enum
|
|
|
|
|
description: |-
|
|
|
|
|
get list of status
|
|
|
|
|
<br>
|
|
|
|
|
operationId: EnumController.EnumStrategyTime
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{resource} models.resource'
|
|
|
|
|
/enum/resource/type:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- enum
|
|
|
|
|
description: |-
|
|
|
|
|
get list of status
|
|
|
|
|
<br>
|
|
|
|
|
operationId: EnumController.EnumResourceType
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{resource} models.resource'
|
|
|
|
|
/enum/status:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- enum
|
|
|
|
|
description: |-
|
|
|
|
|
get list of status
|
|
|
|
|
<br>
|
|
|
|
|
operationId: EnumController.EnumStatus
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{resource} models.resource'
|
|
|
|
|
/enum/storage/size:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- enum
|
|
|
|
|
description: |-
|
|
|
|
|
get list of StorageSize
|
|
|
|
|
<br>
|
|
|
|
|
operationId: EnumController.EnumStorageSize
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{resource} models.resource'
|
|
|
|
|
/enum/storage/type:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- enum
|
|
|
|
|
description: |-
|
|
|
|
|
get list of StorageType
|
|
|
|
|
<br>
|
|
|
|
|
operationId: EnumController.EnumStorageType
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{resource} models.resource'
|
2026-01-12 14:37:37 +01:00
|
|
|
/generic/:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- generic
|
|
|
|
|
description: |-
|
|
|
|
|
find compute by id
|
|
|
|
|
<br>
|
|
|
|
|
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"'
|
|
|
|
|
/purchase/:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- purchase
|
|
|
|
|
description: |-
|
|
|
|
|
find compute by id
|
|
|
|
|
<br>
|
|
|
|
|
operationId: PurchaseController.GetAll
|
|
|
|
|
parameters:
|
|
|
|
|
- in: query
|
|
|
|
|
name: is_draft
|
|
|
|
|
description: draft wished
|
|
|
|
|
type: string
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{compute} models.compute'
|
|
|
|
|
post:
|
|
|
|
|
tags:
|
|
|
|
|
- purchase
|
|
|
|
|
description: |-
|
|
|
|
|
create compute
|
|
|
|
|
<br>
|
|
|
|
|
operationId: PurchaseController.Create
|
|
|
|
|
parameters:
|
|
|
|
|
- in: body
|
|
|
|
|
name: compute
|
|
|
|
|
description: body for compute content (Json format)
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/definitions/json'
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{compute} models.compute'
|
|
|
|
|
/purchase/{id}:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- purchase
|
|
|
|
|
description: |-
|
|
|
|
|
find compute by id
|
|
|
|
|
<br>
|
|
|
|
|
operationId: PurchaseController.Get
|
|
|
|
|
parameters:
|
|
|
|
|
- in: path
|
|
|
|
|
name: id
|
|
|
|
|
description: the id you want to get
|
|
|
|
|
required: true
|
|
|
|
|
type: string
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{compute} models.compute'
|
|
|
|
|
/purchase/search/{search}:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- purchase
|
|
|
|
|
description: |-
|
|
|
|
|
find compute by key word
|
|
|
|
|
<br>
|
|
|
|
|
operationId: PurchaseController.Get
|
|
|
|
|
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":
|
|
|
|
|
description: '{compute} models.compute'
|
2026-04-01 15:56:05 +02:00
|
|
|
/resource/{type}:
|
2024-07-26 14:39:57 +02:00
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- resource
|
|
|
|
|
description: |-
|
2026-04-01 15:56:05 +02:00
|
|
|
list all resources across all types
|
2024-07-26 14:39:57 +02:00
|
|
|
<br>
|
|
|
|
|
operationId: ResourceController.GetAll
|
2025-01-17 17:03:32 +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
|
2025-01-17 17:03:32 +01:00
|
|
|
- in: query
|
|
|
|
|
name: is_draft
|
|
|
|
|
description: draft wished
|
|
|
|
|
type: string
|
2024-07-26 14:39:57 +02:00
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{resource} models.resource'
|
2026-04-01 15:56:05 +02:00
|
|
|
post:
|
2024-07-26 14:39:57 +02:00
|
|
|
tags:
|
|
|
|
|
- resource
|
|
|
|
|
description: |-
|
2026-04-01 15:56:05 +02:00
|
|
|
search resources across all types
|
2024-07-26 14:39:57 +02:00
|
|
|
<br>
|
2026-04-01 15:56:05 +02:00
|
|
|
operationId: ResourceController.Post
|
2024-07-26 14:39:57 +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 14:39:57 +02:00
|
|
|
required: true
|
|
|
|
|
type: string
|
2026-04-01 15:56:05 +02:00
|
|
|
- in: body
|
|
|
|
|
name: data
|
|
|
|
|
description: body for data content (Json format)
|
|
|
|
|
required: true
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/definitions/json'
|
2024-07-26 14:39:57 +02:00
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: '{resource} models.resource'
|
2026-04-01 15:56:05 +02:00
|
|
|
/resource/{type}/{id}:
|
2024-07-26 14:39:57 +02:00
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- resource
|
|
|
|
|
description: |-
|
2026-04-01 15:56:05 +02:00
|
|
|
search resources across all types
|
2024-07-26 14:39:57 +02:00
|
|
|
<br>
|
|
|
|
|
operationId: ResourceController.Get
|
|
|
|
|
parameters:
|
|
|
|
|
- in: path
|
2026-04-01 15:56:05 +02:00
|
|
|
name: type
|
|
|
|
|
description: the type you want to get
|
2024-07-26 14:39:57 +02:00
|
|
|
required: true
|
|
|
|
|
type: string
|
2026-04-01 15:56:05 +02:00
|
|
|
- in: path
|
|
|
|
|
name: id
|
|
|
|
|
description: the id you want to get
|
|
|
|
|
required: true
|
2025-01-17 17:03:32 +01:00
|
|
|
type: string
|
|
|
|
|
- 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'
|
|
|
|
|
put:
|
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
|
|
|
description: |-
|
2026-04-01 15:56:05 +02:00
|
|
|
search resources across all types
|
2024-07-26 13:07:25 +02:00
|
|
|
<br>
|
2026-04-01 15:56:05 +02:00
|
|
|
operationId: ResourceController.Put
|
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
|
|
|
|
|
- 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
|
|
|
|
|
- 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
|
|
|
description: |-
|
2026-04-01 15:56:05 +02:00
|
|
|
search resources across all types
|
2024-07-26 13:07:25 +02:00
|
|
|
<br>
|
2026-04-01 15:56:05 +02:00
|
|
|
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'
|
|
|
|
|
/resource/{type}/search/{search}:
|
2026-02-12 11:33:23 +01:00
|
|
|
get:
|
|
|
|
|
tags:
|
2026-04-01 15:56:05 +02:00
|
|
|
- resource
|
2026-02-12 11:33:23 +01:00
|
|
|
description: |-
|
2026-04-01 15:56:05 +02:00
|
|
|
search resources across all types
|
2026-02-12 11:33:23 +01:00
|
|
|
<br>
|
2026-04-01 15:56:05 +02:00
|
|
|
operationId: ResourceController.Search
|
2026-02-12 11:33:23 +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-02-12 11:33:23 +01:00
|
|
|
- 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: '{resource} models.resource'
|
2024-07-26 13:07:25 +02:00
|
|
|
/version/:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- version
|
|
|
|
|
description: |-
|
|
|
|
|
get version
|
|
|
|
|
<br>
|
|
|
|
|
operationId: VersionController.GetAll
|
|
|
|
|
responses:
|
|
|
|
|
"200":
|
|
|
|
|
description: ""
|
2024-08-21 11:57:45 +02:00
|
|
|
/version/status:
|
|
|
|
|
get:
|
|
|
|
|
tags:
|
|
|
|
|
- version
|
|
|
|
|
description: |-
|
|
|
|
|
get status
|
|
|
|
|
<br>
|
|
|
|
|
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
|
|
|
|
|
- name: purchase
|
|
|
|
|
description: |
|
|
|
|
|
Operations about compute
|
2024-07-26 14:39:57 +02:00
|
|
|
- name: resource
|
|
|
|
|
description: |
|
2026-04-01 15:56:05 +02:00
|
|
|
ResourceController aggregates all resource types.
|
2025-01-17 17:03:32 +01:00
|
|
|
- name: enum
|
|
|
|
|
description: |
|
|
|
|
|
Operations about resource
|
2024-07-26 13:07:25 +02:00
|
|
|
- name: version
|
|
|
|
|
description: |
|
|
|
|
|
VersionController operations for Version
|