-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi-v3.json
More file actions
1007 lines (1007 loc) · 38.4 KB
/
Copy pathopenapi-v3.json
File metadata and controls
1007 lines (1007 loc) · 38.4 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
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
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"openapi": "3.0.1",
"info": {
"title": "ScienceDB API Doc",
"description": "ScienceDB API",
"termsOfService": "https://www.scidb.cn/en/terms",
"version": "1.0.0"
},
"servers": [
{
"url": "//www.scidb.cn/api/sdb-openapi-service/"
}
],
"tags": [
{
"name": "open-api-controller",
"description": "Open Api Controller"
},
{
"name": "sushi-controller",
"description": "Sushi Controller"
}
],
"paths": {
"/harvest": {
"get": {
"tags": [
"open-api-controller"
],
"summary": "按数据集发布时间区间(start_time 与 end_time)批量获取数据集",
"description": "结果按发布时间降序排列",
"operationId": "harvestUsingGET",
"parameters": [
{
"name": "end_time",
"in": "query",
"description": "日期格式为 'yyyy-MM-dd'",
"allowEmptyValue": false,
"schema": {
"type": "string",
"default": "2099-01-01"
}
},
{
"name": "page",
"in": "query",
"description": "页码",
"allowEmptyValue": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 1
}
},
{
"name": "size",
"in": "query",
"description": "每页条数",
"allowEmptyValue": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 10
}
},
{
"name": "start_time",
"in": "query",
"description": "日期格式为 'yyyy-MM-dd'",
"allowEmptyValue": false,
"schema": {
"type": "string",
"default": "1970-01-01"
}
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/APIResult«SearchResult»"
}
}
}
}
},
"deprecated": false
}
},
"/json": {
"get": {
"tags": [
"open-api-controller"
],
"summary": "按 DOI 获取数据集的详细信息",
"description": "信息格式参照 https://schema.org/Dataset",
"operationId": "jsonUsingGET",
"parameters": [
{
"name": "doi",
"in": "query",
"description": "数据集的 DOI",
"required": true,
"allowEmptyValue": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
},
"deprecated": false
}
},
"/metrics": {
"get": {
"tags": [
"open-api-controller"
],
"summary": "按 DOI 查询数据集的统计指标",
"description": "按 DOI 查询数据集的统计指标",
"operationId": "metricsUsingGET",
"parameters": [
{
"name": "doi",
"in": "query",
"description": "数据集的 DOI",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/APIResult«MetricsResult»"
}
}
}
}
},
"deprecated": false
}
},
"/report/{id}": {
"get": {
"tags": [
"sushi-controller"
],
"summary": "按 id 返回 COUNTER 数据集报告",
"operationId": "getReportByIdUsingGET",
"parameters": [
{
"name": "id",
"in": "path",
"description": "报告 id",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "publisher",
"in": "query",
"description": "出版方",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SUSHIReport"
}
}
}
}
},
"deprecated": false
}
},
"/reports": {
"get": {
"tags": [
"sushi-controller"
],
"summary": "获取报告列表",
"description": "返回该 API 为指定应用支持的报告列表。",
"operationId": "getReports",
"parameters": [
{
"name": "page[number]",
"in": "query",
"description": "页码",
"allowEmptyValue": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 1
}
},
{
"name": "page[size]",
"in": "query",
"description": "每页条数",
"allowEmptyValue": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 10
}
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SUSHIReportPage"
}
}
}
}
},
"deprecated": false
}
},
"/search": {
"get": {
"tags": [
"open-api-controller"
],
"summary": "分页搜索数据集",
"description": "结果按发布时间降序排列",
"operationId": "searchUsingGET",
"parameters": [
{
"name": "page",
"in": "query",
"description": "页码",
"allowEmptyValue": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 1
}
},
{
"name": "range",
"in": "query",
"description": "限定最近多少天内发布的数据,不传表示搜索全部时间范围",
"allowEmptyValue": false,
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"name": "size",
"in": "query",
"description": "每页条数",
"allowEmptyValue": false,
"schema": {
"type": "integer",
"format": "int32",
"default": 10
}
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/APIResult«SearchResult»"
}
}
}
}
},
"deprecated": false
}
},
"/status": {
"get": {
"tags": [
"sushi-controller"
],
"summary": "获取 API 服务状态",
"description": "返回该 API 所支持的报告服务的当前状态。",
"operationId": "getAPIStatus",
"parameters": [
{
"name": "platform",
"in": "query",
"description": "请求报告数据所针对的平台名称。若服务只提供单一平台的报告数据,可以省略。",
"allowEmptyValue": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "该 API 所支持的报告服务的状态。",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SUSHIServiceStatus"
}
}
}
}
}
},
"deprecated": false
}
}
},
"components": {
"schemas": {
"APIResult«MetricsResult»": {
"title": "APIResult«MetricsResult»",
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "20000 表示成功,其他值表示错误",
"format": "int32"
},
"message": {
"type": "string",
"description": "code 对应的中文说明"
},
"getMessageEn": {
"type": "string",
"description": "code 对应的英文说明"
},
"data": {
"$ref": "#/components/schemas/MetricsResult"
}
},
"description": "接口统一返回结构"
},
"APIResult«SearchResult»": {
"title": "APIResult«SearchResult»",
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "20000 表示成功,其他值表示错误",
"format": "int32"
},
"message": {
"type": "string",
"description": "code 对应的中文说明"
},
"getMessageEn": {
"type": "string",
"description": "code 对应的英文说明"
},
"data": {
"$ref": "#/components/schemas/SearchResult"
}
},
"description": "接口统一返回结构"
},
"COUNTERDatasetAttributes": {
"title": "COUNTERDatasetAttributes",
"required": [
"Type",
"Value"
],
"type": "object",
"properties": {
"Type": {
"type": "string",
"description": "条目属性类型,依据 NISO Journal Article Version 等规范定义……",
"example": "dataset-version",
"enum": [
"dataset-version",
"dataset=-type",
"proprietary"
]
},
"Value": {
"type": "string",
"description": "条目属性的值",
"example": "VoR"
}
}
},
"COUNTERDatasetContributors": {
"title": "COUNTERDatasetContributors",
"required": [
"Type",
"Value"
],
"type": "object",
"properties": {
"Type": {
"type": "string",
"example": "name",
"enum": [
"name",
"orcid",
"isni"
]
},
"Value": {
"type": "string",
"description": "贡献者标识的值",
"example": "John Smith"
}
}
},
"COUNTERDatasetDates": {
"title": "COUNTERDatasetDates",
"required": [
"type",
"value"
],
"type": "object",
"properties": {
"type": {
"type": "string",
"example": "pub-date",
"enum": [
"pub-date",
"first-accessed-online",
"proprietary"
]
},
"value": {
"type": "string",
"description": "数据集日期的值",
"example": "2002-01-15"
}
}
},
"COUNTERDatasetIdentifiers": {
"title": "COUNTERDatasetIdentifiers",
"required": [
"type",
"value"
],
"type": "object",
"properties": {
"type": {
"type": "string",
"example": "doi",
"enum": [
"doi",
"proprietary",
"uri"
]
},
"value": {
"type": "string",
"description": "数据集标识的值",
"example": "0931-865"
}
}
},
"COUNTERDatasetInstance": {
"title": "COUNTERDatasetInstance",
"type": "object",
"properties": {
"access-method": {
"type": "string",
"description": "标识该使用行为是 'Regular'(用户在内容站点上做研究的常规访问),还是 'Machine'(为文本与数据挖掘 TDM 抓取内容)",
"example": "regular",
"enum": [
"regular",
"machine"
]
},
"count": {
"type": "integer",
"format": "int64"
},
"metric-type": {
"type": "string",
"enum": [
"total-dataset-investigations",
"unique-dataset-investigations",
"total-dataset-requests",
"unique-dataset-requests"
]
}
}
},
"COUNTERDatasetPerformance": {
"title": "COUNTERDatasetPerformance",
"required": [
"instance",
"period"
],
"type": "object",
"properties": {
"instance": {
"type": "array",
"items": {
"$ref": "#/components/schemas/COUNTERDatasetInstance"
}
},
"period": {
"$ref": "#/components/schemas/COUNTERDatasetPeriod"
}
}
},
"COUNTERDatasetPeriod": {
"title": "COUNTERDatasetPeriod",
"type": "object",
"properties": {
"begin-date": {
"type": "string",
"format": "date-time"
},
"end-date": {
"type": "string",
"format": "date-time"
}
}
},
"COUNTERDatasetReport": {
"title": "COUNTERDatasetReport",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "报告 id。"
},
"report-header": {
"$ref": "#/components/schemas/SUSHIReportHeader"
},
"report-datasets": {
"type": "array",
"description": "数据集列表。",
"items": {
"$ref": "#/components/schemas/COUNTERDatasetUsage"
}
}
},
"description": "描述 COUNTER 数据集报告的组织形式。响应可以包含 Report_Header(可选)与 Report_Datasets(使用量统计)。"
},
"COUNTERDatasetUsage": {
"title": "COUNTERDatasetUsage",
"required": [
"data-type",
"dataset-title",
"performance",
"platform",
"publisher",
"publisher-id"
],
"type": "object",
"properties": {
"data-type": {
"type": "string",
"description": "所报告数据集的类型。",
"example": "Dataset",
"enum": [
"Dataset"
]
},
"dataset-attributes": {
"type": "array",
"description": "与该数据集相关的其他属性。",
"items": {
"$ref": "#/components/schemas/COUNTERDatasetAttributes"
}
},
"dataset-contributors": {
"type": "array",
"description": "数据集贡献者(即创建者)的标识。",
"items": {
"$ref": "#/components/schemas/COUNTERDatasetContributors"
}
},
"dataset-dates": {
"type": "array",
"description": "与该数据集相关的出版日期或其他日期。",
"items": {
"$ref": "#/components/schemas/COUNTERDatasetDates"
}
},
"dataset-id": {
"type": "array",
"description": "报告中该数据集的标识",
"items": {
"$ref": "#/components/schemas/COUNTERDatasetIdentifiers"
}
},
"dataset-title": {
"type": "string",
"description": "所报告数据集的名称。",
"example": "Lake Erie Fish Community Data"
},
"performance": {
"type": "array",
"description": "报告中该数据集对应的使用量数据",
"items": {
"$ref": "#/components/schemas/COUNTERDatasetPerformance"
}
},
"platform": {
"type": "string",
"description": "平台名称",
"example": "Science Data Bank"
},
"publisher": {
"type": "string",
"description": "数据集出版方名称",
"example": "Science Data Bank"
},
"publisher-id": {
"type": "array",
"description": "出版方的标识。",
"items": {
"$ref": "#/components/schemas/COUNTERPublisherIdentifiers"
}
},
"yop": {
"type": "string",
"description": "出版年份,格式为 'yyyy'。未知填 '0001',在印填 '9999'。",
"example": "2010"
}
},
"description": "定义数据集报告中 Report_Datasets 的输出结构。"
},
"COUNTERPublisherIdentifiers": {
"title": "COUNTERPublisherIdentifiers",
"required": [
"Type",
"Value"
],
"type": "object",
"properties": {
"Type": {
"type": "string",
"example": "ORCID",
"enum": [
"ISNI",
"ORCID",
"GRID"
]
},
"Value": {
"type": "string",
"description": "出版方标识的值",
"example": "1234-1234-1234-1234"
}
}
},
"MetricsResult": {
"title": "MetricsResult",
"type": "object",
"properties": {
"titleZh": {
"type": "string",
"description": "数据集的中文标题"
},
"titleEn": {
"type": "string",
"description": "数据集的英文标题"
},
"visit": {
"type": "integer",
"description": "数据集的访问次数",
"format": "int32"
},
"download": {
"type": "integer",
"description": "数据集的下载次数",
"format": "int32"
},
"refPapers": {
"type": "integer",
"description": "引用该数据集的论文数量",
"format": "int32"
}
},
"description": "'/harvest'、'/search' 与 '/metrics' 接口记录的包装结构"
},
"SUSHIErrorModel": {
"title": "SUSHIErrorModel",
"required": [
"Code",
"Message",
"Severity"
],
"type": "object",
"properties": {
"Code": {
"type": "integer",
"description": "错误码,含义见错误码表。",
"format": "int32",
"example": 3040
},
"Data": {
"type": "string",
"description": "服务端提供的补充信息,用于进一步说明该错误。",
"example": "Usage data has not been processed for all requested months."
},
"Help_URL": {
"type": "string",
"description": "描述错误详情的 URL。"
},
"Message": {
"type": "string",
"description": "错误的文字描述。",
"example": "Partial Data Returned."
},
"Severity": {
"type": "string",
"description": "错误的严重级别。",
"example": "Warning",
"enum": [
"Warning",
"Fatal",
"Debug",
"Info"
]
}
},
"description": "错误与异常的通用表示结构。"
},
"SUSHIPageMeta": {
"title": "SUSHIPageMeta",
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "页码。",
"format": "int32",
"example": 1
},
"total": {
"type": "integer",
"description": "报告总数。",
"format": "int64",
"example": 100
},
"totalPages": {
"type": "integer",
"description": "总页数。",
"format": "int32",
"example": 10
}
},
"description": "报告的分页包装结构"
},
"SUSHIReport": {
"title": "SUSHIReport",
"type": "object",
"properties": {
"report": {
"$ref": "#/components/schemas/COUNTERDatasetReport"
}
}
},
"SUSHIReportHeader": {
"title": "SUSHIReportHeader",
"required": [
"release",
"report-id",
"report-name"
],
"type": "object",
"properties": {
"created": {
"type": "string",
"description": "报告生成时间",
"format": "date-time"
},
"created-by": {
"type": "string",
"description": "生成该报告的机构名称。",
"example": "Science Data Bank"
},
"exceptions": {
"type": "array",
"description": "生成报告过程中遇到的异常列表。",
"items": {
"$ref": "#/components/schemas/SUSHIErrorModel"
}
},
"release": {
"type": "string",
"description": "报告的发布版本。",
"example": "RD1"
},
"report-attributes": {
"type": "array",
"description": "作用于该报告的零个或多个附加属性,属性决定报告的明细程度。",
"items": {
"type": "object",
"properties": {}
}
},
"report-filters": {
"type": "array",
"description": "该报告使用的零个或多个过滤条件,通常对应请求里传入的过滤条件,用于限定报告的数据范围。",
"items": {
"type": "object",
"properties": {}
}
},
"report-id": {
"type": "string",
"description": "报告的 ID、代码或简称,通常与请求中 Report 参数传入的代码一致。",
"example": "DSR"
},
"report-name": {
"type": "string",
"description": "报告的完整名称。",
"example": "Dataset Report"
}
},
"description": "通用报告头,描述所请求的报告、请求方、客户、生效的过滤条件、生效的 reportAttributes 以及出现的异常。"
},
"SUSHIReportList": {
"title": "SUSHIReportList",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "报告 id。",
"example": "sciencedb-2022-01"
},
"report-header": {
"$ref": "#/components/schemas/SUSHIReportHeader"
}
},
"description": "报告的列表包装结构"
},
"SUSHIReportPage": {
"title": "SUSHIReportPage",
"type": "object",
"properties": {
"reports": {
"type": "array",
"description": "报告列表",
"items": {
"$ref": "#/components/schemas/SUSHIReportList"
}
},
"meta": {
"$ref": "#/components/schemas/SUSHIPageMeta"
}
},
"description": "报告的分页包装结构"
},
"SUSHIServiceStatus": {
"title": "SUSHIServiceStatus",
"required": [
"ServiceActive"
],
"type": "object",
"properties": {
"Alerts": {
"type": "array",
"description": "与服务中断及状态相关的告警。",
"items": {
"type": "object",
"properties": {}
}
},
"Description": {
"type": "string",
"description": "服务说明。",
"example": "COUNTER Research Data Usage Reports for the UK Data Service - ReShare."
},
"Note": {
"type": "string",
"description": "关于该服务的一般性说明。",
"example": "A given customer can request a maximum of 5 requests per day for a given report"
},
"RegistryURL": {
"type": "string",
"description": "如有,指向包含该服务补充信息的独立注册表 URL。",
"example": "https://www.projectcounter.org/counter-user/ebsco-database/"
},
"ServiceActive": {
"type": "boolean",
"description": "标识该服务当前是否可以提供报告。",
"example": true
}
}
},
"SearchRecord": {
"title": "SearchRecord",
"type": "object",
"properties": {
"clicks": {
"type": "integer",
"format": "int64"
},
"language": {
"type": "string"
},
"referenceNumber": {
"type": "integer",
"format": "int64"
},
"title": {
"type": "string",
"description": "数据集标题"
},
"introduction": {
"type": "string",
"description": "数据集简介"
},
"keyword": {
"type": "string",
"description": "数据集关键词,整体放在引号内",
"example": "kw_1;kw_2;kw_3"
},
"author": {
"type": "string",
"description": "数据集作者,整体放在引号内",
"example": "2021-08-11 18:20:51"
},
"publishDate": {
"type": "string",
"description": "在 ScienceDB 的发布日期",
"example": "author_1;author_2;author_3"
},
"taxonomy": {
"type": "string",
"description": "在 ScienceDB 的学科分类,整体放在引号内,格式为 'code'-'taxonomy'",
"example": "170-Earth science;00-Others"
},
"year": {
"type": "string",
"description": "在 ScienceDB 的发布年份",
"example": "2021"
},
"doi": {
"type": "string",
"description": "数据集的 DOI",
"example": "10.11922/sciencedb.00101"
}
},
"description": "'/harvest' 与 '/search' 接口返回的数据集简要记录"
},
"SearchResult": {
"title": "SearchResult",
"type": "object",
"properties": {
"pageNo": {
"type": "integer",
"format": "int32"
},
"pageSize": {
"type": "integer",
"format": "int32"
},
"totalPages": {
"type": "integer",
"description": "记录总页数",
"format": "int32"
},
"totalElements": {
"type": "integer",
"description": "记录总数",
"format": "int32"
},
"recommendData": {
"type": "array",
"description": "当前页的记录列表",
"items": {
"$ref": "#/components/schemas/SearchRecord"
}
}