-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.json
More file actions
executable file
·370 lines (370 loc) · 11.5 KB
/
openapi.json
File metadata and controls
executable file
·370 lines (370 loc) · 11.5 KB
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
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
{
"openapi" : "3.0.0",
"info" : {
"title" : "Data Grid Search API",
"description" : "This is and extensible, pluggable search API for iRODS focused on pluggable Elastic Search indexes.",
"contact" : {
"email" : "mike.conway@nih.gov"
},
"license" : {
"name" : "Apache 2.0",
"url" : "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version" : "1.0.0-oas3"
},
"servers" : [ {
"url" : "http://localhost:8082/v1",
"description" : "Local dev server"
} ],
"security" : [ {
"BearerAuth" : [ "read", "write" ]
} ],
"tags" : [ {
"name" : "Info",
"description" : "Endpoints for describing search capabilities and options"
}, {
"name" : "Search",
"description" : "Search on index"
} ],
"paths" : {
"/indexes" : {
"get" : {
"tags" : [ "Info" ],
"summary" : "Find index types supported by this api",
"description" : "Returns a summary list of the search indexes available at this endpoint",
"operationId" : "get_indexes",
"parameters" : [ ],
"responses" : {
"200" : {
"description" : "Successfully retrieved",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/indexes"
}
}
}
}
},
"x-openapi-router-controller" : "swagger_server.controllers.info_controller"
}
},
"/attributes/{index_name}" : {
"get" : {
"tags" : [ "Info" ],
"summary" : "Find search attribute terms for a specific index",
"description" : "Returns a list of search attribute terms available for specified index",
"operationId" : "get_index_search_attributes",
"parameters" : [ {
"name" : "index_name",
"in" : "path",
"required" : true,
"style" : "simple",
"explode" : false,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"200" : {
"description" : "Successfully retrieved",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/searchAttributes"
}
}
}
}
},
"x-openapi-router-controller" : "swagger_server.controllers.info_controller"
}
},
"/search" : {
"post" : {
"tags" : [ "Search" ],
"summary" : "Generic search on one or all available indexes",
"description" : "Returns result hits with associated fields and values",
"operationId" : "generic_search",
"parameters" : [ {
"name" : "index_name",
"in" : "query",
"required" : true,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
}
}, {
"name" : "search_query",
"in" : "query",
"required" : true,
"style" : "form",
"explode" : true,
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"200" : {
"description" : "Successfully retrieved search result",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/search_data"
}
}
}
}
},
"x-openapi-router-controller" : "swagger_server.controllers.search_controller"
}
}
},
"components" : {
"schemas" : {
"indexes" : {
"type" : "object",
"properties" : {
"id" : {
"type" : "string",
"description" : "Unique id that identifies this particular endpoint. Multiple endpoints may be configured to create a search cluster to address distinct indexes"
},
"name" : {
"type" : "string",
"description" : "Human readable, meaningful name for the search endpoint"
},
"info" : {
"type" : "string",
"description" : "Documentation about the function of the endpoint"
},
"maintainer" : {
"type" : "string",
"description" : "Maintainer of the api"
},
"contact_email" : {
"type" : "string",
"description" : "email address of a support contact",
"format" : "email"
},
"indexes" : {
"type" : "array",
"description" : "individually addressable indexes supported by this endpoint",
"items" : {
"$ref" : "#/components/schemas/index-schema-description"
}
}
},
"example" : {
"indexes" : [ {
"name" : "name",
"id" : "id",
"version" : "version",
"info" : "info"
}, {
"name" : "name",
"id" : "id",
"version" : "version",
"info" : "info"
} ],
"name" : "name",
"id" : "id",
"maintainer" : "maintainer",
"info" : "info",
"contact_email" : ""
}
},
"index-schema-description" : {
"type" : "object",
"properties" : {
"id" : {
"type" : "string",
"description" : "Unique identifier for this index type"
},
"es_id" : {
"type" : "string",
"description" : "elastic search schema mapped by this grid search id"
},
"name" : {
"type" : "string",
"description" : "Display name for this index type"
},
"info" : {
"type" : "string",
"description" : "Documentation about this particular index type"
},
"version" : {
"type" : "string",
"description" : "Version identifier for this endpoint, preferably in semantic versioning style"
}
},
"example" : {
"name" : "name",
"id" : "id",
"version" : "version",
"info" : "info"
}
},
"searchAttributes" : {
"type" : "object",
"properties" : {
"id" : {
"type" : "string",
"description" : "Unique identifier for this index type"
},
"name" : {
"type" : "string",
"description" : "Display name for this index type"
},
"info" : {
"type" : "string",
"description" : "Documentation about this particular index type"
},
"attributes" : {
"type" : "array",
"description" : "array of possible search attributes that can be used to support textual advanced search flags as well as query builder interfaces attribute-by-attribute",
"items" : {
"$ref" : "#/components/schemas/index-search-attributes"
}
}
},
"example" : {
"name" : "name",
"attributes" : [ {
"shortcut_text" : "shortcut_text",
"attrib_name" : "attrib_name",
"attrib_example" : "attrib_example",
"attrib_type" : "date",
"attrib_path" : "path.to.attrib_name",
"info" : "info"
}, {
"shortcut_text" : "shortcut_text",
"attrib_name" : "attrib_name",
"attrib_example" : "attrib_example",
"attrib_type" : "date",
"attrib_path" : "path.to.attrib_name",
"info" : "info"
} ],
"id" : "id",
"info" : "info"
}
},
"index-search-attributes" : {
"type" : "object",
"properties" : {
"attrib_name" : {
"type" : "string",
"description" : "attribute name as defined in the base search schema"
},
"attrib_type" : {
"type" : "string",
"description" : "cue for the type of search attribute in the underlying schema",
"enum" : [ "date", "string", "int", "float", "boolean" ]
},
"attrib_path" : {
"type" : "string",
"description" : "Absolute path of the search attribute in nested elastic search indexed document"
},
"attrib_example" : {
"type" : "string",
"description" : "example for search attribute"
},
"info" : {
"type" : "string",
"description" : "Documentation about the use of the given search type"
},
"shortcut_text" : {
"type" : "string",
"description" : "Text shortcut suitable for use in free text advanced search operations, such that Author:XXXX would cause a specific search on the author information in the target index, if not specified it defaults to the attrib_name"
}
},
"example" : {
"shortcut_text" : "shortcut_text",
"attrib_name" : "attrib_name",
"attrib_example" : "attrib_example",
"attrib_path" : "path.to.attrib_name",
"attrib_type" : "date",
"info" : "info"
}
},
"search_data" : {
"type" : "object",
"properties" : {
"index-schema-description" : {
"$ref" : "#/components/schemas/index-schema-description"
},
"search_result" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/search_data_search_result"
}
}
}
},
"search_data_linkset" : {
"type" : "object",
"properties" : {
"linkset_title" : {
"type" : "string",
"description" : "User friendly title for a link set"
},
"linkset_description" : {
"type" : "string",
"description" : "Text description of a link set"
},
"links" : {
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/search_data_linkset_links"
}
}
}
},
"search_data_search_result" : {
"type" : "object",
"properties" : {
"title" : {
"type" : "string",
"description" : "Descriptive title for search result"
},
"url_link" : {
"type" : "string",
"description" : "Resolvable https link to result data location"
},
"subtitle" : {
"type" : "string",
"description" : "Optional subtitle that can be presented as a highlight, publication info, etc"
},
"content_text" : {
"type" : "string",
"description" : "Bag of attribute-value paired metadata attached to search hit"
},
"links" : {
"$ref" : "#/components/schemas/search_data_linkset"
}
}
},
"search_data_linkset_links" : {
"type" : "object",
"properties" : {
"link_text" : {
"type" : "string",
"description" : "Text for the link"
},
"link_url" : {
"type" : "string",
"description" : "URL for the link"
}
}
}
},
"securitySchemes" : {
"BearerAuth" : {
"type" : "http",
"scheme" : "bearer",
"bearerFormat" : "JWT",
"x-bearerInfoFunc" : "swagger_server.controllers.authorization_controller.check_bearer_auth"
}
}
}
}