mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00
2599 lines
67 KiB
YAML
2599 lines
67 KiB
YAML
basePath: /api/v2
|
|
definitions:
|
|
api.ResponseAuthenticate:
|
|
type: object
|
|
api.ResponseConfig:
|
|
type: object
|
|
api.ResponseConfigs:
|
|
type: object
|
|
api.ResponseDashboard:
|
|
type: object
|
|
api.ResponseDashboards:
|
|
type: object
|
|
api.ResponseError:
|
|
type: object
|
|
api.ResponseFile:
|
|
type: object
|
|
api.ResponseFiles:
|
|
type: object
|
|
api.ResponseIC:
|
|
type: object
|
|
api.ResponseICs:
|
|
type: object
|
|
api.ResponseResult:
|
|
type: object
|
|
api.ResponseResults:
|
|
type: object
|
|
api.ResponseScenario:
|
|
type: object
|
|
api.ResponseScenarios:
|
|
type: object
|
|
api.ResponseSignal:
|
|
type: object
|
|
api.ResponseSignals:
|
|
type: object
|
|
api.ResponseUser:
|
|
type: object
|
|
api.ResponseUsers:
|
|
type: object
|
|
api.ResponseWidget:
|
|
type: object
|
|
api.ResponseWidgets:
|
|
type: object
|
|
component_configuration.addConfigRequest:
|
|
properties:
|
|
config:
|
|
$ref: '#/definitions/component_configuration.validNewConfig'
|
|
type: object
|
|
component_configuration.updateConfigRequest:
|
|
properties:
|
|
config:
|
|
$ref: '#/definitions/component_configuration.validUpdatedConfig'
|
|
type: object
|
|
component_configuration.validNewConfig:
|
|
properties:
|
|
FileIDs:
|
|
items:
|
|
type: integer
|
|
type: array
|
|
ICID:
|
|
type: integer
|
|
Name:
|
|
type: string
|
|
ScenarioID:
|
|
type: integer
|
|
StartParameters:
|
|
$ref: '#/definitions/postgres.Jsonb'
|
|
required:
|
|
- ICID
|
|
- Name
|
|
- ScenarioID
|
|
- StartParameters
|
|
type: object
|
|
component_configuration.validUpdatedConfig:
|
|
properties:
|
|
FileIDs:
|
|
items:
|
|
type: integer
|
|
type: array
|
|
ICID:
|
|
type: integer
|
|
Name:
|
|
type: string
|
|
StartParameters:
|
|
$ref: '#/definitions/postgres.Jsonb'
|
|
type: object
|
|
config.Config:
|
|
properties:
|
|
authentication:
|
|
$ref: '#/definitions/config.ConfigAuthentication'
|
|
contact:
|
|
$ref: '#/definitions/config.ConfigContact'
|
|
mode:
|
|
type: string
|
|
sub_title:
|
|
type: string
|
|
title:
|
|
type: string
|
|
type: object
|
|
config.ConfigAuthentication:
|
|
properties:
|
|
external:
|
|
$ref: '#/definitions/config.ConfigAuthenticationExternal'
|
|
logout_url:
|
|
type: string
|
|
type: object
|
|
config.ConfigAuthenticationExternal:
|
|
properties:
|
|
authorize_url:
|
|
type: string
|
|
enabled:
|
|
type: boolean
|
|
provider_name:
|
|
type: string
|
|
type: object
|
|
config.ConfigContact:
|
|
properties:
|
|
mail:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type: object
|
|
dashboard.addDashboardRequest:
|
|
properties:
|
|
dashboard:
|
|
$ref: '#/definitions/dashboard.validNewDashboard'
|
|
type: object
|
|
dashboard.updateDashboardRequest:
|
|
properties:
|
|
dashboard:
|
|
$ref: '#/definitions/dashboard.validUpdatedDashboard'
|
|
type: object
|
|
dashboard.validNewDashboard:
|
|
properties:
|
|
Grid:
|
|
type: integer
|
|
Height:
|
|
type: integer
|
|
Name:
|
|
type: string
|
|
ScenarioID:
|
|
type: integer
|
|
required:
|
|
- Grid
|
|
- Name
|
|
- ScenarioID
|
|
type: object
|
|
dashboard.validUpdatedDashboard:
|
|
properties:
|
|
grid:
|
|
type: integer
|
|
height:
|
|
type: integer
|
|
name:
|
|
type: string
|
|
type: object
|
|
infrastructure_component.AddICRequest:
|
|
properties:
|
|
ic:
|
|
$ref: '#/definitions/infrastructure_component.validNewIC'
|
|
type: object
|
|
infrastructure_component.UpdateICRequest:
|
|
properties:
|
|
ic:
|
|
$ref: '#/definitions/infrastructure_component.validUpdatedIC'
|
|
type: object
|
|
infrastructure_component.validNewIC:
|
|
properties:
|
|
APIURL:
|
|
type: string
|
|
Category:
|
|
type: string
|
|
Description:
|
|
type: string
|
|
Location:
|
|
type: string
|
|
ManagedExternally:
|
|
type: boolean
|
|
Name:
|
|
type: string
|
|
StartParameterScheme:
|
|
$ref: '#/definitions/postgres.Jsonb'
|
|
State:
|
|
type: string
|
|
StatusUpdateRaw:
|
|
$ref: '#/definitions/postgres.Jsonb'
|
|
Type:
|
|
type: string
|
|
UUID:
|
|
type: string
|
|
Uptime:
|
|
type: number
|
|
WebsocketURL:
|
|
type: string
|
|
required:
|
|
- Category
|
|
- ManagedExternally
|
|
- Name
|
|
- Type
|
|
type: object
|
|
infrastructure_component.validUpdatedIC:
|
|
properties:
|
|
APIURL:
|
|
type: string
|
|
Category:
|
|
type: string
|
|
Description:
|
|
type: string
|
|
Location:
|
|
type: string
|
|
Name:
|
|
type: string
|
|
StartParameterScheme:
|
|
$ref: '#/definitions/postgres.Jsonb'
|
|
State:
|
|
type: string
|
|
StatusUpdateRaw:
|
|
$ref: '#/definitions/postgres.Jsonb'
|
|
Type:
|
|
type: string
|
|
UUID:
|
|
type: string
|
|
Uptime:
|
|
type: number
|
|
WebsocketURL:
|
|
type: string
|
|
type: object
|
|
postgres.Jsonb:
|
|
properties:
|
|
json.RawMessage:
|
|
items:
|
|
type: integer
|
|
type: array
|
|
type: object
|
|
result.addResultRequest:
|
|
properties:
|
|
result:
|
|
$ref: '#/definitions/result.validNewResult'
|
|
type: object
|
|
result.updateResultRequest:
|
|
properties:
|
|
result:
|
|
$ref: '#/definitions/result.validUpdatedResult'
|
|
type: object
|
|
result.validNewResult:
|
|
properties:
|
|
ConfigSnapshots:
|
|
$ref: '#/definitions/postgres.Jsonb'
|
|
Description:
|
|
type: string
|
|
ResultFileIDs:
|
|
items:
|
|
type: integer
|
|
type: array
|
|
ScenarioID:
|
|
type: integer
|
|
required:
|
|
- ConfigSnapshots
|
|
- ScenarioID
|
|
type: object
|
|
result.validUpdatedResult:
|
|
properties:
|
|
configSnapshots:
|
|
$ref: '#/definitions/postgres.Jsonb'
|
|
description:
|
|
type: string
|
|
resultFileIDs:
|
|
items:
|
|
type: integer
|
|
type: array
|
|
type: object
|
|
scenario.addScenarioRequest:
|
|
properties:
|
|
scenario:
|
|
$ref: '#/definitions/scenario.validNewScenario'
|
|
type: object
|
|
scenario.updateScenarioRequest:
|
|
properties:
|
|
scenario:
|
|
$ref: '#/definitions/scenario.validUpdatedScenario'
|
|
type: object
|
|
scenario.validNewScenario:
|
|
properties:
|
|
Name:
|
|
type: string
|
|
Running:
|
|
type: boolean
|
|
StartParameters:
|
|
$ref: '#/definitions/postgres.Jsonb'
|
|
required:
|
|
- Name
|
|
- StartParameters
|
|
type: object
|
|
scenario.validUpdatedScenario:
|
|
properties:
|
|
Name:
|
|
type: string
|
|
Running:
|
|
type: boolean
|
|
StartParameters:
|
|
$ref: '#/definitions/postgres.Jsonb'
|
|
type: object
|
|
signal.addSignalRequest:
|
|
properties:
|
|
signal:
|
|
$ref: '#/definitions/signal.validNewSignal'
|
|
type: object
|
|
signal.updateSignalRequest:
|
|
properties:
|
|
signal:
|
|
$ref: '#/definitions/signal.validUpdatedSignal'
|
|
type: object
|
|
signal.validNewSignal:
|
|
properties:
|
|
ConfigID:
|
|
type: integer
|
|
Direction:
|
|
type: string
|
|
Index:
|
|
type: integer
|
|
Name:
|
|
type: string
|
|
ScalingFactor:
|
|
type: number
|
|
Unit:
|
|
type: string
|
|
required:
|
|
- ConfigID
|
|
- Direction
|
|
- Index
|
|
- Name
|
|
type: object
|
|
signal.validUpdatedSignal:
|
|
properties:
|
|
Index:
|
|
type: integer
|
|
Name:
|
|
type: string
|
|
ScalingFactor:
|
|
type: number
|
|
Unit:
|
|
type: string
|
|
type: object
|
|
user.addUserRequest:
|
|
properties:
|
|
user:
|
|
$ref: '#/definitions/user.validNewUser'
|
|
type: object
|
|
user.loginRequest:
|
|
properties:
|
|
Password:
|
|
type: string
|
|
Username:
|
|
type: string
|
|
required:
|
|
- Password
|
|
- Username
|
|
type: object
|
|
user.updateUserRequest:
|
|
properties:
|
|
user:
|
|
$ref: '#/definitions/user.validUpdatedRequest'
|
|
type: object
|
|
user.validNewUser:
|
|
properties:
|
|
Mail:
|
|
type: string
|
|
Password:
|
|
type: string
|
|
Role:
|
|
type: string
|
|
Username:
|
|
type: string
|
|
required:
|
|
- Mail
|
|
- Password
|
|
- Role
|
|
- Username
|
|
type: object
|
|
user.validUpdatedRequest:
|
|
properties:
|
|
Active:
|
|
type: string
|
|
Mail:
|
|
type: string
|
|
OldPassword:
|
|
type: string
|
|
Password:
|
|
type: string
|
|
Role:
|
|
type: string
|
|
Username:
|
|
type: string
|
|
type: object
|
|
widget.addWidgetRequest:
|
|
properties:
|
|
widget:
|
|
$ref: '#/definitions/widget.validNewWidget'
|
|
type: object
|
|
widget.updateWidgetRequest:
|
|
properties:
|
|
widget:
|
|
$ref: '#/definitions/widget.validUpdatedWidget'
|
|
type: object
|
|
widget.validNewWidget:
|
|
properties:
|
|
CustomProperties:
|
|
$ref: '#/definitions/postgres.Jsonb'
|
|
DashboardID:
|
|
type: integer
|
|
Height:
|
|
type: integer
|
|
IsLocked:
|
|
type: boolean
|
|
MinHeight:
|
|
type: integer
|
|
MinWidth:
|
|
type: integer
|
|
Name:
|
|
type: string
|
|
SignalIDs:
|
|
items:
|
|
type: integer
|
|
type: array
|
|
Type:
|
|
type: string
|
|
Width:
|
|
type: integer
|
|
X:
|
|
type: integer
|
|
"Y":
|
|
type: integer
|
|
Z:
|
|
type: integer
|
|
required:
|
|
- DashboardID
|
|
- Height
|
|
- Name
|
|
- Type
|
|
- Width
|
|
type: object
|
|
widget.validUpdatedWidget:
|
|
properties:
|
|
CustomProperties:
|
|
$ref: '#/definitions/postgres.Jsonb'
|
|
Height:
|
|
type: integer
|
|
IsLocked:
|
|
type: boolean
|
|
MinHeight:
|
|
type: integer
|
|
MinWidth:
|
|
type: integer
|
|
Name:
|
|
type: string
|
|
SignalIDs:
|
|
items:
|
|
type: integer
|
|
type: array
|
|
Type:
|
|
type: string
|
|
Width:
|
|
type: integer
|
|
X:
|
|
type: integer
|
|
"Y":
|
|
type: integer
|
|
Z:
|
|
type: integer
|
|
type: object
|
|
info:
|
|
contact:
|
|
email: sonja.happ@eonerc.rwth-aachen.de
|
|
name: Sonja Happ
|
|
description: |-
|
|
This is the [VILLASweb Backend](https://git.rwth-aachen.de/acs/public/villas/web-backend-go) API v2.0.
|
|
This documentation is auto-generated based on the API documentation in the code. The tool [swag](https://github.com/swaggo/swag) is used to auto-generate API docs for the [gin-gonic](https://github.com/gin-gonic/gin) framework.
|
|
Authentication: Use the authenticate endpoint below to obtain a token for your user account, copy the token into to the value field of the dialog showing up for the green Authorize button below and confirm with Done.
|
|
license:
|
|
name: GNU GPL 3.0
|
|
url: http://www.gnu.de/documents/gpl-3.0.en.html
|
|
title: VILLASweb Backend API
|
|
version: "2.0"
|
|
paths:
|
|
/authenticate:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
operationId: authenticated
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: JSON web token, success status, message and authenticated user
|
|
object
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseAuthenticate'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error.
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
summary: Check if user is authenticated and provide details on how the user
|
|
can authenticate
|
|
tags:
|
|
- authentication
|
|
/authenticate/{mechanism}:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
operationId: authenticate
|
|
parameters:
|
|
- description: loginRequest of user
|
|
in: body
|
|
name: inputUser
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/user.loginRequest'
|
|
- description: Login mechanism
|
|
enum:
|
|
- internal
|
|
- external
|
|
in: path
|
|
name: mechanism
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: JSON web token, success status, message and authenticated user
|
|
object
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseAuthenticate'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error.
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
summary: Authentication for user
|
|
tags:
|
|
- authentication
|
|
/config:
|
|
get:
|
|
operationId: config
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: The configuration
|
|
schema:
|
|
$ref: '#/definitions/config.Config'
|
|
summary: Get config VILLASweb to be used by frontend
|
|
tags:
|
|
- config
|
|
/configs:
|
|
get:
|
|
operationId: getConfigs
|
|
parameters:
|
|
- description: Scenario ID
|
|
in: query
|
|
name: scenarioID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Component configurations which belong to scenario
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseConfigs'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get all component configurations of scenario
|
|
tags:
|
|
- component-configurations
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
operationId: addConfig
|
|
parameters:
|
|
- description: component configuration to be added incl. IDs of scenario and
|
|
IC
|
|
in: body
|
|
name: inputConfig
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/component_configuration.addConfigRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Component configuration that was added
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseConfig'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Add a component configuration to a scenario
|
|
tags:
|
|
- component-configurations
|
|
/configs/{configID}:
|
|
delete:
|
|
operationId: deleteConfig
|
|
parameters:
|
|
- description: Config ID
|
|
in: path
|
|
name: configID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: component configuration that was deleted
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseConfig'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete a component configuration
|
|
tags:
|
|
- component-configurations
|
|
get:
|
|
operationId: getConfig
|
|
parameters:
|
|
- description: Config ID
|
|
in: path
|
|
name: configID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: component configuration that was requested
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseConfig'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get a component configuration
|
|
tags:
|
|
- component-configurations
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
operationId: updateConfig
|
|
parameters:
|
|
- description: component configuration to be updated
|
|
in: body
|
|
name: inputConfig
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/component_configuration.updateConfigRequest'
|
|
- description: Config ID
|
|
in: path
|
|
name: configID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Component configuration that was added
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseConfig'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update a component configuration
|
|
tags:
|
|
- component-configurations
|
|
/dashboards:
|
|
get:
|
|
operationId: getDashboards
|
|
parameters:
|
|
- description: Scenario ID
|
|
in: query
|
|
name: scenarioID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Dashboards which belong to scenario
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseDashboards'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get all dashboards of scenario
|
|
tags:
|
|
- dashboards
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
operationId: addDashboard
|
|
parameters:
|
|
- description: Dashboard to be added incl. ID of Scenario
|
|
in: body
|
|
name: inputDab
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/dashboard.addDashboardRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Dashboard that was added
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseDashboard'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Add a dashboard to a scenario
|
|
tags:
|
|
- dashboards
|
|
/dashboards/{dashboardID}:
|
|
delete:
|
|
operationId: deleteDashboard
|
|
parameters:
|
|
- description: Dashboard ID
|
|
in: path
|
|
name: dashboardID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Dashboard that was deleted
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseDashboard'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete a dashboard
|
|
tags:
|
|
- dashboards
|
|
get:
|
|
operationId: getDashboard
|
|
parameters:
|
|
- description: Dashboard ID
|
|
in: path
|
|
name: dashboardID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Dashboard that was requested
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseDashboard'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get a dashboard
|
|
tags:
|
|
- dashboards
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
operationId: updateDashboard
|
|
parameters:
|
|
- description: Dashboard to be updated
|
|
in: body
|
|
name: inputDab
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/dashboard.updateDashboardRequest'
|
|
- description: Dashboard ID
|
|
in: path
|
|
name: dashboardID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Dashboard that was updated
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseDashboard'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update a dashboard
|
|
tags:
|
|
- dashboards
|
|
/files:
|
|
get:
|
|
operationId: getFiles
|
|
parameters:
|
|
- description: Scenario ID
|
|
in: query
|
|
name: scenarioID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Files which belong to scenario
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseFiles'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get all files of a specific scenario
|
|
tags:
|
|
- files
|
|
post:
|
|
consumes:
|
|
- text/plain
|
|
- image/png
|
|
- image/jpeg
|
|
- image/gif
|
|
- model/x-cim
|
|
- model/x-cim.zip
|
|
- multipart/form-data
|
|
operationId: addFile
|
|
parameters:
|
|
- description: File to be uploaded
|
|
in: formData
|
|
name: inputFile
|
|
required: true
|
|
type: file
|
|
- description: ID of scenario to which file shall be added
|
|
in: query
|
|
name: scenarioID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: File that was added
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseFile'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Add a file to a specific scenario
|
|
tags:
|
|
- files
|
|
/files/{fileID}:
|
|
delete:
|
|
operationId: deleteFile
|
|
parameters:
|
|
- description: ID of the file to update
|
|
in: path
|
|
name: fileID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: File that was deleted
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseFile'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete a file
|
|
tags:
|
|
- files
|
|
get:
|
|
operationId: getFile
|
|
parameters:
|
|
- description: ID of the file to download
|
|
in: path
|
|
name: fileID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- text/plain
|
|
- text/csv
|
|
- application/gzip
|
|
- application/x-gtar
|
|
- application/x-tar
|
|
- application/x-ustar
|
|
- application/zip
|
|
- application/msexcel
|
|
- application/xml
|
|
- application/x-bag
|
|
- image/png
|
|
- image/jpeg
|
|
- image/gif
|
|
- model/x-cim
|
|
- model/x-cim.zip
|
|
responses:
|
|
"200":
|
|
description: File that was requested
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseFile'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Download a file
|
|
tags:
|
|
- files
|
|
put:
|
|
consumes:
|
|
- text/plain
|
|
- image/png
|
|
- image/jpeg
|
|
- image/gif
|
|
- model/x-cim
|
|
- model/x-cim.zip
|
|
- multipart/form-data
|
|
operationId: updateFile
|
|
parameters:
|
|
- description: File to be uploaded
|
|
in: formData
|
|
name: inputFile
|
|
required: true
|
|
type: file
|
|
- description: ID of the file to update
|
|
in: path
|
|
name: fileID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: File that was updated
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseFile'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update a file
|
|
tags:
|
|
- files
|
|
/healthz:
|
|
get:
|
|
operationId: getHealth
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"204":
|
|
description: Backend is healthy, database and AMQP broker connections are
|
|
alive
|
|
schema:
|
|
type: string
|
|
"500":
|
|
description: Backend is NOT healthy
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
summary: Get health status of backend
|
|
tags:
|
|
- healthz
|
|
/ic:
|
|
get:
|
|
operationId: getICs
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: ICs requested
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseICs'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get all infrastructure components
|
|
tags:
|
|
- infrastructure-components
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
operationId: addIC
|
|
parameters:
|
|
- description: Infrastructure Component to be added
|
|
in: body
|
|
name: inputIC
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/infrastructure_component.AddICRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Infrastructure Component that was added
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseIC'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Add an infrastructure component
|
|
tags:
|
|
- infrastructure-components
|
|
/ic/{ICID}:
|
|
delete:
|
|
operationId: deleteIC
|
|
parameters:
|
|
- description: Infrastructure Component ID
|
|
in: path
|
|
name: ICID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Infrastructure Component that was deleted
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseIC'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete an infrastructure component
|
|
tags:
|
|
- infrastructure-components
|
|
get:
|
|
operationId: getIC
|
|
parameters:
|
|
- description: Infrastructure Component ID
|
|
in: path
|
|
name: ICID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Infrastructure Component that was requested
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseIC'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get infrastructure component
|
|
tags:
|
|
- infrastructure-components
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
operationId: updateIC
|
|
parameters:
|
|
- description: InfrastructureComponent to be updated
|
|
in: body
|
|
name: inputIC
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/infrastructure_component.UpdateICRequest'
|
|
- description: InfrastructureComponent ID
|
|
in: path
|
|
name: ICID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Infrastructure Component that was updated
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseIC'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update an infrastructure component
|
|
tags:
|
|
- infrastructure-components
|
|
/ic/{ICID}/action:
|
|
post:
|
|
operationId: sendActionToIC
|
|
parameters:
|
|
- description: Action for IC
|
|
in: query
|
|
name: inputAction
|
|
required: true
|
|
type: string
|
|
- description: InfrastructureComponent ID
|
|
in: path
|
|
name: ICID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Action sent successfully
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Send an action to IC (only available if backend server is started with
|
|
-amqp parameter)
|
|
tags:
|
|
- infrastructure-components
|
|
/ic/{ICID}/configs:
|
|
get:
|
|
operationId: getConfigsOfIC
|
|
parameters:
|
|
- description: Infrastructure Component ID
|
|
in: path
|
|
name: ICID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Configs requested by user
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseConfigs'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get all configurations of the infrastructure component
|
|
tags:
|
|
- infrastructure-components
|
|
/metrics:
|
|
get:
|
|
operationId: getMetrics
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Returns Prometheus metrics
|
|
schema:
|
|
type: string
|
|
summary: Prometheus metrics endpoint
|
|
tags:
|
|
- metrics
|
|
/openapi:
|
|
get:
|
|
operationId: getOpenAPI
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: A OpenAPI 2.0 specification of the API
|
|
schema:
|
|
type: string
|
|
summary: Get OpenAPI 2.0 spec of API
|
|
tags:
|
|
- openapi
|
|
/results:
|
|
get:
|
|
operationId: getResults
|
|
parameters:
|
|
- description: Scenario ID
|
|
in: query
|
|
name: scenarioID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Results which belong to scenario
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseResults'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get all results of scenario
|
|
tags:
|
|
- results
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
operationId: addResult
|
|
parameters:
|
|
- description: Result to be added incl. ID of Scenario
|
|
in: body
|
|
name: inputResult
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/result.addResultRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Result that was added
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseResult'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Add a result to a scenario
|
|
tags:
|
|
- results
|
|
/results/{resultID}:
|
|
delete:
|
|
operationId: deleteResult
|
|
parameters:
|
|
- description: Result ID
|
|
in: path
|
|
name: resultID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Result that was deleted
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseResult'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete a Result incl. all result files
|
|
tags:
|
|
- results
|
|
get:
|
|
operationId: getResult
|
|
parameters:
|
|
- description: Result ID
|
|
in: path
|
|
name: resultID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Result that was requested
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseResult'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get a Result
|
|
tags:
|
|
- results
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
operationId: updateResult
|
|
parameters:
|
|
- description: Result to be updated
|
|
in: body
|
|
name: inputResult
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/result.updateResultRequest'
|
|
- description: Result ID
|
|
in: path
|
|
name: resultID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Result that was updated
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseResult'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update a result
|
|
tags:
|
|
- results
|
|
/results/{resultID}/file:
|
|
post:
|
|
consumes:
|
|
- text/plain
|
|
- text/csv
|
|
- application/gzip
|
|
- application/x-gtar
|
|
- application/x-tar
|
|
- application/x-ustar
|
|
- application/zip
|
|
- application/msexcel
|
|
- application/xml
|
|
- application/x-bag
|
|
operationId: addResultFile
|
|
parameters:
|
|
- description: File to be uploaded
|
|
in: formData
|
|
name: inputFile
|
|
required: true
|
|
type: file
|
|
- description: Result ID
|
|
in: path
|
|
name: resultID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Result that was updated
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseResult'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Upload a result file to the DB and associate it with scenario and result
|
|
tags:
|
|
- results
|
|
/results/{resultID}/file/{fileID}:
|
|
delete:
|
|
operationId: deleteResultFile
|
|
parameters:
|
|
- description: Result ID
|
|
in: path
|
|
name: resultID
|
|
required: true
|
|
type: integer
|
|
- description: ID of the file to delete
|
|
in: path
|
|
name: fileID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Result for which file was deleted
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseResult'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete a result file
|
|
tags:
|
|
- results
|
|
/scenarios:
|
|
get:
|
|
operationId: getScenarios
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Scenarios to which user has access
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseScenarios'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get all scenarios of requesting user
|
|
tags:
|
|
- scenarios
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
operationId: addScenario
|
|
parameters:
|
|
- description: Scenario to be added
|
|
in: body
|
|
name: inputScenario
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/scenario.addScenarioRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: scenario that was added
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseScenario'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Add a scenario
|
|
tags:
|
|
- scenarios
|
|
/scenarios/{scenarioID}:
|
|
delete:
|
|
operationId: deleteScenario
|
|
parameters:
|
|
- description: Scenario ID
|
|
in: path
|
|
name: scenarioID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Deleted scenario
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseScenario'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete a scenario
|
|
tags:
|
|
- scenarios
|
|
get:
|
|
operationId: getScenario
|
|
parameters:
|
|
- description: Scenario ID
|
|
in: path
|
|
name: scenarioID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Scenario requested by user
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseScenario'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get scenario
|
|
tags:
|
|
- scenarios
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
operationId: updateScenario
|
|
parameters:
|
|
- description: Scenario to be updated
|
|
in: body
|
|
name: inputScenario
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/scenario.updateScenarioRequest'
|
|
- description: Scenario ID
|
|
in: path
|
|
name: scenarioID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Updated scenario.
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseScenario'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update a scenario
|
|
tags:
|
|
- scenarios
|
|
/scenarios/{scenarioID}/user:
|
|
delete:
|
|
operationId: deleteUserFromScenario
|
|
parameters:
|
|
- description: Scenario ID
|
|
in: path
|
|
name: scenarioID
|
|
required: true
|
|
type: integer
|
|
- description: User name
|
|
in: query
|
|
name: username
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: User that was deleted from scenario
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseUser'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete a user from a scenario
|
|
tags:
|
|
- scenarios
|
|
put:
|
|
operationId: addUserToScenario
|
|
parameters:
|
|
- description: Scenario ID
|
|
in: path
|
|
name: scenarioID
|
|
required: true
|
|
type: integer
|
|
- description: User name
|
|
in: query
|
|
name: username
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: User that was added to scenario
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseUser'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Add a user to a a scenario
|
|
tags:
|
|
- scenarios
|
|
/scenarios/{scenarioID}/users/:
|
|
get:
|
|
operationId: getUsersOfScenario
|
|
parameters:
|
|
- description: Scenario ID
|
|
in: path
|
|
name: scenarioID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Array of users that have access to the scenario
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseUsers'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get users of a scenario
|
|
tags:
|
|
- scenarios
|
|
/signals:
|
|
get:
|
|
operationId: getSignals
|
|
parameters:
|
|
- description: Direction of signal (in or out)
|
|
in: query
|
|
name: direction
|
|
required: true
|
|
type: string
|
|
- description: Config ID of signals to be obtained
|
|
in: query
|
|
name: configID
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Signals which belong to component configuration
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseSignals'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get all signals of one direction
|
|
tags:
|
|
- signals
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
operationId: AddSignal
|
|
parameters:
|
|
- description: A signal to be added to the component configuration incl. direction
|
|
and config ID to which signal shall be added
|
|
in: body
|
|
name: inputSignal
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/signal.addSignalRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Signal that was added
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseSignal'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Add a signal to a signal mapping of a component configuration
|
|
tags:
|
|
- signals
|
|
/signals/{signalID}:
|
|
delete:
|
|
operationId: deleteSignal
|
|
parameters:
|
|
- description: ID of signal to be deleted
|
|
in: path
|
|
name: signalID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Signal that was deleted
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseSignal'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete a signal
|
|
tags:
|
|
- signals
|
|
get:
|
|
operationId: getSignal
|
|
parameters:
|
|
- description: ID of signal to be obtained
|
|
in: path
|
|
name: signalID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Signal that was requested
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseSignal'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get a signal
|
|
tags:
|
|
- signals
|
|
put:
|
|
operationId: updateSignal
|
|
parameters:
|
|
- description: A signal to be updated
|
|
in: body
|
|
name: inputSignal
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/signal.updateSignalRequest'
|
|
- description: ID of signal to be updated
|
|
in: path
|
|
name: signalID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Signal that was updated
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseSignal'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update a signal
|
|
tags:
|
|
- signals
|
|
/users:
|
|
get:
|
|
operationId: GetUsers
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Array of users
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseUsers'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get all users
|
|
tags:
|
|
- users
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
operationId: AddUser
|
|
parameters:
|
|
- description: User to be added
|
|
in: body
|
|
name: inputUser
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/user.addUserRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Contains added user object
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseUser'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Add a user
|
|
tags:
|
|
- users
|
|
/users/{userID}:
|
|
delete:
|
|
operationId: DeleteUser
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: userID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: deleted user
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseUser'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete a user
|
|
tags:
|
|
- users
|
|
get:
|
|
operationId: GetUser
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: userID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: requested user
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseUser'
|
|
"403":
|
|
description: Access forbidden.
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get user
|
|
tags:
|
|
- users
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
operationId: UpdateUser
|
|
parameters:
|
|
- description: User to be updated (anything except for ID can be changed, role
|
|
can only be change by admin)
|
|
in: body
|
|
name: inputUser
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/user.updateUserRequest'
|
|
- description: User ID
|
|
in: path
|
|
name: userID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Contains updated user
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseUser'
|
|
"400":
|
|
description: Bad request.
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"403":
|
|
description: Access forbidden.
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update a user
|
|
tags:
|
|
- users
|
|
/widgets:
|
|
get:
|
|
operationId: getWidgets
|
|
parameters:
|
|
- description: Dashboard ID
|
|
in: query
|
|
name: dashboardID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Widgets to which belong to dashboard
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseWidgets'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get all widgets of dashboard
|
|
tags:
|
|
- widgets
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
operationId: addWidget
|
|
parameters:
|
|
- description: Widget to be added incl. ID of dashboard
|
|
in: body
|
|
name: inputWidget
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/widget.addWidgetRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Widget that was added
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseWidget'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Add a widget to a dashboard
|
|
tags:
|
|
- widgets
|
|
/widgets/{widgetID}:
|
|
delete:
|
|
operationId: deleteWidget
|
|
parameters:
|
|
- description: Widget ID
|
|
in: path
|
|
name: widgetID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Widget that was deleted
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseWidget'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Delete a widget
|
|
tags:
|
|
- widgets
|
|
get:
|
|
operationId: getWidget
|
|
parameters:
|
|
- description: Widget ID
|
|
in: path
|
|
name: widgetID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Widget that was requested
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseWidget'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Get a widget
|
|
tags:
|
|
- widgets
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
operationId: updateWidget
|
|
parameters:
|
|
- description: Widget to be updated
|
|
in: body
|
|
name: inputWidget
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/widget.updateWidgetRequest'
|
|
- description: Widget ID
|
|
in: path
|
|
name: widgetID
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Widget that was updated
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseWidget'
|
|
"400":
|
|
description: Bad request
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"404":
|
|
description: Not found
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"422":
|
|
description: Unprocessable entity
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/api.ResponseError'
|
|
security:
|
|
- Bearer: []
|
|
summary: Update a widget
|
|
tags:
|
|
- widgets
|
|
securityDefinitions:
|
|
Bearer:
|
|
in: header
|
|
name: Authorization
|
|
type: apiKey
|
|
swagger: "2.0"
|