-
Notifications
You must be signed in to change notification settings - Fork 16
/
api.litmaps.com.yaml
528 lines (528 loc) · 14.5 KB
/
api.litmaps.com.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
openapi: 3.0.0
info:
version: '2.00'
title: Litmaps API
description: "This describes the API for Litmaps. Plugin for exploring the scientific literature. View relevant papers to your searches and generate mindmaps of the literature. Discover new papers related to your work using the citation network. To view the seed map of an article, use the article identifier like this: https://app.litmaps.com/seed/article-identifier. Use the Litmaps article identifier with the application url to find the seed map for it like this: https://app.litmaps.com/seed/article-identifier. For example if the article identifier is `123` provide a link to the seed map for it by appending 123 to https://app.litmaps.com/seed/ -> https://app.litmaps.com/seed/123. A seed map in Litmaps, is an overview of the literature that is connected to a specific article. Do not provide a seed map link by providing the search identifier like this: https://app.litmaps.com/seed/search-identifier. Search identifiers are a UUID like this: dec7411b-b43c-471c-bf9e-748ba650c65b"
paths:
/health:
get:
tags:
- General
summary: Health Check
description: Determine if the server is available.
operationId: healthCheck
responses:
200:
description: Healthy response from the server
content:
text:
example: Everything's great.
/articles:
post:
tags:
- Articles
summary: Fetch articles by ID
operationId: fetchArticles
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/ArticleBulkFetch"
responses:
'200':
description: Array of articles.
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/ArticlesWithPageMetadataAndIds"
- $ref: "#/components/schemas/IdsWithPageMetadata"
/keywordSearch:
get:
tags:
- KeywordSearch
summary: Get Keyword Search Result
operationId: keywordSearch
parameters:
- name: query
description: Query string
required: true
in: query
schema:
type: string
- name: page
in: query
required: false
description: Which page to fetch
schema:
type: integer
- name: per
in: query
required: false
description: Size of page to fetch
schema:
type: integer
- name: useReranker
in: query
required: true
description: Use reranker. Always set this property to false.
schema:
type: boolean
example: false
- name: showArticleDetails
description: Decide whether to show article details
required: false
in: query
schema:
type: boolean
default: false
- name: searchEngine
description: Which search engine to use, litmaps or semantic_scholar
required: false
in: query
schema:
type: string
enum: [litmaps, semantic_scholar]
responses:
200:
description: Page of keyword search results
content:
application/json:
schema:
$ref: '#/components/schemas/KeywordSearchResults'
/search:
post:
tags:
- Search
summary: Create Search
operationId: createSearch
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SearchInput'
responses:
200:
description: Search Details
content:
application/json:
schema:
$ref: "#/components/schemas/Search"
get:
tags:
- Search
summary: Get Search
operationId: getSearch
parameters:
- name: searchId
in: path
schema:
type: string
example: '3c72bfd6-1501-4fbc-9a19-848596a69374'
required: true
- name: type
in: query
schema:
type: string
enum: [seed]
required: true
responses:
200:
description: Search object
content:
application/json:
schema:
$ref: '#/components/schemas/Search'
/searchResult:
get:
tags:
- Search
summary: Get Search Result by Search Result Id
operationId: getSearchResultBySearchResultId
parameters:
- name: searchResultId
in: path
schema:
type: string
example: '3c72bfd6-1501-4fbc-9a19-848596a69374'
required: true
- name: type
in: query
schema:
type: string
enum: [seed]
required: true
responses:
200:
description: SearchResult object
content:
application/json:
schema:
$ref: '#/components/schemas/SearchResult'
/article/{id}:
get:
tags:
- Article
summary: Fetch article by ID
operationId: getArticleById
parameters:
- name: id
description: Identifier
required: true
in: path
schema:
type: integer
default: 123
responses:
'200':
description: Article object
content:
application/json:
schema:
$ref: "#/components/schemas/Article"
tags:
- name: General
- name: Article
- name: Articles
- name: Search
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
Error:
type: object
required:
- reason
- error
properties:
reason:
type: string
error:
type: boolean
ArticlesWithPageMetadata:
type: object
properties:
items:
$ref: "#/components/schemas/Articles"
metadata:
$ref: "#/components/schemas/PageMetadata"
ArticlesWithPageMetadataAndIds:
type: object
properties:
items:
$ref: "#/components/schemas/Articles"
ids:
type: array
items:
type: integer
metadata:
$ref: "#/components/schemas/PageMetadata"
IdsWithPageMetadata:
type: object
properties:
ids:
type: array
items:
type: integer
metadata:
$ref: "#/components/schemas/PageMetadata"
Articles:
type: array
items:
$ref: "#/components/schemas/Article"
Search:
type: object
properties:
id:
type: string
type:
type: string
savedSearchId:
type: string
articleIds:
type: array
items:
type: integer
collectionIds:
type: array
items:
type: integer
collectionArticleIds:
type: object
additionalProperties:
type: object
properties:
aid:
type: integer
cid:
type: string
hiddenArticleIds:
type: array
items:
type: integer
workspaceHiddenArticleIds:
type: array
items:
type: integer
createdAt:
type: string
updatedAt:
type: string
Searches:
type: array
items:
$ref: '#/components/schemas/Search'
SearchesWithPagination:
type: object
properties:
items:
$ref: '#/components/schemas/Searches'
metadata:
$ref: '#/components/schemas/PageMetadata'
SearchInput:
type: object
properties:
type:
type: string
enum: [deep, shallow, seed]
articleIds:
type: array
items:
type: integer
collectionIds:
type: array
items:
type: integer
hiddenArticleIds:
type: array
items:
type: integer
filters:
type: array
items:
$ref: '#/components/schemas/SearchFilter'
SearchResult:
type: object
properties:
id:
type: string
results:
type: array
items:
$ref: '#/components/schemas/NetworkSearchResult'
estimatedDuration:
type: number
duration:
type: number
progress:
type: number
state:
type: string
enum: [done, inprogress, created]
createdAt:
type: string
updatedAt:
type: string
deletedAt:
type: string
SearchFilter:
type: object
properties:
date:
$ref: '#/components/schemas/SearchDateFilter'
keywordFilterString:
type: string
example: "Human peroxiredoxin 3"
SearchDateFilter:
type: object
properties:
startDate:
type: string
example: '2001-01-01'
endDate:
type: string
example: '2021-01-01'
SearchResultsWithPageMetadata:
type: object
properties:
results:
$ref: "#/components/schemas/SearchResults"
resultItems:
oneOf:
- $ref: "#/components/schemas/SearchResultsArticles"
- $ref: "#/components/schemas/SearchResultsAuthors"
sortScores:
$ref: "#/components/schemas/SearchResultsSortScores"
metadata:
$ref: "#/components/schemas/PageMetadata"
SearchResultsArticles:
type: array
items:
$ref: "#/components/schemas/Article"
SearchResultsAuthors:
type: string
description: JSON array string of article details
SearchResults:
type: array
items:
type: integer
SearchResultsSortScores:
type: array
items:
type: integer
NetworkSearchResult:
type: object
properties:
s:
description: 'Search result score'
type: integer
example: 20
i:
description: 'Id of article'
type: integer
example: 470092
ArticleDOIs:
type: array
items:
type: string
example: 10.1038/nmat1390
ArticleBulkFetch:
type: object
description: 'Filter objects, can either be {"field": "field-name", "direction": "ascending/descending"} or {"search": "query"}'
properties:
ids:
type: array
items:
type: integer
filters:
type: array
items:
anyOf:
- $ref: "#/components/schemas/ArticleFilter"
- $ref: "#/components/schemas/ArticleSearchFilter"
- $ref: "#/components/schemas/DateFilter"
showArticleDetails:
type: boolean
example: true
page:
type: number
example: 1
per:
type: number
example: 100
ArticleFilter:
type: object
properties:
field:
type: string
enum: [fedges, authors, title, bedges, date]
direction:
type: string
enum: [ascending, descending]
ArticleSearchFilter:
type: object
properties:
search:
type: string
example: Peroxiredoxin
DateFilter:
type: object
properties:
startDate:
type: string
example: 2010-01-01
endDate:
type: string
example: 2021-01-01
ArticleIDArray:
type: object
properties:
ids:
type: array
items:
type: integer
example:
ids:
- 93992432
- 17934395
- 93992431
- 93992430
Article:
type: object
properties:
id:
type: integer
abstract:
type: string
authorString:
type: string
doi:
type: string
url:
type: string
title:
type: string
forwardEdges:
type: string
backwardEdges:
type: string
forwardEdgeCount:
type: integer
backwardEdgeCount:
type: integer
publicationDate:
type: string
publicationTitle:
type: string
example:
id: 1337
abstract: "The paper deals with a method of optimizing harmonically or dynamically excited structures which removes the frequency constraint (that specifies that the structure's first natural frequency of vibration must be greater than the excitation frequency), replaces the displacement constraint by an inequality constraint on the allowable stress and applies finite element approximations to the continuous one-dimensional structures. When the problem is posed in this manner, the feasible design space is disconnected or 'disjoint'."
authorString: Mojgan Afshari; Kamariah Abu Bakar; Wong Su Luan; Bahaman Abu Samah; Foo Say Fooi;
doi: 10.4161/oxim.2.2.8300
publicationDate: "2021-01-01T00:00:00Z"
title: Excitotoxic Insults Lead to Peroxiredoxin Hyperoxidation
url: "http://dx.doi.org/10.4161/oxim.2.2.8300"
forwardEdges: 7931700,86370975,37290888,59586775,25137115,54321521,4395779,69715154,32621102,80824849,36751613,37291226,36753599,36753676,26352909,26353889,38998989,315386,19715625,26354407,43675666,19715897,19716651,72443353,55773514,55774893
forwardEdgeCount: 26
backwardEdges: 63701153,56025463,56022841,17928033,91154308,33371499,29689192
backwardEdgeCount: 7
KeywordSearchResults:
type: object
properties:
results:
type: array
items:
type: integer
resultItems:
type: array
items:
$ref: '#/components/schemas/Articles'
sortScores:
type: array
items:
type: number
metadata:
$ref: '#/components/schemas/PageMetadata'
PageMetadata:
type: object
required:
- page
- total
- per
properties:
page:
type: integer
total:
type: integer
per:
type: integer
example:
page: 1
total: 1000
per: 200
servers:
- description: Litmaps Production API Base URL
url: https://api.litmaps.com