288 lines
7.1 KiB
YAML
288 lines
7.1 KiB
YAML
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
|
|
basePath: /oc
|
|
paths:
|
|
/:
|
|
get:
|
|
tags:
|
|
- oc-datacenter/controllersDatacenterController
|
|
description: |-
|
|
find booking by id
|
|
<br>
|
|
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'
|
|
/{type}/{id}:
|
|
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
|
|
- 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
|
|
<br>
|
|
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'
|
|
/{type}/search/{search}:
|
|
get:
|
|
tags:
|
|
- oc-datacenter/controllersDatacenterController
|
|
description: |-
|
|
search datacenter
|
|
<br>
|
|
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'
|
|
/allowed-image/:
|
|
get:
|
|
tags:
|
|
- allowed-image
|
|
description: |-
|
|
Retourne toutes les images autorisées à persister sur ce peer
|
|
<br>
|
|
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)
|
|
<br>
|
|
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
|
|
<br>
|
|
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)
|
|
<br>
|
|
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
|
|
<br>
|
|
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
|
|
<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:
|
|
allowed_image.AllowedImage:
|
|
title: AllowedImage
|
|
type: object
|
|
tags:
|
|
- name: oc-datacenter/controllersDatacenterController
|
|
description: |
|
|
Operations about workspace
|
|
- name: version
|
|
description: |
|
|
VersionController operations for Version
|
|
- name: allowed-image
|
|
description: |
|
|
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)
|