Line 0
Link Here
|
0 |
- |
1 |
{ |
|
|
2 |
"/patrons/{patron_id}/extended_attributes": { |
3 |
"get": { |
4 |
"x-mojo-to": "Patrons::Attributes#list_patron_attributes", |
5 |
"operationId": "getPatronAttributes", |
6 |
"tags": [ |
7 |
"patrons", |
8 |
"extended_attributes" |
9 |
], |
10 |
"parameters": [ |
11 |
{ |
12 |
"$ref": "../parameters.json#/patron_id_pp" |
13 |
}, |
14 |
{ |
15 |
"$ref": "../parameters.json#/match" |
16 |
}, |
17 |
{ |
18 |
"$ref": "../parameters.json#/order_by" |
19 |
}, |
20 |
{ |
21 |
"$ref": "../parameters.json#/page" |
22 |
}, |
23 |
{ |
24 |
"$ref": "../parameters.json#/per_page" |
25 |
}, |
26 |
{ |
27 |
"$ref": "../parameters.json#/q_param" |
28 |
}, |
29 |
{ |
30 |
"$ref": "../parameters.json#/q_body" |
31 |
}, |
32 |
{ |
33 |
"$ref": "../parameters.json#/q_header" |
34 |
} |
35 |
], |
36 |
"produces": [ |
37 |
"application/json" |
38 |
], |
39 |
"responses": { |
40 |
"200": { |
41 |
"description": "The patron extended attributes", |
42 |
"schema": { |
43 |
"type": "array", |
44 |
"items": { |
45 |
"$ref": "../definitions.json#/patron_extended_attribute" |
46 |
} |
47 |
} |
48 |
}, |
49 |
"401": { |
50 |
"description": "Authentication required", |
51 |
"schema": { |
52 |
"$ref": "../definitions.json#/error" |
53 |
} |
54 |
}, |
55 |
"403": { |
56 |
"description": "Access forbidden", |
57 |
"schema": { |
58 |
"$ref": "../definitions.json#/error" |
59 |
} |
60 |
}, |
61 |
"404": { |
62 |
"description": "Patron not found", |
63 |
"schema": { |
64 |
"$ref": "../definitions.json#/error" |
65 |
} |
66 |
}, |
67 |
"500": { |
68 |
"description": "Internal server error", |
69 |
"schema": { |
70 |
"$ref": "../definitions.json#/error" |
71 |
} |
72 |
}, |
73 |
"503": { |
74 |
"description": "Under maintenance", |
75 |
"schema": { |
76 |
"$ref": "../definitions.json#/error" |
77 |
} |
78 |
} |
79 |
}, |
80 |
"x-koha-authorization": { |
81 |
"permissions": { |
82 |
"catalogue": "1" |
83 |
} |
84 |
} |
85 |
}, |
86 |
"post": { |
87 |
"x-mojo-to": "Patrons::Attributes#add", |
88 |
"operationId": "addPatronAttribute", |
89 |
"tags": [ |
90 |
"patrons", |
91 |
"extended_attributes" |
92 |
], |
93 |
"parameters": [ |
94 |
{ |
95 |
"$ref": "../parameters.json#/patron_id_pp" |
96 |
}, |
97 |
{ |
98 |
"name": "body", |
99 |
"in": "body", |
100 |
"description": "A JSON representation of the patron extended attribute", |
101 |
"required": true, |
102 |
"schema": { |
103 |
"$ref": "../definitions.json#/patron_extended_attribute" |
104 |
} |
105 |
} |
106 |
], |
107 |
"produces": [ |
108 |
"application/json" |
109 |
], |
110 |
"responses": { |
111 |
"201": { |
112 |
"description": "A successfully created patron extended attribute", |
113 |
"schema": { |
114 |
"$ref": "../definitions.json#/patron_extended_attribute" |
115 |
} |
116 |
}, |
117 |
"400": { |
118 |
"description": "Bad parameter", |
119 |
"schema": { |
120 |
"$ref": "../definitions.json#/error" |
121 |
} |
122 |
}, |
123 |
"401": { |
124 |
"description": "Authentication required", |
125 |
"schema": { |
126 |
"$ref": "../definitions.json#/error" |
127 |
} |
128 |
}, |
129 |
"403": { |
130 |
"description": "Access forbidden", |
131 |
"schema": { |
132 |
"$ref": "../definitions.json#/error" |
133 |
} |
134 |
}, |
135 |
"404": { |
136 |
"description": "Patron not found", |
137 |
"schema": { |
138 |
"$ref": "../definitions.json#/error" |
139 |
} |
140 |
}, |
141 |
"409": { |
142 |
"description": "Conflict in creating resource", |
143 |
"schema": { |
144 |
"$ref": "../definitions.json#/error" |
145 |
} |
146 |
}, |
147 |
"500": { |
148 |
"description": "Internal server error", |
149 |
"schema": { |
150 |
"$ref": "../definitions.json#/error" |
151 |
} |
152 |
}, |
153 |
"503": { |
154 |
"description": "Under maintenance", |
155 |
"schema": { |
156 |
"$ref": "../definitions.json#/error" |
157 |
} |
158 |
} |
159 |
}, |
160 |
"x-koha-authorization": { |
161 |
"permissions": { |
162 |
"borrowers": "edit_borrowers" |
163 |
} |
164 |
} |
165 |
}, |
166 |
"put": { |
167 |
"x-mojo-to": "Patrons::Attributes#overwrite", |
168 |
"operationId": "overwritePatronAttributes", |
169 |
"tags": [ |
170 |
"patrons", |
171 |
"extended_attributes" |
172 |
], |
173 |
"parameters": [ |
174 |
{ |
175 |
"$ref": "../parameters.json#/patron_id_pp" |
176 |
}, |
177 |
{ |
178 |
"name": "body", |
179 |
"in": "body", |
180 |
"description": "A JSON representation of the patron extended attribute", |
181 |
"required": true, |
182 |
"schema": { |
183 |
"type": "array", |
184 |
"items": { |
185 |
"$ref": "../definitions.json#/patron_extended_attribute" |
186 |
} |
187 |
} |
188 |
} |
189 |
], |
190 |
"produces": [ |
191 |
"application/json" |
192 |
], |
193 |
"responses": { |
194 |
"200": { |
195 |
"description": "The successfully created patron extended attributes", |
196 |
"schema": { |
197 |
"type": "array", |
198 |
"items": { |
199 |
"$ref": "../definitions.json#/patron_extended_attribute" |
200 |
} |
201 |
} |
202 |
}, |
203 |
"400": { |
204 |
"description": "Bad parameters", |
205 |
"schema": { |
206 |
"$ref": "../definitions.json#/error" |
207 |
} |
208 |
}, |
209 |
"401": { |
210 |
"description": "Authentication required", |
211 |
"schema": { |
212 |
"$ref": "../definitions.json#/error" |
213 |
} |
214 |
}, |
215 |
"403": { |
216 |
"description": "Access forbidden", |
217 |
"schema": { |
218 |
"$ref": "../definitions.json#/error" |
219 |
} |
220 |
}, |
221 |
"404": { |
222 |
"description": "Patron not found", |
223 |
"schema": { |
224 |
"$ref": "../definitions.json#/error" |
225 |
} |
226 |
}, |
227 |
"409": { |
228 |
"description": "Conflict in creating resource", |
229 |
"schema": { |
230 |
"$ref": "../definitions.json#/error" |
231 |
} |
232 |
}, |
233 |
"500": { |
234 |
"description": "Internal server error", |
235 |
"schema": { |
236 |
"$ref": "../definitions.json#/error" |
237 |
} |
238 |
}, |
239 |
"503": { |
240 |
"description": "Under maintenance", |
241 |
"schema": { |
242 |
"$ref": "../definitions.json#/error" |
243 |
} |
244 |
} |
245 |
}, |
246 |
"x-koha-authorization": { |
247 |
"permissions": { |
248 |
"borrowers": "edit_borrowers" |
249 |
} |
250 |
} |
251 |
} |
252 |
}, |
253 |
"/patrons/{patron_id}/extended_attributes/{extended_attribute_id}": { |
254 |
"delete": { |
255 |
"x-mojo-to": "Patrons::Attributes#delete", |
256 |
"operationId": "deletePatronAttribute", |
257 |
"tags": [ |
258 |
"patrons", |
259 |
"extended_attributes" |
260 |
], |
261 |
"parameters": [ |
262 |
{ |
263 |
"$ref": "../parameters.json#/patron_id_pp" |
264 |
}, |
265 |
{ |
266 |
"name": "extended_attribute_id", |
267 |
"in": "path", |
268 |
"description": "Internal patron extended attribute identifier", |
269 |
"type": "integer", |
270 |
"required": true |
271 |
} |
272 |
], |
273 |
"produces": [ |
274 |
"application/json" |
275 |
], |
276 |
"responses": { |
277 |
"204": { |
278 |
"description": "Extended patron attribute deleted" |
279 |
}, |
280 |
"401": { |
281 |
"description": "Authentication required", |
282 |
"schema": { |
283 |
"$ref": "../definitions.json#/error" |
284 |
} |
285 |
}, |
286 |
"403": { |
287 |
"description": "Access forbidden", |
288 |
"schema": { |
289 |
"$ref": "../definitions.json#/error" |
290 |
} |
291 |
}, |
292 |
"404": { |
293 |
"description": "Patron not found", |
294 |
"schema": { |
295 |
"$ref": "../definitions.json#/error" |
296 |
} |
297 |
}, |
298 |
"500": { |
299 |
"description": "Internal server error", |
300 |
"schema": { |
301 |
"$ref": "../definitions.json#/error" |
302 |
} |
303 |
}, |
304 |
"503": { |
305 |
"description": "Under maintenance", |
306 |
"schema": { |
307 |
"$ref": "../definitions.json#/error" |
308 |
} |
309 |
} |
310 |
}, |
311 |
"x-koha-authorization": { |
312 |
"permissions": { |
313 |
"borrowers": "edit_borrowers" |
314 |
} |
315 |
} |
316 |
} |
317 |
} |
318 |
} |