Bug 24909: Route spec
[koha.git] / api / v1 / swagger / paths / biblios.json
blob530993ff33adf28d6a006b0da6fd5ea654a3902f
2   "/biblios/{biblio_id}": {
3     "get": {
4       "x-mojo-to": "Biblios#get",
5       "operationId": "getBiblio",
6       "tags": [
7         "biblios"
8       ],
9       "parameters": [
10         {
11           "$ref": "../parameters.json#/biblio_id_pp"
12         }
13       ],
14       "produces": [
15         "application/json",
16         "application/marcxml+xml",
17         "application/marc-in-json",
18         "application/marc"
19       ],
20       "responses": {
21         "200": {
22           "description": "A biblio"
23         },
24         "401": {
25           "description": "Authentication required",
26           "schema": {
27             "$ref": "../definitions.json#/error"
28           }
29         },
30         "403": {
31           "description": "Access forbidden",
32           "schema": {
33             "$ref": "../definitions.json#/error"
34           }
35         },
36         "404": {
37           "description": "Biblio not found",
38           "schema": {
39             "$ref": "../definitions.json#/error"
40           }
41         },
42         "406": {
43           "description": "Not acceptable",
44           "schema": {
45             "type": "array",
46             "description": "Accepted content-types",
47             "items": {
48                 "type": "string"
49             }
50           }
51         },
52         "500": {
53           "description": "Internal server error",
54           "schema": {
55             "$ref": "../definitions.json#/error"
56           }
57         },
58         "503": {
59           "description": "Under maintenance",
60           "schema": {
61             "$ref": "../definitions.json#/error"
62           }
63         }
64       },
65       "x-koha-authorization": {
66         "permissions": {
67             "catalogue": "1"
68         }
69       }
70     },
71     "delete": {
72       "x-mojo-to": "Biblios#delete",
73       "operationId": "deleteBiblio",
74       "tags": [
75         "biblios"
76       ],
77       "parameters": [
78         {
79           "$ref": "../parameters.json#/biblio_id_pp"
80         }
81       ],
82       "produces": [
83         "application/json"
84       ],
85       "responses": {
86         "204": {
87           "description": "Biblio deleted",
88           "schema": {
89             "type": "string"
90           }
91         },
92         "401": {
93           "description": "Authentication required",
94           "schema": {
95             "$ref": "../definitions.json#/error"
96           }
97         },
98         "403": {
99           "description": "Access forbidden",
100           "schema": {
101             "$ref": "../definitions.json#/error"
102           }
103         },
104         "404": {
105           "description": "Biblio not found",
106           "schema": {
107             "$ref": "../definitions.json#/error"
108           }
109         },
110         "409": {
111           "description": "Unable to perform action on biblio",
112           "schema": {
113             "$ref": "../definitions.json#/error"
114           }
115         },
116         "500": {
117           "description": "Internal error",
118           "schema": {
119             "$ref": "../definitions.json#/error"
120           }
121         },
122         "503": {
123           "description": "Under maintenance",
124           "schema": {
125             "$ref": "../definitions.json#/error"
126           }
127         }
128       },
129       "x-koha-authorization": {
130         "permissions": {
131           "editcatalogue": "edit_catalogue"
132         }
133       }
134     }
135   },
136   "/public/biblios/{biblio_id}": {
137     "get": {
138       "x-mojo-to": "Biblios#get_public",
139       "operationId": "getBiblioPublic",
140       "tags": [
141         "biblios"
142       ],
143       "parameters": [
144         {
145           "$ref": "../parameters.json#/biblio_id_pp"
146         }
147       ],
148       "produces": [
149         "application/marcxml+xml",
150         "application/marc-in-json",
151         "application/marc",
152         "text/plain"
153       ],
154       "responses": {
155         "200": {
156           "description": "A biblio"
157         },
158         "401": {
159           "description": "Authentication required",
160           "schema": {
161             "$ref": "../definitions.json#/error"
162           }
163         },
164         "403": {
165           "description": "Access forbidden",
166           "schema": {
167             "$ref": "../definitions.json#/error"
168           }
169         },
170         "404": {
171           "description": "Biblio not found",
172           "schema": {
173             "$ref": "../definitions.json#/error"
174           }
175         },
176         "406": {
177           "description": "Not acceptable",
178           "schema": {
179             "type": "array",
180             "description": "Accepted content-types",
181             "items": {
182                 "type": "string"
183             }
184           }
185         },
186         "500": {
187           "description": "Internal server error",
188           "schema": {
189             "$ref": "../definitions.json#/error"
190           }
191         },
192         "503": {
193           "description": "Under maintenance",
194           "schema": {
195             "$ref": "../definitions.json#/error"
196           }
197         }
198       }
199     }
200   }