-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathregistry.json
320 lines (287 loc) · 11.5 KB
/
registry.json
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
{
"name": "registry",
"base_url": "https://registry.api.flow.io",
"imports": [
{ "uri": "http://www.apidoc.me/flow/common/latest/service.json" },
{ "uri": "http://www.apidoc.me/flow/error/latest/service.json" }
],
"unions": {
"healthcheck": {
"discriminator": "discriminator",
"types": [
{ "type": "http" },
{ "type": "postgresql" }
]
}
},
"models": {
"service": {
"description": "A service is used to identify what type of software is actually running. We use this to enable setting up application types with enough configuration info by default to support our use cases around docker, CI, etc. The name service comes from https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt",
"fields": [
{ "name": "id", "type": "string", "example": "play" },
{ "name": "default_port", "type": "long", "example": "9000" }
]
},
"service_form": {
"fields": [
{ "name": "id", "type": "string" },
{ "name": "default_port", "type": "long" }
]
},
"service_put_form": {
"fields": [
{ "name": "default_port", "type": "long" }
]
},
"service_reference": {
"fields": [
{ "name": "id", "type": "string", "example": "play" }
]
},
"service_version": {
"fields": [
{ "name": "id", "type": "string" },
{ "name": "timestamp", "type": "date-time-iso8601" },
{ "name": "type", "type": "io.flow.common.v0.enums.change_type" },
{ "name": "service", "type": "service" }
]
},
"application": {
"fields": [
{ "name": "id", "type": "string" },
{ "name": "ports", "type": "[port]", "description": "All of the ports assigned to this application" },
{ "name": "dependencies", "type": "[string]", "description": "A list of the direct dependencies of this application. Guaranteed to be non-cyclical over the set of all applications." }
]
},
"application_form": {
"fields": [
{ "name": "id", "type": "string" },
{ "name": "service", "type": "string" },
{ "name": "external", "type": "long", "required": false, "description": "The external port number to allocate to this application. Defaults to a unique port assigned by the registry." },
{ "name": "internal", "type": "long", "required": false, "description": "The internal port number that this application runs on. Defaults to the service's default port number." },
{ "name": "dependency", "type": "[string]", "required": false, "description": "The application IDs on which this application is dependent" }
]
},
"application_put_form": {
"fields": [
{ "name": "service", "type": "string", "required": false },
{ "name": "external", "type": "long", "required": false },
{ "name": "internal", "type": "long", "required": false },
{ "name": "dependency", "type": "[string]", "required": false }
]
},
"application_version": {
"fields": [
{ "name": "id", "type": "string" },
{ "name": "timestamp", "type": "date-time-iso8601" },
{ "name": "type", "type": "io.flow.common.v0.enums.change_type" },
{ "name": "application", "type": "application" }
]
},
"http": {
"fields": [
{ "name": "host", "type": "string" },
{ "name": "port", "type": "long", "description": "The port on which clients access this service." }
]
},
"port": {
"fields": [
{ "name": "service", "type": "service_reference" },
{ "name": "external", "type": "long", "description": "The port on which clients access this service. If running in a container, this is the host port." },
{ "name": "internal", "type": "long", "description": "The port on which this service is running internally. If running in a container, this is the port inside the container." }
]
},
"postgresql": {
"fields": [
{ "name": "dbname", "type": "string", "description": "The database name." },
{ "name": "host", "type": "string" },
{ "name": "port", "type": "long", "description": "The port on which clients access this database." },
{ "name": "user", "type": "string" }
]
}
},
"resources": {
"service": {
"operations": [
{
"method": "GET",
"description": "Search services. Always paginated.",
"parameters": [
{ "name": "id", "type": "[string]", "required": false, "maximum": 100 },
{ "name": "limit", "type": "long", "default": 25, "minimum": 1, "maximum": 100 },
{ "name": "offset", "type": "long", "default": 0, "minimum": 0 },
{ "name": "sort", "type": "string", "default": "-created_at" }
],
"responses": {
"200": { "type": "[service]" }
}
},
{
"method": "GET",
"description": "Provides visibility into recent changes of each service, including deletion",
"path": "/versions",
"parameters": [
{ "name": "id", "type": "[string]", "required": false, "maximum": 100 },
{ "name": "service", "type": "[string]", "description": "Filter to services with any one of these ids.", "required": false, "maximum": 100 },
{ "name": "limit", "type": "long", "default": 25, "minimum": 1, "maximum": 100 },
{ "name": "offset", "type": "long", "default": 0, "minimum": 0 },
{ "name": "sort", "type": "string", "default": "journal_timestamp" }
],
"responses": {
"200": { "type": "[service_version]" }
}
},
{
"method": "GET",
"description": "Returns information about a specific service.",
"path": "/:id",
"responses": {
"200": { "type": "service" },
"404": { "type": "unit" }
}
},
{
"method": "POST",
"description": "Create a new service.",
"body": { "type": "service_form" },
"responses": {
"201": { "type": "service" },
"401": { "type": "unit" },
"422": { "type": "io.flow.error.v0.models.generic_error" }
}
},
{
"method": "PUT",
"path": "/:id",
"description": "Upsert an service with the specified id.",
"body": { "type": "service_put_form" },
"responses": {
"200": { "type": "service" },
"201": { "type": "service" },
"401": { "type": "unit" },
"422": { "type": "io.flow.error.v0.models.generic_error" }
}
},
{
"method": "DELETE",
"description": "Delete the service with this id",
"path": "/:id",
"responses": {
"204": { "type": "unit" },
"401": { "type": "unit" },
"404": { "type": "unit" },
"422": { "type": "io.flow.error.v0.models.generic_error" }
}
}
]
},
"application": {
"operations": [
{
"method": "GET",
"description": "Search applications. Always paginated.",
"parameters": [
{ "name": "id", "type": "[string]", "required": false, "maximum": 100 },
{ "name": "port", "type": "[long]", "required": false, "description": "Find the application assigned this external port number", "maximum": 100 },
{ "name": "service", "type": "[string]", "required": false, "maximum": 100 },
{ "name": "prefix", "type": "string", "required": false, "description": "Find the applications with this exact prefix (computed as the string up the last dash, of if no dash, the full string)" },
{ "name": "q", "type": "string", "required": false, "description": "Arbitrary query search. Case insensitive" },
{ "name": "limit", "type": "long", "default": 25, "minimum": 1, "maximum": 100 },
{ "name": "offset", "type": "long", "default": 0, "minimum": 0 },
{ "name": "sort", "type": "string", "default": "-created_at" }
],
"responses": {
"200": { "type": "[application]" }
}
},
{
"method": "GET",
"description": "Provides visibility into recent changes of each application, including deletion",
"path": "/versions",
"parameters": [
{ "name": "id", "type": "[string]", "required": false, "maximum": 100 },
{ "name": "application", "type": "[string]", "description": "Filter to applications with any one of these ids.", "required": false, "maximum": 100 },
{ "name": "limit", "type": "long", "default": 25, "minimum": 1, "maximum": 100 },
{ "name": "offset", "type": "long", "default": 0, "minimum": 0 },
{ "name": "sort", "type": "string", "default": "journal_timestamp" }
],
"responses": {
"200": { "type": "[application_version]" }
}
},
{
"method": "GET",
"description": "Returns YAML representation of applications.",
"path": "/yaml",
"responses": {
"200": { "type": "string" },
"404": { "type": "unit" }
}
},
{
"method": "GET",
"description": "Returns information about a specific application.",
"path": "/:id",
"responses": {
"200": { "type": "application" },
"404": { "type": "unit" }
}
},
{
"method": "POST",
"description": "Create a new application.",
"body": { "type": "application_form" },
"responses": {
"201": { "type": "application" },
"401": { "type": "unit" },
"422": { "type": "io.flow.error.v0.models.generic_error" }
}
},
{
"method": "PUT",
"path": "/:id",
"description": "Upsert an application with the specified id.",
"body": { "type": "application_put_form" },
"responses": {
"200": { "type": "application" },
"201": { "type": "application" },
"401": { "type": "unit" },
"422": { "type": "io.flow.error.v0.models.generic_error" }
}
},
{
"method": "DELETE",
"description": "Delete the application with this id",
"path": "/:id",
"responses": {
"204": { "type": "unit" },
"401": { "type": "unit" },
"404": { "type": "unit" }
}
},
{
"method": "PUT",
"path": "/:id/dependencies/:dependency",
"description": "Ensure that name is a dependencies for this project, adding if necessary.",
"responses": {
"200": { "type": "application" },
"401": { "type": "unit" },
"404": { "type": "unit" },
"422": { "type": "io.flow.error.v0.models.generic_error" }
}
},
{
"method": "DELETE",
"path": "/:id/dependencies/:dependency",
"description": "Remove name as a dependencies for this project",
"responses": {
"200": { "type": "application" },
"401": { "type": "unit" },
"404": { "type": "unit" },
"422": { "type": "io.flow.error.v0.models.generic_error" }
}
}
]
}
}
}