Files
oc-datacenter/swagger/swagger.yml

344 lines
8.5 KiB
YAML
Raw Normal View History

2026-01-08 10:40:37 +01:00
swagger: "2.0"
info:
title: oc-datacenter
description: |
Monitor owned datacenter activity
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
2026-04-09 07:49:35 +02:00
basePath: /oc
2026-01-08 10:40:37 +01:00
paths:
/:
get:
tags:
- oc-datacenter/controllersDatacenterController
description: |-
find booking by id
<br>
operationId: DatacenterController.GetAll
parameters:
2026-04-09 07:49:35 +02:00
- in: path
name: type
description: the word type you want to get
required: true
type: string
2026-01-08 10:40:37 +01:00
- in: query
name: is_draft
description: draft wished
type: string
2026-04-09 07:49:35 +02:00
- in: query
name: offset
description: "false"
type: string
- in: query
name: limit
description: "false"
type: string
2026-01-08 10:40:37 +01:00
responses:
"200":
description: '{booking} models.booking'
2026-04-10 15:20:41 +02:00
/{type}:
post:
tags:
- oc-datacenter/controllersDatacenterController
description: |-
search resources across all types
<br>
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'
2026-04-09 07:49:35 +02:00
/{type}/{id}:
2026-01-08 10:40:37 +01:00
get:
tags:
- oc-datacenter/controllersDatacenterController
description: |-
find booking by id
<br>
operationId: DatacenterController.Get
parameters:
- in: path
name: id
description: the id you want to get
required: true
type: string
2026-04-09 07:49:35 +02:00
- in: path
name: type
description: the word type you want to get
required: true
type: string
2026-01-08 10:40:37 +01:00
- in: query
name: is_draft
description: draft wished
type: string
responses:
"200":
description: '{booking} models.booking'
2026-04-09 07:49:35 +02:00
delete:
2026-01-08 10:40:37 +01:00
tags:
2026-04-09 07:49:35 +02:00
- oc-datacenter/controllersDatacenterController
description: |-
find booking by id
<br>
operationId: DatacenterController.Delete
2026-01-08 10:40:37 +01:00
parameters:
- in: path
2026-04-09 07:49:35 +02:00
name: id
description: the id you want to get
2026-01-08 10:40:37 +01:00
required: true
type: string
- in: path
2026-04-09 07:49:35 +02:00
name: type
description: the word type you want to get
2026-01-08 10:40:37 +01:00
required: true
type: string
2026-04-09 07:49:35 +02:00
- in: query
name: is_draft
description: draft wished
2026-01-08 10:40:37 +01:00
type: string
responses:
"200":
2026-04-09 07:49:35 +02:00
description: '{booking} models.booking'
2026-04-10 15:20:41 +02:00
/{type}/extended/search:
post:
tags:
- oc-datacenter/controllersDatacenterController
description: |-
search workspace
<br>
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'
2026-04-09 07:49:35 +02:00
/{type}/search/{search}:
get:
2026-01-08 10:40:37 +01:00
tags:
2026-04-09 07:49:35 +02:00
- oc-datacenter/controllersDatacenterController
2026-01-08 10:40:37 +01:00
description: |-
2026-04-09 07:49:35 +02:00
search datacenter
2026-01-08 10:40:37 +01:00
<br>
2026-04-09 07:49:35 +02:00
operationId: DatacenterController.Search
2026-01-08 10:40:37 +01:00
parameters:
- in: path
2026-04-09 07:49:35 +02:00
name: type
description: the type you want to get
2026-01-08 10:40:37 +01:00
required: true
type: string
- in: path
2026-04-09 07:49:35 +02:00
name: search
description: the word search you want to get
2026-01-08 10:40:37 +01:00
required: true
type: string
- in: query
name: is_draft
description: draft wished
type: string
2026-04-09 07:49:35 +02:00
- in: query
name: offset
description: "false"
2026-01-08 10:40:37 +01:00
type: string
- in: query
2026-04-09 07:49:35 +02:00
name: limit
description: "false"
2026-01-08 10:40:37 +01:00
type: string
responses:
"200":
2026-04-09 07:49:35 +02:00
description: '{workspace} models.workspace'
/allowed-image/:
2026-01-08 10:40:37 +01:00
get:
tags:
2026-04-09 07:49:35 +02:00
- allowed-image
2026-01-08 10:40:37 +01:00
description: |-
2026-04-09 07:49:35 +02:00
Retourne toutes les images autorisées à persister sur ce peer
2026-01-08 10:40:37 +01:00
<br>
2026-04-09 07:49:35 +02:00
operationId: AllowedImageController.GetAll
2026-01-08 10:40:37 +01:00
parameters:
2026-04-09 07:49:35 +02:00
- in: query
name: offset
description: "false"
type: string
- in: query
name: limit
description: "false"
2026-01-08 10:40:37 +01:00
type: string
responses:
"200":
2026-04-09 07:49:35 +02:00
description: ""
schema:
type: array
items:
$ref: '#/definitions/allowed_image.AllowedImage'
post:
2026-01-08 10:40:37 +01:00
tags:
2026-04-09 07:49:35 +02:00
- allowed-image
2026-01-08 10:40:37 +01:00
description: |-
2026-04-09 07:49:35 +02:00
Ajoute une image à la liste des images autorisées (peer admin uniquement)
2026-01-08 10:40:37 +01:00
<br>
2026-04-09 07:49:35 +02:00
operationId: AllowedImageController.Post
2026-01-08 10:40:37 +01:00
parameters:
- in: body
name: body
2026-04-09 07:49:35 +02:00
description: Image à autoriser
2026-01-08 10:40:37 +01:00
required: true
schema:
2026-04-09 07:49:35 +02:00
$ref: '#/definitions/allowed_image.AllowedImage'
2026-01-08 10:40:37 +01:00
responses:
"200":
2026-04-09 07:49:35 +02:00
description: ""
schema:
$ref: '#/definitions/allowed_image.AllowedImage'
/allowed-image/{id}:
2026-01-08 10:40:37 +01:00
get:
tags:
2026-04-09 07:49:35 +02:00
- allowed-image
2026-01-08 10:40:37 +01:00
description: |-
2026-04-09 07:49:35 +02:00
Retourne une image autorisée par son ID
2026-01-08 10:40:37 +01:00
<br>
2026-04-09 07:49:35 +02:00
operationId: AllowedImageController.Get
2026-01-08 10:40:37 +01:00
parameters:
- in: path
name: id
2026-04-09 07:49:35 +02:00
description: ID de l'image autorisée
required: true
2026-01-08 10:40:37 +01:00
type: string
responses:
"200":
description: ""
schema:
2026-04-09 07:49:35 +02:00
$ref: '#/definitions/allowed_image.AllowedImage'
delete:
2026-01-08 10:40:37 +01:00
tags:
2026-04-09 07:49:35 +02:00
- allowed-image
2026-01-08 10:40:37 +01:00
description: |-
2026-04-09 07:49:35 +02:00
Supprime une image de la liste des images autorisées (peer admin uniquement, entrées bootstrap non supprimables)
2026-01-08 10:40:37 +01:00
<br>
2026-04-09 07:49:35 +02:00
operationId: AllowedImageController.Delete
2026-01-08 10:40:37 +01:00
parameters:
- in: path
2026-04-09 07:49:35 +02:00
name: id
description: ID de l'image autorisée
2026-01-08 10:40:37 +01:00
required: true
type: string
responses:
"200":
2026-04-09 07:49:35 +02:00
description: ""
schema:
$ref: '#/definitions/allowed_image.AllowedImage'
/logs/{id}:
2026-01-08 10:40:37 +01:00
get:
tags:
2026-04-09 07:49:35 +02:00
- oc-datacenter/controllersDatacenterController
2026-01-08 10:40:37 +01:00
description: |-
2026-04-09 07:49:35 +02:00
find booking by id
2026-01-08 10:40:37 +01:00
<br>
2026-04-09 07:49:35 +02:00
operationId: DatacenterController.Log
2026-01-08 10:40:37 +01:00
parameters:
- in: path
name: id
2026-04-09 07:49:35 +02:00
description: the id you want to get
2026-01-08 10:40:37 +01:00
required: true
type: string
responses:
"200":
2026-04-09 07:49:35 +02:00
description: '{booking} models.booking'
2026-01-08 10:40:37 +01:00
/session/token/{id}/{duration}:
get:
tags:
- session
description: |-
find booking by id
<br>
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
<br>
operationId: VersionController.GetAll
responses:
"200":
description: ""
/version/status:
get:
tags:
- version
description: |-
get status
<br>
operationId: VersionController.Status
responses:
"200":
description: ""
definitions:
2026-04-09 07:49:35 +02:00
allowed_image.AllowedImage:
title: AllowedImage
2026-01-08 10:40:37 +01:00
type: object
2026-04-10 15:20:41 +02:00
json:
title: json
type: object
2026-01-08 10:40:37 +01:00
tags:
- name: oc-datacenter/controllersDatacenterController
description: |
Operations about workspace
- name: version
description: |
VersionController operations for Version
2026-04-09 07:49:35 +02:00
- name: allowed-image
2026-01-08 10:40:37 +01:00
description: |
2026-04-09 07:49:35 +02:00
AllowedImageController gère la liste locale des images autorisées à persister
sur ce peer après l'exécution d'un workflow.
GET /allowed-image/ → tous les utilisateurs authentifiés
GET /allowed-image/:id → tous les utilisateurs authentifiés
POST /allowed-image/ → peer admin uniquement
DELETE /allowed-image/:id → peer admin uniquement (bloqué si IsDefault)