OpenAPI.yaml
Im Folgenden finden Sie die OpenAPI-Spezifikation für unsere Exporter-API. Sie dient als technisches Nachschlagewerk, in dem alle zugänglichen Ressourcen, erwartete Eingaben/Ausgaben und Konventionen für die Fehlerbehandlung aufgeführt sind.
openapi: 3.1.1
info:
title: Cloudogu CES-Exporter
description: API description for the Cloudogu CES-Exporter
version: '0.1'
servers:
- url: https://192.168.56.2/ces-exporter
description: The CES-Exporter running on a local dev-machine
security:
- ApiKeyAuth: []
paths:
/system-info:
get:
summary: Returns information about the current state of the ecosystem.
tags: [System]
responses:
"200":
description: A JSON object with of the ecosystem to export
content:
application/json:
schema:
$ref: "#/components/schemas/SystemInfo"
examples:
systemInfo:
$ref: '#/components/examples/systemInfo'
"401":
$ref: "#/components/responses/Unauthorized"
"500":
$ref: "#/components/responses/InternalError"
/configuration:
get:
summary: Returns the configuration of the exporting ecosystem.
tags: [Configuration]
responses:
"200":
description: A JSON object with the configurations of the ecosystem to export
content:
application/json:
schema:
$ref: "#/components/schemas/Configuration"
examples:
configuration:
$ref: '#/components/examples/config'
"401":
$ref: "#/components/responses/Unauthorized"
"500":
$ref: "#/components/responses/InternalError"
/export/dogu/{doguName}:
get:
summary: Gets info of the currently prepared dogu for export
parameters:
- in: path
name: doguName
schema:
type: string
required: true
description: The name of the dogu to get export information for
tags: [ Export Dogu ]
responses:
"200":
description: A JSON object with information about the volume-export of the dogu which is ready for export
content:
application/json:
schema:
$ref: "#/components/schemas/DoguExportInfo"
examples:
doguExportInfo:
$ref: '#/components/examples/doguExportInfo'
"404":
description: Not Found - there is no dogu ready for export
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
example:
code: 404
message: "Not Found message"
"401":
$ref: "#/components/responses/Unauthorized"
"500":
$ref: "#/components/responses/InternalError"
post:
summary: Prepares the given dogu for export
tags: [Export Dogu]
parameters:
- in: path
name: doguName
schema:
type: string
required: true
description: The name of the dogu to prepare for export
responses:
"200":
description: A JSON object with information about the volume-export
content:
application/json:
schema:
$ref: "#/components/schemas/DoguExportInfo"
examples:
doguExportInfo:
$ref: '#/components/examples/doguExportInfo'
"401":
$ref: "#/components/responses/Unauthorized"
"500":
$ref: "#/components/responses/InternalError"
/export/mode:
get:
summary: Gets whether the export-mode is active in this ecosystem instance
tags: [ Export-Mode ]
responses:
"200":
description: A JSON object with showing if the export-mode is active
content:
application/json:
schema:
$ref: "#/components/schemas/ModeStatus"
example:
isActive: true
"401":
$ref: "#/components/responses/Unauthorized"
"500":
$ref: "#/components/responses/InternalError"
/maintenance/mode:
get:
summary: Gets whether the maintenance-mode is active in this ecosystem instance
tags: [ Maintenance-Mode ]
responses:
"200":
description: A JSON object with showing if the maintenance-mode is active
content:
application/json:
schema:
$ref: "#/components/schemas/ModeStatus"
example:
isActive: true
"401":
$ref: "#/components/responses/Unauthorized"
"500":
$ref: "#/components/responses/InternalError"
post:
summary: Activates or deactivates the maintenance-mode the ecosystem
tags: [ Maintenance-Mode ]
requestBody:
content:
application/json:
schema:
type: object
properties:
activate:
type: boolean
message:
properties:
message:
title:
type: string
description: Title for the maintenance-mode page. Only needed when activating the maintenance-mode.
text:
type: string
description: Text for the maintenance-mode page. Only needed when activating the maintenance-mode.
required:
- activate
examples:
activate:
value:
activate: true
message:
title: "Migration in progress"
text: "This CES g to a new instance"
deactivate:
value:
activate: false
responses:
"200":
description: A JSON object with showing if the maintenance-mode is active
content:
application/json:
schema:
$ref: "#/components/schemas/ModeStatus"
example:
isActive: true
"401":
$ref: "#/components/responses/Unauthorized"
"500":
$ref: "#/components/responses/InternalError"
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-CES-EXPORTER-API-KEY
responses:
InternalError:
description: An unexpected error occurred
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
example:
code: 500
message: "Error message for internale error"
Unauthorized:
description: Unauthorized
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
example:
code: 401
message: "Unauthoorized access message"
schemas:
Error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
SystemInfo:
type: object
properties:
fqdn:
type: string
isMultinode:
type: boolean
dogus:
type: array
items:
type: object
properties:
name:
type: string
version:
type: string
volume:
type: object
properties:
sizeInBytes:
type: integer
required:
- path
- sizeInBytes
required:
- name
- version
- volume
components:
type: array
items:
type: object
properties:
name:
type: string
version:
type: string
required:
- name
- version
required:
- fqdn
- isMultinode
- dogus
Configuration:
type: object
properties:
global:
type: array
items:
$ref: "#/components/schemas/ConfigKey"
dogu:
type: array
items:
type: object
properties:
name:
type: string
normal:
type: array
items:
$ref: "#/components/schemas/ConfigKey"
local:
type: array
items:
$ref: "#/components/schemas/ConfigKey"
sensitive:
type: array
items:
$ref: "#/components/schemas/ConfigKey"
required:
- name
- normal
- local
- sensitive
backupSchedules:
type: array
items:
type: object
properties:
name:
type: string
schedule:
type: string
description: A string representing the schedule for this backup in a crontab format.
required:
- global
- dogu
ConfigKey:
type: object
properties:
key:
type: string
value:
type: string
required:
- key
- value
DoguExportInfo:
type: object
properties:
dogu:
type: string
volumePath:
type: string
exporterPort:
type: integer
required:
- dogu
- volumePath
- exporterPort
ModeStatus:
type: object
properties:
isActive:
type: boolean
required:
- isActive
examples:
systemInfo:
value:
fqdn: 192.168.56.2
isMultinode: false
dogus:
- name: official/cas
version: 7.0.8-10
volume:
sizeInBytes: 18885
- name: official/sonar
version: 9.9.7-1
volume:
sizeInBytes: 352950770
components:
- name: k8s/k8s-dogu-operator
version: 1.0.1
- name: k8s/k8s-dogu-operator-crd
version: 1.0.1
config:
value:
global:
- key: fqdn
value: "192.168.66.2"
- key: certificate/type
value: "selfsigned"
dogu:
- name: cas
normal:
- key: "logging/root"
value: "DEBUG"
- key: "ldap/host"
value: "ldap"
- key: "ldap/port"
value: "389"
local:
- key: "local_state"
value: "RUNNING"
sensitive:
- key: "sa-ldap/username"
value: "cn=cas_R0IJaN,ou=Special Users,o=coder.cloudogu.com,dc=cloudogu,dc=com"
- key: "sa-ldap/password"
value: "5cYGA5zgmFnOAwO7"
- name: usermgt
normal:
- key: "logging/root"
value: "INFO"
local: []
sensitive:
- key: "sa-cas/cas_client_id"
value: "usermgt"
backupSchedules:
- name: "daily-backup"
schedule: "0 0 * * *"
doguExportInfo:
value:
dogu: "cas"
volumePath: "/data/cas"
exporterPort: 7022