-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbatchPrint.yaml
239 lines (238 loc) · 6.96 KB
/
batchPrint.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
openapi: 3.0.0
info:
title: Batch printing
version: v1
paths:
/print/entries:
parameters:
- $ref: headers/okapi-permissions.yaml
- $ref: headers/okapi-tenant.yaml
- $ref: headers/okapi-token.yaml
- $ref: headers/okapi-url.yaml
- $ref: headers/okapi-user.yaml
get:
description: >
Get batch printing entries with optional CQL query.
X-Okapi-Permissions must include batch-print.entries.collection.get
parameters:
- $ref: parameters/limit.yaml
- $ref: parameters/offset.yaml
- $ref: parameters/query.yaml
operationId: getPrintEntries
responses:
"200":
description: Print entries
content:
application/json:
schema:
$ref: schemas/entries.json
"400":
$ref: "#/components/responses/trait_400"
"404":
$ref: "#/components/responses/trait_404"
"500":
$ref: "#/components/responses/trait_500"
delete:
description: >
Delete batch printing entries by comma separated IDs.
X-Okapi-Permissions must include batch-print.entries.collection.delete
parameters:
- $ref: parameters/ids.yaml
operationId: deletePrintEntries
responses:
"204":
description: Print entries deleted
"400":
$ref: "#/components/responses/trait_400"
"500":
$ref: "#/components/responses/trait_500"
post:
description: >
Create print entry.
X-Okapi-Permissions must include batch-print.entries.item.post
operationId: postPrintEntry
requestBody:
content:
application/json:
schema:
$ref: schemas/entry.json
responses:
"204":
description: Print entry created
"400":
$ref: "#/components/responses/trait_400"
"403":
$ref: "#/components/responses/trait_403"
"413":
$ref: "#/components/responses/trait_413"
"500":
$ref: "#/components/responses/trait_500"
/print/entries/{id}:
parameters:
- $ref: headers/okapi-permissions.yaml
- $ref: headers/okapi-tenant.yaml
- $ref: headers/okapi-token.yaml
- $ref: headers/okapi-url.yaml
- $ref: headers/okapi-user.yaml
- in: path
name: id
required: true
description: Print entry identifier
schema:
type: string
format: uuid
get:
description: >
Get print entry by id.
X-Okapi-Permissions must include batch-print.entries.item.get
operationId: getPrintEntry
responses:
"200":
description: Print entry
content:
application/json:
schema:
$ref: schemas/entry.json
"400":
$ref: "#/components/responses/trait_400"
"403":
$ref: "#/components/responses/trait_403"
"404":
$ref: "#/components/responses/trait_404"
"500":
$ref: "#/components/responses/trait_500"
delete:
description: >
Delete print entry.
X-Okapi-Permissions must include batch-print.entries.item.delete
operationId: deletePrintEntry
responses:
"204":
description: Print entry deleted
"400":
$ref: "#/components/responses/trait_400"
"404":
$ref: "#/components/responses/trait_404"
"500":
$ref: "#/components/responses/trait_500"
put:
description: >
Update print entry.
X-Okapi-Permissions must include batch-print.entries.item.put
operationId: updatePrintEntry
requestBody:
content:
application/json:
schema:
$ref: schemas/entry.json
responses:
"204":
description: Print entry update
"400":
$ref: "#/components/responses/trait_400"
"404":
$ref: "#/components/responses/trait_404"
"500":
$ref: "#/components/responses/trait_500"
/mail:
parameters:
- $ref: headers/okapi-permissions.yaml
- $ref: headers/okapi-tenant.yaml
- $ref: headers/okapi-token.yaml
- $ref: headers/okapi-url.yaml
- $ref: headers/okapi-user.yaml
post:
description: >
Send mail to create print entry.
X-Okapi-Permissions must include batch-print.entries.mail.post
operationId: saveMail
requestBody:
content:
application/json:
schema:
$ref: schemas/messageRequest.json
responses:
"200":
description: Print entry created
content:
application/json:
schema:
$ref: schemas/messageResponse.json
"400":
$ref: "#/components/responses/trait_400"
"403":
$ref: "#/components/responses/trait_403"
"500":
$ref: "#/components/responses/trait_500"
/print/batch-creation:
parameters:
- $ref: headers/okapi-permissions.yaml
- $ref: headers/okapi-tenant.yaml
- $ref: headers/okapi-token.yaml
- $ref: headers/okapi-url.yaml
- $ref: headers/okapi-user.yaml
post:
description: >
Send mail to create print entry.
X-Okapi-Permissions must include batch-print.print.write
operationId: createBatch
responses:
"204":
description: Print entry created
"400":
$ref: "#/components/responses/trait_400"
"403":
$ref: "#/components/responses/trait_403"
"500":
$ref: "#/components/responses/trait_500"
components:
responses:
trait_400:
description: Bad request
content:
text/plain:
schema:
type: string
example: Invalid JSON in request
application/json:
schema:
type: object
example: {"error":"Invalid JSON in request"}
trait_403:
description: Forbidden
content:
text/plain:
schema:
type: string
example: Insufficient permissions to access resource
application/json:
schema:
type: object
example: {"error":"Insufficient permissions to access resource"}
trait_404:
description: Not Found
content:
text/plain:
schema:
type: string
example: Identifier 596d9f60-cda3-44d2-a4a1-2f48b7d4d23c not found
application/json:
schema:
type: object
example: {"error":"Identifier 596d9f60-cda3-44d2-a4a1-2f48b7d4d23c not found"}
trait_413:
description: Payload Too Large
content:
text/plain:
schema:
type: string
trait_500:
description: Internal error
content:
text/plain:
schema:
type: string
example: Internal server error, contact administrator
schemas:
errors:
$ref: schemas/errors.json