Line 0
Link Here
|
|
|
1 |
{ |
2 |
"/items/{itemnumber}/messages": { |
3 |
"get": { |
4 |
"x-mojo-controller": "Koha::REST::V1::Items::Messages", |
5 |
"operationId": "listItemMessages", |
6 |
"tags": ["items", "item_messages"], |
7 |
"parameters": [ |
8 |
{ |
9 |
"$ref": "../parameters.json#/itemIdPathParam" |
10 |
} |
11 |
], |
12 |
"produces": [ |
13 |
"application/json" |
14 |
], |
15 |
"responses": { |
16 |
"200": { |
17 |
"description": "A list of item messages", |
18 |
"schema": { |
19 |
"type": "array", |
20 |
"items": { |
21 |
"$ref": "../definitions.json#/item_message" |
22 |
} |
23 |
} |
24 |
}, |
25 |
"403": { |
26 |
"description": "Access forbidden", |
27 |
"schema": { |
28 |
"$ref": "../definitions.json#/error" |
29 |
} |
30 |
}, |
31 |
"404": { |
32 |
"description": "Object not found", |
33 |
"schema": { |
34 |
"$ref": "../definitions.json#/error" |
35 |
} |
36 |
} |
37 |
}, |
38 |
"x-koha-authorization": { |
39 |
"permissions": { |
40 |
"catalogue": "1" |
41 |
} |
42 |
} |
43 |
}, |
44 |
"post": { |
45 |
"x-mojo-controller": "Koha::REST::V1::Items::Messages", |
46 |
"operationId": "addItemMessage", |
47 |
"tags": ["items", "item_messages"], |
48 |
"parameters": [ |
49 |
{ |
50 |
"$ref": "../parameters.json#/itemIdPathParam" |
51 |
}, |
52 |
{ |
53 |
"name": "body", |
54 |
"in": "body", |
55 |
"description": "A JSON object representing an item message", |
56 |
"required": true, |
57 |
"schema": { |
58 |
"$ref": "../definitions.json#/item_message" |
59 |
} |
60 |
} |
61 |
], |
62 |
"produces": [ |
63 |
"application/json" |
64 |
], |
65 |
"responses": { |
66 |
"200": { |
67 |
"description": "Item message added", |
68 |
"schema": { |
69 |
"$ref": "../definitions.json#/item_message" |
70 |
} |
71 |
}, |
72 |
"400": { |
73 |
"description": "Missing or wrong parameters", |
74 |
"schema": { |
75 |
"$ref": "../definitions.json#/error" |
76 |
} |
77 |
}, |
78 |
"403": { |
79 |
"description": "Access forbidden", |
80 |
"schema": { |
81 |
"$ref": "../definitions.json#/error" |
82 |
} |
83 |
}, |
84 |
"404": { |
85 |
"description": "Object not found", |
86 |
"schema": { |
87 |
"$ref": "../definitions.json#/error" |
88 |
} |
89 |
}, |
90 |
"500": { |
91 |
"description": "Internal error", |
92 |
"schema": { |
93 |
"$ref": "../definitions.json#/error" |
94 |
} |
95 |
} |
96 |
}, |
97 |
"x-koha-authorization": { |
98 |
"allow-owner": true, |
99 |
"permissions": { |
100 |
"editcatalogue": "1" |
101 |
} |
102 |
} |
103 |
} |
104 |
}, |
105 |
"/items/{itemnumber}/messages/{item_message_id}": { |
106 |
"get": { |
107 |
"x-mojo-controller": "Koha::REST::V1::Items::Messages", |
108 |
"operationId": "getItemMessage", |
109 |
"tags": ["items","item_messages"], |
110 |
"parameters": [ |
111 |
{ |
112 |
"$ref": "../parameters.json#/itemIdPathParam" |
113 |
}, |
114 |
{ |
115 |
"$ref": "../parameters.json#/itemMessageIdPathParam" |
116 |
} |
117 |
], |
118 |
"produces": [ |
119 |
"application/json" |
120 |
], |
121 |
"responses": { |
122 |
"200": { |
123 |
"description": "An item messge", |
124 |
"schema": { |
125 |
"$ref": "../definitions.json#/item_message" |
126 |
} |
127 |
}, |
128 |
"403": { |
129 |
"description": "Access forbidden", |
130 |
"schema": { |
131 |
"$ref": "../definitions.json#/error" |
132 |
} |
133 |
}, |
134 |
"404": { |
135 |
"description": "Vendor not found", |
136 |
"schema": { |
137 |
"$ref": "../definitions.json#/error" |
138 |
} |
139 |
}, |
140 |
"500": { |
141 |
"description": "Internal error", |
142 |
"schema": { |
143 |
"$ref": "../definitions.json#/error" |
144 |
} |
145 |
} |
146 |
}, |
147 |
"x-koha-authorization": { |
148 |
"permissions": { |
149 |
"catalogue": "1" |
150 |
} |
151 |
} |
152 |
}, |
153 |
"put": { |
154 |
"x-mojo-controller": "Koha::REST::V1::Items::Messages", |
155 |
"operationId": "updateItemMessage", |
156 |
"tags": ["items","item_messages"], |
157 |
"parameters": [ |
158 |
{ |
159 |
"$ref": "../parameters.json#/itemIdPathParam" |
160 |
}, |
161 |
{ |
162 |
"$ref": "../parameters.json#/itemMessageIdPathParam" |
163 |
}, |
164 |
{ |
165 |
"name": "body", |
166 |
"in": "body", |
167 |
"description": "A JSON object representing an item message", |
168 |
"required": true, |
169 |
"schema": { |
170 |
"$ref": "../definitions.json#/item_message" |
171 |
} |
172 |
} |
173 |
], |
174 |
"produces": [ |
175 |
"application/json" |
176 |
], |
177 |
"responses": { |
178 |
"200": { |
179 |
"description": "Updated item message", |
180 |
"schema": { |
181 |
"$ref": "../definitions.json#/item_message" |
182 |
} |
183 |
}, |
184 |
"400": { |
185 |
"description": "Missing or wrong parameters", |
186 |
"schema": { |
187 |
"$ref": "../definitions.json#/error" |
188 |
} |
189 |
}, |
190 |
"403": { |
191 |
"description": "Access forbidden", |
192 |
"schema": { |
193 |
"$ref": "../definitions.json#/error" |
194 |
} |
195 |
}, |
196 |
"404": { |
197 |
"description": "Object not found", |
198 |
"schema": { |
199 |
"$ref": "../definitions.json#/error" |
200 |
} |
201 |
} |
202 |
}, |
203 |
"x-koha-authorization": { |
204 |
"permissions": { |
205 |
"editcatalogue": "1" |
206 |
} |
207 |
} |
208 |
}, |
209 |
"delete": { |
210 |
"x-mojo-controller": "Koha::REST::V1::Items::Messages", |
211 |
"operationId": "deleteItemMessage", |
212 |
"tags": ["items","item_messages"], |
213 |
"parameters": [ |
214 |
{ |
215 |
"$ref": "../parameters.json#/itemIdPathParam" |
216 |
}, |
217 |
{ |
218 |
"$ref": "../parameters.json#/itemMessageIdPathParam" |
219 |
} |
220 |
], |
221 |
"produces": ["application/json"], |
222 |
"responses": { |
223 |
"200": { |
224 |
"description": "Item message deleted", |
225 |
"schema": { |
226 |
"type": "string" |
227 |
} |
228 |
}, |
229 |
"403": { |
230 |
"description": "Access forbidden", |
231 |
"schema": { |
232 |
"$ref": "../definitions.json#/error" |
233 |
} |
234 |
}, |
235 |
"404": { |
236 |
"description": "Object not found", |
237 |
"schema": { |
238 |
"$ref": "../definitions.json#/error" |
239 |
} |
240 |
}, |
241 |
"500": { |
242 |
"description": "Internal error", |
243 |
"schema": { |
244 |
"$ref": "../definitions.json#/error" |
245 |
} |
246 |
} |
247 |
}, |
248 |
"x-koha-authorization": { |
249 |
"permissions": { |
250 |
"editcatalogue": "1" |
251 |
} |
252 |
} |
253 |
} |
254 |
} |
255 |
} |