-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger20.json
708 lines (708 loc) · 21.5 KB
/
swagger20.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
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
{
"swagger" : "2.0",
"info" : {
"description" : "Web Service that allows interaction with ReDBox records",
"version" : "1.0",
"title" : "ReDBox Web Service",
"contact" : { }
},
"host" : "demo.redboxresearchdata.com.au",
"basePath" : "/redbox/api/v1",
"tags" : [ {
"name" : "datastream",
"description" : "Metadata about the record. An object typically contains many datastreams. They can be of any media type."
}, {
"name" : "info",
"description" : "Information about the ReDBox instance. Includes information about:\n* the institution the instance belongs to\n* the application version\n* the package types supported by this instance"
}, {
"name" : "messaging",
"description" : "This endpoint allows the client to queue messages for asynchronous processing"
}, {
"name" : "object",
"description" : "Endpoints that allow a client to create and delete ReDBox objects"
}, {
"name" : "objectmeta",
"description" : "Endpoints to manipulate the records object metadata. It’s metadata datastream that contains control information about the object (e.g. the owner of the object, what indexation script (rules) to use etc). The datastream ID for this metadata is TF-OBJ-META."
}, {
"name" : "recordmeta",
"description" : "Endpoints to manipulate the record’s metadata. A json metadata datastream that contains the principle metadata for a record. The forms in ReDBox store all their metadata in this file. The datastream ID for this metadata is metadata.json in Mint and a file that ends in .tfpackage in ReDBox\n"
}, {
"name" : "search"
} ],
"schemes" : [ "http" ],
"paths" : {
"/v1/datastream/{oid}" : {
"get" : {
"tags" : [ "datastream" ],
"summary" : "Get a datastream from a ReDBox object",
"description" : "Get a datastream from a ReDBox object",
"parameters" : [ {
"name" : "oid",
"in" : "path",
"required" : true,
"type" : "string"
}, {
"name" : "datastreamId",
"in" : "query",
"description" : "The identifier of the datastream",
"required" : true,
"type" : "string"
}, {
"name" : "Authorization",
"in" : "header",
"required" : true,
"type" : "string",
"x-example" : "Authorization: Bearer xxxxxxxxxxx"
} ],
"responses" : {
"200" : {
"description" : "The datastream is retrieved",
"schema" : {
"$ref" : "#/definitions/datastream"
}
},
"500" : {
"description" : "General Error",
"schema" : {
"$ref" : "#/definitions/Exception"
}
}
}
},
"post" : {
"tags" : [ "datastream" ],
"summary" : "Create or update a datastream in a ReDBox object",
"description" : "Create or update a datastream in a ReDBox object",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "oid",
"in" : "path",
"required" : true,
"type" : "string"
}, {
"name" : "skipReindex",
"in" : "query",
"description" : "Skip the reindex process. Useful if you are batching many changes to a ReDBox object at once.",
"required" : false,
"type" : "string"
}, {
"name" : "datastreamId",
"in" : "query",
"description" : "The identifier of the datastream",
"required" : true,
"type" : "string"
}, {
"name" : "Authorization",
"in" : "header",
"required" : true,
"type" : "string",
"x-example" : "Authorization: Bearer xxxxxxxxxxx"
}, {
"in" : "body",
"name" : "body",
"required" : false,
"schema" : {
"$ref" : "#/definitions/datastream"
}
} ],
"responses" : {
"200" : {
"description" : "The datastream is created or updated",
"schema" : {
"$ref" : "#/definitions/genericRequestResponse"
}
},
"500" : {
"description" : "General Error",
"schema" : {
"$ref" : "#/definitions/Exception"
}
}
}
},
"delete" : {
"tags" : [ "datastream" ],
"summary" : "Delete a datastream in a ReDBox object",
"description" : "Delete a datastream in a ReDBox object",
"parameters" : [ {
"name" : "oid",
"in" : "path",
"required" : true,
"type" : "string"
}, {
"name" : "skipReindex",
"in" : "query",
"description" : "Skip the reindex process. Useful if you are batching many changes to a ReDBox object at once.",
"required" : false,
"type" : "string"
}, {
"name" : "datastreamId",
"in" : "query",
"description" : "The identifier of the datastream",
"required" : true,
"type" : "string"
}, {
"name" : "Authorization",
"in" : "header",
"required" : true,
"type" : "string",
"x-example" : "Authorization: Bearer xxxxxxxxxxx"
} ],
"responses" : {
"200" : {
"description" : "",
"schema" : {
"type" : "string"
}
}
}
}
},
"/v1/datastream/{oid}/list" : {
"get" : {
"tags" : [ "datastream" ],
"summary" : "List datastreams in an object",
"description" : "List datastreams in an object",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "oid",
"in" : "path",
"required" : true,
"type" : "string"
}, {
"name" : "Authorization",
"in" : "header",
"required" : false,
"type" : "string",
"x-example" : "Authorization: Bearer xxxxxxxxxxx"
} ],
"responses" : {
"200" : {
"description" : "The datastream names are listed",
"schema" : {
"$ref" : "#/definitions/datastreamListResponse"
}
},
"500" : {
"description" : "Oid does not exist in storage",
"schema" : {
"$ref" : "#/definitions/StorageException"
}
}
}
}
},
"/v1/info" : {
"get" : {
"tags" : [ "info" ],
"summary" : "get information about the ReDBox instance",
"description" : "get information about the ReDBox instance",
"produces" : [ "application/json" ],
"parameters" : [ ],
"responses" : {
"200" : {
"description" : "The datastreams are listed",
"schema" : {
"$ref" : "#/definitions/serverInfoResponse"
}
},
"500" : {
"description" : "Server configuration not found",
"schema" : {
"$ref" : "#/definitions/IOException"
}
}
}
}
},
"/v1/messaging/{messageQueue}" : {
"post" : {
"tags" : [ "messaging" ],
"summary" : "Queues a message on the specified message queue",
"description" : "Queues a message on the specified message queue",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "messageQueue",
"in" : "path",
"required" : true,
"type" : "string"
}, {
"name" : "Authorization",
"in" : "header",
"required" : true,
"type" : "string",
"x-example" : "Authorization: Bearer xxxxxxxxxxx"
}, {
"in" : "body",
"name" : "body",
"required" : false,
"schema" : {
"$ref" : "#/definitions/queueMessage"
}
} ],
"responses" : {
"200" : {
"description" : "The record's metadata is updated",
"schema" : {
"$ref" : "#/definitions/genericRequestResponse"
}
},
"500" : {
"description" : "General Error",
"schema" : {
"$ref" : "#/definitions/Exception"
}
}
}
}
},
"/v1/object/{oid}/delete" : {
"delete" : {
"tags" : [ "object" ],
"summary" : "Delete an existing ReDBox object",
"description" : "Delete an existing ReDBox object",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "oid",
"in" : "path",
"required" : true,
"type" : "string"
}, {
"name" : "Authorization",
"in" : "header",
"required" : true,
"type" : "string",
"x-example" : "Authorization: Bearer xxxxxxxxxxx"
} ],
"responses" : {
"200" : {
"description" : "The object is deleted",
"schema" : {
"$ref" : "#/definitions/genericRequestResponse"
}
},
"500" : {
"description" : "General Error",
"schema" : {
"$ref" : "#/definitions/Exception"
}
}
}
}
},
"/v1/object/{packageType}" : {
"post" : {
"tags" : [ "object" ],
"summary" : "create a new ReDBox Object",
"description" : "create a new ReDBox Object",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "packageType",
"in" : "path",
"required" : true,
"type" : "string"
}, {
"name" : "skipReindex",
"in" : "query",
"description" : "Skip the reindex process. Useful if you are batching many changes to a ReDBox object at once.",
"required" : false,
"type" : "string"
}, {
"name" : "oid",
"in" : "query",
"description" : "The desired object identifier. If not supplied, one will be randomly generated",
"required" : false,
"type" : "string"
}, {
"name" : "Authorization",
"in" : "header",
"required" : true,
"type" : "string",
"x-example" : "Authorization: Bearer xxxxxxxxxxx"
} ],
"responses" : {
"200" : {
"description" : "An object is created",
"schema" : {
"$ref" : "#/definitions/genericRequestResponse"
}
},
"500" : {
"description" : "General Error",
"schema" : {
"$ref" : "#/definitions/Exception"
}
}
}
}
},
"/v1/objectmetadata/{oid}" : {
"get" : {
"tags" : [ "objectmeta" ],
"summary" : "gets the record's Object Metadata",
"description" : "gets the record's Object Metadata",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "oid",
"in" : "path",
"required" : true,
"type" : "string"
}, {
"name" : "Authorization",
"in" : "header",
"required" : true,
"type" : "string",
"x-example" : "Authorization: Bearer xxxxxxxxxxx"
} ],
"responses" : {
"200" : {
"description" : "The object metadata is returned",
"schema" : {
"$ref" : "#/definitions/objectMetadataJson"
}
},
"500" : {
"description" : "General Error",
"schema" : {
"$ref" : "#/definitions/Exception"
}
}
}
},
"post" : {
"tags" : [ "objectmeta" ],
"summary" : "updates the record's Object Metadata",
"description" : "updates the record's Object Metadata",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "oid",
"in" : "path",
"required" : true,
"type" : "string"
}, {
"name" : "skipReindex",
"in" : "query",
"description" : "Skip the reindex process. Useful if you are batching many changes to a ReDBox object at once.",
"required" : false,
"type" : "string"
}, {
"name" : "Authorization",
"in" : "header",
"required" : true,
"type" : "string",
"x-example" : "Authorization: Bearer xxxxxxxxxxx"
}, {
"in" : "body",
"name" : "body",
"required" : false,
"schema" : {
"$ref" : "#/definitions/objectMetadataJson"
}
} ],
"responses" : {
"200" : {
"description" : "The object metadata is updated",
"schema" : {
"$ref" : "#/definitions/genericRequestResponse"
}
},
"500" : {
"description" : "General Error",
"schema" : {
"$ref" : "#/definitions/Exception"
}
}
}
}
},
"/v1/recordmetadata/{oid}" : {
"get" : {
"tags" : [ "recordmeta" ],
"summary" : "gets the record's metadata",
"description" : "gets the record's metadata",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "oid",
"in" : "path",
"required" : true,
"type" : "string"
}, {
"name" : "Authorization",
"in" : "header",
"required" : true,
"type" : "string",
"x-example" : "Authorization: Bearer xxxxxxxxxxx"
} ],
"responses" : {
"200" : {
"description" : "The record's metadata is returned",
"schema" : {
"$ref" : "#/definitions/recordMetadataJson"
}
},
"500" : {
"description" : "General Error",
"schema" : {
"$ref" : "#/definitions/Exception"
}
}
}
},
"post" : {
"tags" : [ "recordmeta" ],
"summary" : "updates the record's metadata",
"description" : "updates the record's metadata",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "oid",
"in" : "path",
"required" : true,
"type" : "string"
}, {
"name" : "skipReindex",
"in" : "query",
"description" : "Skip the reindex process. Useful if you are batching many changes to a ReDBox object at once.",
"required" : false,
"type" : "string"
}, {
"name" : "Authorization",
"in" : "header",
"required" : true,
"type" : "string",
"x-example" : "Authorization: Bearer xxxxxxxxxxx"
}, {
"in" : "body",
"name" : "body",
"required" : false,
"schema" : {
"$ref" : "#/definitions/recordMetadataJson"
}
} ],
"responses" : {
"200" : {
"description" : "The record's metadata is updated",
"schema" : {
"$ref" : "#/definitions/genericRequestResponse"
}
},
"500" : {
"description" : "General Error",
"schema" : {
"$ref" : "#/definitions/Exception"
}
}
}
}
},
"/v1/search" : {
"get" : {
"tags" : [ "search" ],
"summary" : "Search ReDBox's search index",
"description" : "Search ReDBox's search index",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "Authorization",
"in" : "header",
"required" : true,
"type" : "string",
"x-example" : "Authorization: Bearer xxxxxxxxxxx"
} ],
"responses" : {
"200" : {
"description" : "Search results returned",
"schema" : {
"$ref" : "#/definitions/solrResponse"
}
},
"500" : {
"description" : "General Error",
"schema" : {
"$ref" : "#/definitions/Exception"
}
}
}
}
},
"/v1/search/{index}" : {
"get" : {
"tags" : [ "search" ],
"summary" : "Search ReDBox's search index",
"description" : "Search ReDBox's search index",
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "index",
"in" : "path",
"required" : true,
"type" : "string"
}, {
"name" : "Authorization",
"in" : "header",
"required" : false,
"type" : "string",
"x-example" : "Authorization: Bearer xxxxxxxxxxx"
} ],
"responses" : {
"200" : {
"description" : "Search results returned",
"schema" : {
"$ref" : "#/definitions/solrResponse"
}
},
"500" : {
"description" : "General Error",
"schema" : {
"$ref" : "#/definitions/Exception"
}
}
}
}
}
},
"definitions" : {
"Exception" : {
"type" : "object",
"description" : "Java type: java.lang.Exception"
},
"IOException" : {
"type" : "object",
"description" : "Java type: java.io.IOException"
},
"StorageException" : {
"type" : "object",
"description" : "Java type: com.googlecode.fascinator.api.storage.StorageException"
},
"anonymousRepresentation5" : {
"type" : "object"
},
"datastreamListResponse" : {
"type" : "object",
"properties" : {
"datastreamIds" : {
"type" : "array",
"description" : "The list of datastream names.",
"items" : {
"type" : "string"
}
}
},
"description" : "List of the datastream names for the object"
},
"genericRequestResponse" : {
"type" : "object",
"required" : [ "code" ],
"properties" : {
"code" : {
"type" : "string",
"description" : "The HTTP response code for the request."
},
"oid" : {
"type" : "string",
"description" : "The oid of the record. Not present when the request was not an action on a record."
}
},
"description" : "The common response json that is given by many API calls"
},
"objectMetadataJson" : {
"type" : "object",
"description" : "JSON object consisting of key/value pairs that map to the java.util.Properties key/values present in the TF-OBJ-META datastream"
},
"queueMessage" : {
"type" : "object"
},
"recordMetadataJson" : {
"type" : "object",
"description" : "JSON that represents the record's metadata. This datastream is named metadata.json in Mint and ends in .tfpackage in ReDBox."
},
"serverInfoResponse" : {
"type" : "object",
"required" : [ "applicationVersion", "institution", "packageTypes" ],
"properties" : {
"applicationVersion" : {
"type" : "string"
},
"institution" : {
"type" : "string",
"description" : "The institution name for this instance"
},
"packageTypes" : {
"type" : "array",
"description" : "List of all the package type names in the system",
"items" : {
"type" : "string"
}
}
}
},
"solrResponse" : {
"type" : "object",
"required" : [ "responseHeader" ],
"properties" : {
"responseHeader" : {
"type" : "object",
"properties" : {
"QTime" : {
"type" : "integer",
"format" : "int32"
},
"params" : {
"type" : "object",
"properties" : {
"ft" : {
"type" : "string"
},
"indent" : {
"type" : "string"
},
"q" : {
"type" : "string"
},
"rows" : {
"type" : "string"
},
"start" : {
"type" : "string"
},
"version" : {
"type" : "string"
},
"wt" : {
"type" : "string"
}
}
},
"response" : {
"type" : "object",
"properties" : {
"docs" : {
"type" : "array",
"items" : {
"type" : "object",
"properties" : { }
}
},
"numFound" : {
"type" : "integer",
"format" : "int32"
},
"start" : {
"type" : "integer",
"format" : "int32"
}
},
"required" : [ "docs", "numFound", "start" ]
},
"status" : {
"type" : "integer",
"format" : "int32"
}
},
"required" : [ "QTime", "params", "response", "status" ]
}
},
"description" : "The response JSON from the application's Apache Solr."
}
}
}