forked from jensoleg/swagger-ui
-
Notifications
You must be signed in to change notification settings - Fork 7
/
list.yaml
137 lines (118 loc) · 4.18 KB
/
list.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
get:
summary: List all preprints
description: >-
A paginated list of preprints from all preprint providers.
The returned preprints are sorted by their creation date, with the most recent
preprints appearing first.
#### Returns
Returns a JSON object containing `data` and `links` keys.
The `data` key contains an array of 10 preprints.
Each resource in the array is a separate preprint object.
The `links` key contains a dictionary of links that can be used
for [pagination](#Introduction_pagination).
This request should never return an error.
#### Filtering
You can optionally request that the response only include preprints that
match your filters by utilizing the `filter` query parameter, e.g.
https://api.osf.io/v2/preprints/?filter[provider]=socarxiv.
Preprints may be filtered by their `id`, `is_published`, `date_created`,
`date_modified`, and `provider`.
tags:
- Preprints
operationId: preprints_list
x-response-schema: 'Preprint'
responses:
'200':
description: OK
schema:
type: array
items:
$ref: 'definition.yaml'
examples:
application/json:
data:
- relationships:
node:
links:
related:
href: 'https://api.osf.io/v2/nodes/5xuck/'
meta: {}
citation:
links:
related:
href: 'https://api.osf.io/v2/preprints/hqb2p/citation/'
meta: {}
identifiers:
links:
related:
href: 'https://api.osf.io/v2/preprints/hqb2p/identifiers/'
meta: {}
primary_file:
links:
related:
href: 'https://api.osf.io/v2/files/5894204f594d900200ed23f2/'
meta: {}
license:
links:
related:
href: 'https://api.osf.io/v2/licenses/563c1cf88c5e4a3877f9e96a/'
meta: {}
provider:
links:
related:
href: 'https://api.osf.io/v2/preprint_providers/socarxiv/'
meta: {}
links:
self: 'https://api.osf.io/v2/preprints/hqb2p/'
html: 'https://osf.io/preprints/socarxiv/hqb2p/'
preprint_doi: 'https://dx.doi.org/10.5072/FK2OSF.IO/HQB2P'
attributes:
doi: null
license_record:
copyright_holders: []
year: '2017'
date_modified: '2017-02-03T06:19:00.158000'
is_preprint_orphan: false
date_published: '2017-02-03T06:18:59.788000'
subjects:
- - text: Social and Behavioral Sciences
id: 584240da54be81056cecac48
- text: Political Science
id: 584240da54be81056cecac1a
date_created: '2017-02-03T06:16:57.129000'
is_published: true
type: preprints
id: hqb2p
links:
first:
last: https://api.osf.io/v2/preprints/?page=172
prev:
next: https://api.osf.io/v2/preprints/?page=2
meta:
total: 1720
per_page: 10
post:
summary: Create a preprint
description: >-
Creates a new preprint.
#### Returns
Returns a JSON object with a `data` key containing the representation of the created
preprint, if the request is successful.
If the request is unsuccessful, an `errors` key containing
information about the failure will be returned. Refer to the [list of error codes]()
to understand why this request may have failed.
parameters:
- in: body
name: data
required: true
schema:
$ref: 'definition.yaml'
tags:
- Preprints
operationId: preprints_create
consumes:
- application/json
x-response-schema: 'Preprint'
responses:
'201':
description: 'Success'