-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmod-linked-data.yaml
246 lines (237 loc) · 7.23 KB
/
mod-linked-data.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
openapi: 3.0.0
info:
title: Linked Data API
version: v1
description: Linked Data service API
paths:
/reindex:
put:
operationId: reindex
description: Start the process of reindexing of resources in the database
parameters:
- $ref: '#/components/parameters/x-okapi-tenant-header'
- $ref: '#/components/parameters/full'
responses:
'204':
description: Started the process of reindex
'400':
$ref: '#/components/responses/badRequestResponse'
'500':
$ref: '#/components/responses/internalServerErrorResponse'
/resource:
post:
operationId: createResource
description: Create a Resource
parameters:
- $ref: '#/components/parameters/x-okapi-tenant-header'
requestBody:
content:
application/json:
schema:
$ref: schema/resourceDto.json
responses:
'200':
description: Created resource
content:
application/json:
schema:
$ref: schema/resourceDto.json
'400':
$ref: '#/components/responses/badRequestResponse'
'500':
$ref: '#/components/responses/internalServerErrorResponse'
get:
operationId: getResourceShortInfoPage
description: Get page of resource short info
parameters:
- $ref: '#/components/parameters/type'
- $ref: '#/components/parameters/x-okapi-tenant-header'
- $ref: '#/components/parameters/pageNumber'
- $ref: '#/components/parameters/pageSize'
responses:
'200':
description: Page of resource short info as json
content:
application/json:
example: example/resourceShortInfo.sample
schema:
$ref: schema/resourceShortInfoPage.json
'500':
$ref: '#/components/responses/internalServerErrorResponse'
/resource/{id}:
get:
operationId: getResourceById
description: Get a resource by id
parameters:
- $ref: '#/components/parameters/x-okapi-tenant-header'
- $ref: '#/components/parameters/id'
responses:
'200':
description: Resource as json string
content:
application/json:
schema:
$ref: schema/resourceDto.json
'400':
$ref: '#/components/responses/badRequestResponse'
'404':
description: No Resource is found by id
'500':
$ref: '#/components/responses/internalServerErrorResponse'
put:
operationId: updateResource
description: Update a resource by id
parameters:
- $ref: '#/components/parameters/x-okapi-tenant-header'
- $ref: '#/components/parameters/id'
requestBody:
content:
application/json:
example: example/resourceRequest.sample
schema:
$ref: schema/resourceDto.json
responses:
'200':
description: Updated resource
content:
application/json:
schema:
$ref: schema/resourceDto.json
'400':
$ref: '#/components/responses/badRequestResponse'
'404':
description: No resource is found by id
'500':
$ref: '#/components/responses/internalServerErrorResponse'
delete:
operationId: deleteResource
description: Delete a resource by id
parameters:
- $ref: '#/components/parameters/x-okapi-tenant-header'
- $ref: '#/components/parameters/id'
responses:
'204':
description: Resource deleted
'404':
description: No resource is found by id
'500':
$ref: '#/components/responses/internalServerErrorResponse'
/resource/{id}/marc:
get:
operationId: getResourceMarcViewById
description: Get a marc view of resource by id
parameters:
- $ref: '#/components/parameters/x-okapi-tenant-header'
- $ref: '#/components/parameters/id'
responses:
'200':
description: Marc view of resource as json string
content:
application/json:
schema:
$ref: schema/resourceMarcViewDto.json
'400':
$ref: '#/components/responses/badRequestResponse'
'404':
description: No Resource is found by id
'500':
$ref: '#/components/responses/internalServerErrorResponse'
/profile:
get:
operationId: getProfile
description: Get profile
responses:
'200':
description: Profile
content:
text/plain;charset=utf-8:
schema:
type: string
example: example/profile.sample
'404':
description: No profile is found
'500':
$ref: '#/components/responses/internalServerErrorResponse'
/graph/resource/{id}:
get:
operationId: getResourceGraphById
description: Get a resource graph by id
parameters:
- $ref: '#/components/parameters/x-okapi-tenant-header'
- $ref: '#/components/parameters/id'
responses:
'200':
description: Resource graph as json string
content:
application/json:
schema:
$ref: schema/graphDto/resourceGraphDto.json
'400':
$ref: '#/components/responses/badRequestResponse'
'404':
description: No Resource graph is found by id
'500':
$ref: '#/components/responses/internalServerErrorResponse'
components:
parameters:
id:
name: id
in: path
required: true
description: Bibframe resource id
schema:
type: integer
format: int64
x-okapi-tenant-header:
name: x-okapi-tenant
in: header
description: X-Okapi-Tenant header value
schema:
type: string
pageNumber:
name: pageNumber
in: query
required: false
description: Page number for paginated endpoint, default is 0
schema:
type: integer
pageSize:
name: pageSize
in: query
required: false
description: Page size for paginated endpoint, default is 100
schema:
type: integer
type:
name: type
in: query
required: false
description: 'Resource type, for example: http://bibfra.me/vocab/lite/Instance'
example: 'http://bibfra.me/vocab/lite/Instance'
schema:
type: string
full:
name: full
in: query
required: false
description: Reindex all records if true, otherwise only not indexed
schema:
type: boolean
schemas:
errorResponse:
$ref: schema/error/errors.json
responses:
badRequestResponse:
description: Validation errors
content:
application/json:
example: examples/validationErrorResponse.sample
schema:
$ref: "#/components/schemas/errorResponse"
internalServerErrorResponse:
description: When unhandled exception occurred during code execution, e.g. NullPointerException
content:
application/json:
example: example/unknownError.sample
schema:
$ref: "#/components/schemas/errorResponse"