-
Notifications
You must be signed in to change notification settings - Fork 167
/
openapi-user.yaml
730 lines (721 loc) · 21.6 KB
/
openapi-user.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
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
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
openapi: 3.0.3
info:
title: Fess - User API
description: |-
This is a Fess Server based on the OpenAPI 3.0 specification.
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: 14.8.0
externalDocs:
description: API Documentation
url: https://fess.codelibs.org/14.8/api/
servers:
- url: http://localhost:8080/api/v1
tags:
- name: search
description: Search operations
- name: popularword
description: Popular word operations
- name: monitor
description: Monitoring operations
- name: suggest
description: Suggest operations
- name: favorite
description: Favorite operations
paths:
/documents:
get:
tags:
- search
summary: Finds documents by query
description: Finds documents by search conditions
operationId: searchDocuments
parameters:
- name: q
in: query
description: Search words
required: false
schema:
type: string
example: Fess
- name: start
in: query
description: Start position
required: false
schema:
type: integer
minimum: 0
exclusiveMinimum: false
default: 0
example: 0
- name: offset
in: query
description: Offset from a start position
required: false
schema:
type: integer
minimum: 0
exclusiveMinimum: false
default: 0
example: 0
- name: num
in: query
description: The number of returned documents as a search result
required: false
schema:
type: integer
minimum: 0
exclusiveMinimum: false
maximum: 100
exclusiveMaximum: false
default: 20
example: 20
- name: sort
in: query
description: Sorted field name
required: false
schema:
type: string
example: score
- name: fields.label
in: query
description: Filtered label name
required: false
style: form
explode: true
schema:
type: array
items:
type: string
example: [name]
- name: facet.field
in: query
description: Facet field name
required: false
style: form
explode: true
schema:
type: array
items:
type: string
example: [label]
- name: facet.query
in: query
description: Facet query
required: false
style: form
explode: true
schema:
type: array
items:
type: string
example: ["timestamp:[now/d-1d TO *]"]
- name: facet.size
in: query
description: Item size in facets returned by facet.field
required: false
schema:
type: integer
minimum: 0
exclusiveMinimum: false
default: 10
example: 10
- name: facet.minDocCount
in: query
description: Minumum document size in facets
required: false
schema:
type: integer
minimum: 0
exclusiveMinimum: false
default: 0
example: 0
- name: geo.location.point
in: query
description: Latitude and Longitude for Geo search
required: false
schema:
type: string
example: 35.0,139.0
- name: geo.location.distance
in: query
description: Distance for Geo search
required: false
schema:
type: string
example: 10km
- name: lang
in: query
description: Language
required: false
schema:
type: string
example: en
- name: preference
in: query
description: String to specify a shard for searching
required: false
schema:
type: string
example: abc
- name: callback
in: query
description: Callback name for using JSONP
required: false
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
q:
type: string
example: Fess
query_id:
type: string
example: bd60f9579a494dfd8c03db7c8aa905b0
exec_time:
type: number
example: 0.21
query_time:
type: integer
format: int64
example: 0
page_size:
type: integer
example: 20
page_number:
type: integer
example: 1
record_count:
type: integer
format: int64
example: 31625
page_count:
type: integer
example: 1
highlight_params:
type: string
example: "&hq=n2sm&hq=Fess"
next_page:
type: boolean
example: true
prev_page:
type: boolean
example: false
start_record_number:
type: integer
example: 1
end_record_number:
type: integer
example: 20
page_numbers:
type: array
items:
type: string
example: ["1", "2", "3", "4", "5"]
partial:
type: boolean
example: false
search_query:
type: string
example: "(Fess OR n2sm)"
requested_time:
type: integer
format: int64
example: 1507822131845
related_query:
type: array
items:
type: string
example: ["aaa"]
related_contents:
type: array
items:
type: string
example: []
data:
type: array
items:
type: object
properties:
filetype:
type: string
example: html
title:
type: string
example: "Open Source Enterprise Search Server: Fess — Fess 11.0 documentation"
content_title:
type: string
example: "Open Source Enterprise Search Server: Fess — Fe..."
digest:
type: string
example: "Docs » Open Source Enterprise Search Server: Fess Commercial Support Open Source Enterprise Search Server: Fess What is Fess ? Fess is very powerful and easily deployable Enterprise Search Server. ..."
host:
type: string
format: hostname
example: "fess.codelibs.org"
last_modified:
type: string
format: date-time
example: "2017-10-09T22:28:56.000Z"
content_length:
type: string
example: "29624"
timestamp:
type: string
format: date-time
example: "2017-10-09T22:28:56.000Z"
url_link:
type: string
example: "https://fess.codelibs.org/"
created:
type: string
format: date-time
example: "2017-10-10T15:00:48.609Z"
site_path:
type: string
example: "fess.codelibs.org/"
doc_id:
type: string
example: "e79fbfdfb09d4bffb58ec230c68f6f7e"
url:
type: string
format: uri
example: "https://fess.codelibs.org/"
content_description:
type: string
example: "Enterprise Search Server: <strong>Fess</strong> Commercial Support Open...Search Server: <strong>Fess</strong> What is <strong>Fess</strong> ? <strong>Fess</strong> is very powerful...You can install and run <strong>Fess</strong> quickly on any platforms...Java runtime environment. <strong>Fess</strong> is provided under Apache...Apache license. Demo <strong>Fess</strong> is Elasticsearch-based search"
site:
type: string
example: "fess.codelibs.org/"
boost:
type: string
example: "10.0"
mimetype:
type: string
example: "text/html"
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
/documents/all:
get:
tags:
- search
summary: Finds all documents by query
description: Finds all documents by search conditions
operationId: searchAllDocuments
parameters:
- name: q
in: query
description: Search words
required: false
schema:
type: string
example: Fess
- name: num
in: query
description: The number of returned documents as a search result
required: false
schema:
type: integer
minimum: 0
exclusiveMinimum: false
maximum: 100
exclusiveMaximum: false
default: 20
example: 20
- name: sort
in: query
description: Sorted field name
required: false
schema:
type: string
example: score
responses:
'200':
description: Successful operation
content:
application/x-ndjson:
schema:
type: string
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
/labels:
get:
tags:
- search
summary: List labels
description: Returns available labels
operationId: listLabels
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
record_count:
type: integer
example: 9
data:
type: array
items:
type: object
properties:
label:
type: string
example: AWS
value:
type: string
example: aws
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
/favorites:
get:
tags:
- favorite
summary: List favorites
description: Returns favorited document IDs
operationId: listFavorites
parameters:
- name: queryId
in: query
description: Query ID where the document is contained
required: true
schema:
type: string
example: queryid
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
record_count:
type: integer
example: 9
data:
type: array
items:
type: object
properties:
doc_id:
type: string
example: "e79fbfdfb09d4bffb58ec230c68f6f7e"
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
/documents/{docId}/favorite:
post:
tags:
- favorite
summary: Set a favorite mark
description: Set a favorite mark to the document
operationId: setFavorite
parameters:
- name: docId
in: path
description: Document ID to be favorited
required: true
schema:
type: string
example: documentid
- name: queryId
in: query
description: Query ID where the document is contained
required: true
schema:
type: string
example: queryid
responses:
'201':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
result:
type: string
example: created
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
/popular-words:
get:
tags:
- popularword
summary: List popular words
description: Returns available labels
operationId: listPopularWords
parameters:
- name: seed
in: query
description: Random seed to return popular words
required: false
schema:
type: string
example: 123
- name: label
in: query
description: Filtered label name
required: false
style: form
explode: true
schema:
type: array
items:
type: string
example: [label]
- name: field
in: query
description: Field name to generate suggest words
required: false
style: form
explode: true
schema:
type: array
items:
type: string
example: [python]
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
record_count:
type: integer
example: 9
data:
type: array
items:
type: string
example: ["python"]
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
/health:
get:
tags:
- monitor
summary: Check a server status
description: Returns status
operationId: ping
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
status:
type: string
example: green
timed_out:
type: boolean
example: false
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
'503':
description: Service unavailable
content:
application/json:
schema:
type: object
properties:
data:
type: object
properties:
status:
type: string
example: green
timed_out:
type: boolean
example: false
/suggest-words:
get:
tags:
- suggest
summary: Finds suggest words
description: Returns words for suggest
operationId: findSuggestWords
parameters:
- name: q
in: query
description: Inputting characters for search
required: true
schema:
type: string
example: fe
- name: num
in: query
description: The number of suggest words
required: false
schema:
type: integer
minimum: 0
exclusiveMinimum: false
example: 10
default: 10
- name: label
in: query
description: Filtered label name
required: false
style: form
explode: true
schema:
type: array
items:
type: string
example: [label]
- name: field
in: query
description: Field name to generate suggest words
required: false
style: form
explode: true
schema:
type: array
items:
type: string
example: [python]
- name: lang
in: query
description: Target language
required: false
style: form
explode: true
schema:
type: array
items:
type: string
example: [en]
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
query_time:
type: integer
format: int64
example: 18
record_count:
type: integer
example: 355
page_size:
type: integer
example: 10
data:
type: array
items:
type: object
properties:
text:
type: string
example: fess
labels:
type: array
items:
type: string
example: [java, python]
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalServerError'
components:
responses:
BadRequest:
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: Unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
NotFound:
description: Page not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
InternalServerError:
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
schemas:
Error:
type: object
properties:
error_code:
type: string
example: "bd6b0bd6-0144-40bc-9567-c5751dd8eecb"
message:
type: string
example: "This is an error message."