1
1
paths :
2
+ init_pod_config :
3
+ tags : [Init, "Pod / Configuration"]
4
+ summary : Init Pod config
5
+ description : Initialize the configuration of the Prose Pod.
6
+ operationId : init_pod_config
7
+ security : []
8
+ requestBody :
9
+ required : true
10
+ content :
11
+ application/json :
12
+ schema : { $ref: "#/components/schemas/InitPodConfigRequest" }
13
+ responses :
14
+ " 201 " :
15
+ description : Created
16
+ content :
17
+ application/json :
18
+ schema : { $ref: "#/components/schemas/PodConfig" }
19
+ headers :
20
+ Location : { $ref: "../shared.yaml#/components/headers/Location" }
21
+ " 401 " : { $ref: "../shared.yaml#/components/responses/Unauthorized" }
22
+ " 403 " : { $ref: "../shared.yaml#/components/responses/Forbidden" }
23
+ " 409 " : { $ref: "#/components/responses/PodConfigAlreadyInitialized" }
24
+ " 422 " : { $ref: "../shared.yaml#/components/responses/UnprocessableEntity" }
2
25
get_pod_config :
3
26
tags : ["Pod / Configuration"]
4
27
summary : Get Pod config
15
38
" 401 " : { $ref: "../shared.yaml#/components/responses/Unauthorized" }
16
39
" 403 " : { $ref: "../shared.yaml#/components/responses/Forbidden" }
17
40
set_pod_address :
18
- tags : [Init, "Pod / Configuration"]
41
+ tags : ["Pod / Configuration"]
19
42
summary : Set Pod address
20
43
description : Tells the API how the Pod is publicly accessible.
21
44
operationId : set_pod_address
@@ -24,34 +47,13 @@ paths:
24
47
required : true
25
48
content :
26
49
application/json :
27
- schema :
28
- type : object
29
- required : []
30
- properties :
31
- ipv4 :
32
- type : string
33
- example : 104.18.28.104
34
- ipv6 :
35
- type : string
36
- example : 2606:4700::6812:1c68
37
- hostname :
38
- type : string
39
- example : crisp.chat
40
- example :
41
- hostname : crisp.chat
50
+ schema : { $ref: "#/components/schemas/SetPodAddressRequest" }
42
51
responses :
43
52
" 200 " :
44
53
description : Success
45
54
content :
46
55
application/json :
47
- schema : { $ref: "#/components/schemas/PodAddress" }
48
- " 201 " :
49
- description : Created
50
- content :
51
- application/json :
52
- schema : { $ref: "#/components/schemas/PodAddress" }
53
- headers :
54
- Location : { $ref: "../shared.yaml#/components/headers/Location" }
56
+ schema : { $ref: "#/components/schemas/NetworkAddress" }
55
57
" 401 " : { $ref: "../shared.yaml#/components/responses/Unauthorized" }
56
58
" 403 " : { $ref: "../shared.yaml#/components/responses/Forbidden" }
57
59
" 422 " : { $ref: "../shared.yaml#/components/responses/UnprocessableEntity" }
@@ -62,23 +64,95 @@ paths:
62
64
operationId : get_pod_address
63
65
security :
64
66
- BearerAuth : []
67
+ responses :
68
+ " 200 " :
69
+ description : Pod address has a value
70
+ content :
71
+ application/json :
72
+ schema : { $ref: "#/components/schemas/NetworkAddress" }
73
+ " 204 " :
74
+ description : Pod address has no value
75
+ " 401 " : { $ref: "../shared.yaml#/components/responses/Unauthorized" }
76
+ " 403 " : { $ref: "../shared.yaml#/components/responses/Forbidden" }
77
+ set_dashboard_address :
78
+ tags : ["Pod / Configuration"]
79
+ summary : Set Dashboard address
80
+ description : Tells the API how the Dashboard is publicly accessible.
81
+ operationId : set_dashboard_address
82
+ security : []
83
+ requestBody :
84
+ required : true
85
+ content :
86
+ application/json :
87
+ schema : { $ref: "#/components/schemas/SetDashboardAddressRequest" }
65
88
responses :
66
89
" 200 " :
67
90
description : Success
68
91
content :
69
92
application/json :
70
- schema : { $ref: "#/components/schemas/PodAddress" }
71
- " 412 " : { $ref: "#/components/responses/PodAddressNotInitialized" }
93
+ schema : { $ref: "#/components/schemas/NetworkAddress" }
94
+ " 401 " : { $ref: "../shared.yaml#/components/responses/Unauthorized" }
95
+ " 403 " : { $ref: "../shared.yaml#/components/responses/Forbidden" }
96
+ " 422 " : { $ref: "../shared.yaml#/components/responses/UnprocessableEntity" }
97
+ get_dashboard_address :
98
+ tags : ["Pod / Configuration"]
99
+ summary : Get Dashboard address
100
+ description : Get the current address of the Prose Pod Dashboard.
101
+ operationId : get_dashboard_address
102
+ security :
103
+ - BearerAuth : []
104
+ responses :
105
+ " 200 " :
106
+ description : Dashboard address has a value
107
+ content :
108
+ application/json :
109
+ schema : { $ref: "#/components/schemas/NetworkAddress" }
110
+ " 204 " :
111
+ description : Dashboard address has no value
72
112
" 401 " : { $ref: "../shared.yaml#/components/responses/Unauthorized" }
73
113
" 403 " : { $ref: "../shared.yaml#/components/responses/Forbidden" }
74
114
components :
75
115
schemas :
116
+ InitPodConfigRequest :
117
+ type : object
118
+ required :
119
+ - address
120
+ - dashboard_address
121
+ properties :
122
+ address : { $ref: "#/components/schemas/SetPodAddressRequest" }
123
+ dashboard_address : { $ref: "#/components/schemas/SetDashboardAddressRequest" }
124
+ SetNetworkAddressRequest :
125
+ type : object
126
+ required : []
127
+ properties :
128
+ ipv4 :
129
+ type : string
130
+ example : 104.18.28.104
131
+ ipv6 :
132
+ type : string
133
+ example : 2606:4700::6812:1c68
134
+ hostname :
135
+ type : string
136
+ example : crisp.chat
137
+ SetPodAddressRequest :
138
+ $ref : " #/components/schemas/SetNetworkAddressRequest"
139
+ example :
140
+ hostname : crisp.chat
141
+ SetDashboardAddressRequest :
142
+ $ref : " #/components/schemas/SetNetworkAddressRequest"
143
+ example :
144
+ hostname : admin.prose.crisp.chat
76
145
PodConfig :
77
146
type : object
78
147
required : []
79
148
properties :
80
- address : { $ref: "#/components/schemas/PodAddress" }
81
- PodAddress :
149
+ address :
150
+ $ref : " #/components/schemas/NetworkAddress"
151
+ type : [object, "null"]
152
+ dashboard_address :
153
+ $ref : " #/components/schemas/NetworkAddress"
154
+ type : [object, "null"]
155
+ NetworkAddress :
82
156
type : object
83
157
required :
84
158
- type
@@ -99,10 +173,47 @@ components:
99
173
type : Dynamic
100
174
hostname : crisp.chat
101
175
responses :
176
+ PodConfigNotInitialized :
177
+ description : Pod config not initialized
178
+ content :
179
+ application/json :
180
+ schema :
181
+ $ref : " ../shared.yaml#/components/schemas/Error"
182
+ properties :
183
+ error :
184
+ const : pod_config_not_initialized
185
+ example :
186
+ error : pod_config_not_initialized
187
+ PodConfigAlreadyInitialized :
188
+ description : Pod config already initialized
189
+ content :
190
+ application/json :
191
+ schema :
192
+ $ref : " ../shared.yaml#/components/schemas/Error"
193
+ properties :
194
+ error :
195
+ const : pod_config_already_initialized
196
+ example :
197
+ error : pod_config_already_initialized
102
198
PodAddressNotInitialized :
103
199
description : Pod address not initialized
104
200
content :
105
201
application/json :
106
- schema : { $ref: "../shared.yaml#/components/schemas/Error" }
202
+ schema :
203
+ $ref : " ../shared.yaml#/components/schemas/Error"
204
+ properties :
205
+ error :
206
+ const : pod_address_not_initialized
107
207
example :
108
208
error : pod_address_not_initialized
209
+ DashboardAddressNotInitialized :
210
+ description : Dashboard address not initialized
211
+ content :
212
+ application/json :
213
+ schema :
214
+ $ref : " ../shared.yaml#/components/schemas/Error"
215
+ properties :
216
+ error :
217
+ const : dashboard_address_not_initialized
218
+ example :
219
+ error : dashboard_address_not_initialized
0 commit comments