-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfigurationAPI.yaml
133 lines (130 loc) · 4.27 KB
/
ConfigurationAPI.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
openapi: 3.0.0
# General Information
info:
title: Enflex.IT Configuration API
description: This is the common Configuration API for all Enflex.IT Applications.
contact:
name: EnFlex.IT
url: https://www.enflex.it
email: admin@enflex.it
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0
# servers:
# Security
# security:
# Tags to classifiy / organize paths
# tags:
# The paths of a REST-API
paths:
"/config/{Context}/getConfigIDs":
get:
summary: returns the different ids associated with contexual objects
description: e.g. List of Device IDs, or List of Configuration Files
operationId: getConfigIds
parameters:
- $ref: "#/components/parameters/context"
responses:
200:
description: list of all configurable ids associated with specified context
content:
"application/json":
schema:
type: array
items:
$ref: "#/components/schemas/ConfigurationIdWithMetaData"
"/config/{Context}/getConfiguration/{configId}":
get:
summary: return map of all configurable settings of some contexual object e.g. entries of settings file
operationId: getConfigurationById
parameters:
- $ref: "#/components/parameters/context"
- $ref: "#/components/parameters/configId"
responses:
200:
description: Successful
content:
"application/json":
schema:
type: array
items:
$ref: "#/components/schemas/Configurationoption"
"/config/{Context}/postConfiguration/{configId}":
post:
summary: set a table of configurations that belong to a specific object inside of a context
operationId: postConfiguration
parameters:
- $ref: "#/components/parameters/context"
- $ref: "#/components/parameters/configId"
- $ref: "#/components/parameters/configurationUpdate"
responses:
200:
description: Successful
content:
"application/json":
schema:
$ref: "#/components/schemas/ConfigurationUpdateResponse"
components:
parameters:
context:
description: this parameter specifies the context in which the operation takes place
name: Context
in: path
required: true
schema:
$ref: "#/components/schemas/Contexts"
configId:
description: this parameter specifies some contexually unique id of a configuration on which should be acted on
name: configId
in: path
required: true
schema:
$ref: "#/components/schemas/ConfigurationId"
configurationUpdate:
name: configurationUpdate
description: this parameter specifies a list of key-value pairs which should be used to update a given configuration.
in: query
required: true
schema:
type: array
items:
$ref: "#/components/schemas/Configurationoption"
schemas:
Contexts:
type: string
description: the different types of contexts for a configuration
enum:
- localCommunication
- devices
- database
- externalServices
- machineLearning
ConfigurationId:
type: string
description: contexually unique identifier for some configuration. One Configuration can consist of multiple ConfigurationOptions
ConfigurationIdWithMetaData:
type: object
description: object that holds a contexually unique identifier for some configuration and moreover some meta data regarding this configuration. e.g. if the configuration is already configured
properties:
id:
$ref: "#/components/schemas/ConfigurationId"
alreadyConfigured:
type: boolean
default: false
required:
- id
Configurationoption:
description: represents the key-value pair of a single configurable option belonging to some configuration. A list of ConfigurationOptions make up a configuration
type: object
properties:
key:
type: string
value:
type: string
required:
- key
- value
ConfigurationUpdateResponse:
type: string
example: Successful