Line 0
Link Here
|
|
|
1 |
{ |
2 |
"/advancededitormacros": { |
3 |
"get": { |
4 |
"x-mojo-to": "AdvancedEditorMacros#list", |
5 |
"operationId": "listMacros", |
6 |
"tags": ["advancededitormacros"], |
7 |
"produces": [ |
8 |
"application/json" |
9 |
], |
10 |
"parameters": [{ |
11 |
"name": "name", |
12 |
"in": "query", |
13 |
"description": "Case insensative search on macro name", |
14 |
"required": false, |
15 |
"type": "string" |
16 |
}], |
17 |
"responses": { |
18 |
"200": { |
19 |
"description": "A list of macros", |
20 |
"schema": { |
21 |
"type": "array", |
22 |
"items": { |
23 |
"$ref": "../definitions.json#/advancededitormacro" |
24 |
} |
25 |
} |
26 |
}, |
27 |
"403": { |
28 |
"description": "Access forbidden", |
29 |
"schema": { |
30 |
"$ref": "../definitions.json#/error" |
31 |
} |
32 |
}, |
33 |
"500": { |
34 |
"description": "Internal error", |
35 |
"schema": { |
36 |
"$ref": "../definitions.json#/error" |
37 |
} |
38 |
}, |
39 |
"503": { |
40 |
"description": "Under maintenance", |
41 |
"schema": { |
42 |
"$ref": "../definitions.json#/error" |
43 |
} |
44 |
} |
45 |
}, |
46 |
"x-koha-authorization": { |
47 |
"permissions": { |
48 |
"catalogue": "1" |
49 |
} |
50 |
} |
51 |
}, |
52 |
"post": { |
53 |
"x-mojo-to": "AdvancedEditorMacros#add", |
54 |
"operationId": "addAdvancedEditorMacro", |
55 |
"tags": ["advancededitormacros"], |
56 |
"parameters": [{ |
57 |
"name": "body", |
58 |
"in": "body", |
59 |
"description": "A JSON object containing informations about the new macro", |
60 |
"required": true, |
61 |
"schema": { |
62 |
"$ref": "../definitions.json#/advancededitormacro" |
63 |
} |
64 |
}], |
65 |
"produces": [ |
66 |
"application/json" |
67 |
], |
68 |
"responses": { |
69 |
"201": { |
70 |
"description": "Macro added", |
71 |
"schema": { |
72 |
"$ref": "../definitions.json#/advancededitormacro" |
73 |
} |
74 |
}, |
75 |
"401": { |
76 |
"description": "Authentication required", |
77 |
"schema": { |
78 |
"$ref": "../definitions.json#/error" |
79 |
} |
80 |
}, |
81 |
"403": { |
82 |
"description": "Access forbidden", |
83 |
"schema": { |
84 |
"$ref": "../definitions.json#/error" |
85 |
} |
86 |
}, |
87 |
"500": { |
88 |
"description": "Internal error", |
89 |
"schema": { |
90 |
"$ref": "../definitions.json#/error" |
91 |
} |
92 |
}, |
93 |
"503": { |
94 |
"description": "Under maintenance", |
95 |
"schema": { |
96 |
"$ref": "../definitions.json#/error" |
97 |
} |
98 |
} |
99 |
}, |
100 |
"x-koha-authorization": { |
101 |
"permissions": { |
102 |
"parameters": "manage_advancededitormacros" |
103 |
} |
104 |
} |
105 |
} |
106 |
}, |
107 |
"/advancededitormacros/{advancededitormacro_id}": { |
108 |
"get": { |
109 |
"x-mojo-to": "AdvancedEditorMacros#get", |
110 |
"operationId": "getAdvancedEditorMacro", |
111 |
"tags": ["advancededitormacros"], |
112 |
"parameters": [{ |
113 |
"$ref": "../parameters.json#/advancededitormacro_id_pp" |
114 |
}], |
115 |
"produces": [ |
116 |
"application/json" |
117 |
], |
118 |
"responses": { |
119 |
"200": { |
120 |
"description": "A macro", |
121 |
"schema": { |
122 |
"$ref": "../definitions.json#/advancededitormacro" |
123 |
} |
124 |
}, |
125 |
"404": { |
126 |
"description": "AdvancedEditorMacro not found", |
127 |
"schema": { |
128 |
"$ref": "../definitions.json#/error" |
129 |
} |
130 |
}, |
131 |
"500": { |
132 |
"description": "Internal error", |
133 |
"schema": { |
134 |
"$ref": "../definitions.json#/error" |
135 |
} |
136 |
}, |
137 |
"503": { |
138 |
"description": "Under maintenance", |
139 |
"schema": { |
140 |
"$ref": "../definitions.json#/error" |
141 |
} |
142 |
} |
143 |
}, |
144 |
"x-koha-authorization": { |
145 |
"permissions": { |
146 |
"catalogue": "1" |
147 |
} |
148 |
} |
149 |
}, |
150 |
"put": { |
151 |
"x-mojo-to": "AdvancedEditorMacro#update", |
152 |
"operationId": "updateAdvancedEditorMacro", |
153 |
"tags": ["advancededitormacros"], |
154 |
"parameters": [{ |
155 |
"$ref": "../parameters.json#/advancededitormacro_id_pp" |
156 |
}, { |
157 |
"name": "body", |
158 |
"in": "body", |
159 |
"description": "An advanced editor macro object", |
160 |
"required": true, |
161 |
"schema": { |
162 |
"$ref": "../definitions.json#/advancededitormacro" |
163 |
} |
164 |
}], |
165 |
"produces": [ |
166 |
"application/json" |
167 |
], |
168 |
"responses": { |
169 |
"200": { |
170 |
"description": "An advanced editor macro", |
171 |
"schema": { |
172 |
"$ref": "../definitions.json#/advancededitormacro" |
173 |
} |
174 |
}, |
175 |
"401": { |
176 |
"description": "Authentication required", |
177 |
"schema": { |
178 |
"$ref": "../definitions.json#/error" |
179 |
} |
180 |
}, |
181 |
"403": { |
182 |
"description": "Access forbidden", |
183 |
"schema": { |
184 |
"$ref": "../definitions.json#/error" |
185 |
} |
186 |
}, |
187 |
"404": { |
188 |
"description": "Macro not found", |
189 |
"schema": { |
190 |
"$ref": "../definitions.json#/error" |
191 |
} |
192 |
}, |
193 |
"500": { |
194 |
"description": "Internal error", |
195 |
"schema": { |
196 |
"$ref": "../definitions.json#/error" |
197 |
} |
198 |
}, |
199 |
"503": { |
200 |
"description": "Under maintenance", |
201 |
"schema": { |
202 |
"$ref": "../definitions.json#/error" |
203 |
} |
204 |
} |
205 |
}, |
206 |
"x-koha-authorization": { |
207 |
"permissions": { |
208 |
"parameters": "manage_advancededitormacro" |
209 |
} |
210 |
} |
211 |
}, |
212 |
"delete": { |
213 |
"x-mojo-to": "AdvancedEditorMacros#delete", |
214 |
"operationId": "deleteAdvancedEditorMacro", |
215 |
"tags": ["advancededitormacros"], |
216 |
"parameters": [{ |
217 |
"$ref": "../parameters.json#/advancededitormacro_id_pp" |
218 |
}], |
219 |
"produces": [ |
220 |
"application/json" |
221 |
], |
222 |
"responses": { |
223 |
"200": { |
224 |
"description": "Advanced editor macro deleted", |
225 |
"schema": { |
226 |
"type": "string" |
227 |
} |
228 |
}, |
229 |
"401": { |
230 |
"description": "Authentication required", |
231 |
"schema": { |
232 |
"$ref": "../definitions.json#/error" |
233 |
} |
234 |
}, |
235 |
"403": { |
236 |
"description": "Access forbidden", |
237 |
"schema": { |
238 |
"$ref": "../definitions.json#/error" |
239 |
} |
240 |
}, |
241 |
"404": { |
242 |
"description": "Macro not found", |
243 |
"schema": { |
244 |
"$ref": "../definitions.json#/error" |
245 |
} |
246 |
}, |
247 |
"500": { |
248 |
"description": "Internal error", |
249 |
"schema": { |
250 |
"$ref": "../definitions.json#/error" |
251 |
} |
252 |
}, |
253 |
"503": { |
254 |
"description": "Under maintenance", |
255 |
"schema": { |
256 |
"$ref": "../definitions.json#/error" |
257 |
} |
258 |
} |
259 |
}, |
260 |
"x-koha-authorization": { |
261 |
"permissions": { |
262 |
"parameters": "manage_advancededitormacros" |
263 |
} |
264 |
} |
265 |
} |
266 |
} |
267 |
} |