View | Details | Raw Unified | Return to bug 30194
Collapse All | Expand All

(-)a/api/v1/swagger/swagger.yaml (-193 / +167 lines)
Lines 1-5 Link Here
1
---
1
---
2
swagger: "2.0"
2
swagger: 2.0
3
basePath: /api/v1
3
basePath: /api/v1
4
definitions:
4
definitions:
5
  account_line:
5
  account_line:
Lines 65-393 definitions: Link Here
65
  vendor:
65
  vendor:
66
    $ref: definitions/vendor.yaml
66
    $ref: definitions/vendor.yaml
67
paths:
67
paths:
68
  /oauth/token:
68
  /acquisitions/funds:
69
    $ref: paths/oauth.yaml#/~1oauth~1token
69
    $ref: paths/acquisitions_funds.yaml#/~1acquisitions~1funds
70
  /acquisitions/orders:
70
  /acquisitions/orders:
71
    $ref: paths/acquisitions_orders.yaml#/~1acquisitions~1orders
71
    $ref: paths/acquisitions_orders.yaml#/~1acquisitions~1orders
72
  "/acquisitions/orders/{order_id}":
72
  "/acquisitions/orders/{order_id}":
73
    $ref: paths/acquisitions_orders.yaml#/~1acquisitions~1orders~1{order_id}
73
    $ref: "paths/acquisitions_orders.yaml#/~1acquisitions~1orders~1{order_id}"
74
  /acquisitions/vendors:
74
  /acquisitions/vendors:
75
    $ref: paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors
75
    $ref: paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors
76
  "/acquisitions/vendors/{vendor_id}":
76
  "/acquisitions/vendors/{vendor_id}":
77
    $ref: paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors~1{vendor_id}
77
    $ref: "paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors~1{vendor_id}"
78
  /acquisitions/funds:
78
  /advanced_editor/macros:
79
    $ref: paths/acquisitions_funds.yaml#/~1acquisitions~1funds
79
    $ref: paths/advancededitormacros.yaml#/~1advanced_editor~1macros
80
  /advanced_editor/macros/shared:
81
    $ref: paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared
82
  "/advanced_editor/macros/shared/{advancededitormacro_id}":
83
    $ref: "paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared~1{advancededitormacro_id}"
84
  "/advanced_editor/macros/{advancededitormacro_id}":
85
    $ref: "paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1{advancededitormacro_id}"
80
  "/article_requests/{article_request_id}":
86
  "/article_requests/{article_request_id}":
81
    $ref: paths/article_requests.yaml#/~1article_requests~1{article_request_id}
87
    $ref: "paths/article_requests.yaml#/~1article_requests~1{article_request_id}"
82
  "/biblios/{biblio_id}":
88
  "/biblios/{biblio_id}":
83
    $ref: paths/biblios.yaml#/~1biblios~1{biblio_id}
89
    $ref: "paths/biblios.yaml#/~1biblios~1{biblio_id}"
84
  "/biblios/{biblio_id}/checkouts":
90
  "/biblios/{biblio_id}/checkouts":
85
    $ref: paths/biblios.yaml#/~1biblios~1{biblio_id}~1checkouts
91
    $ref: "paths/biblios.yaml#/~1biblios~1{biblio_id}~1checkouts"
86
  "/biblios/{biblio_id}/items":
92
  "/biblios/{biblio_id}/items":
87
    $ref: paths/biblios.yaml#/~1biblios~1{biblio_id}~1items
93
    $ref: "paths/biblios.yaml#/~1biblios~1{biblio_id}~1items"
88
  "/biblios/{biblio_id}/pickup_locations":
94
  "/biblios/{biblio_id}/pickup_locations":
89
    $ref: paths/biblios.yaml#/~1biblios~1{biblio_id}~1pickup_locations
95
    $ref: "paths/biblios.yaml#/~1biblios~1{biblio_id}~1pickup_locations"
90
  "/cash_registers/{cash_register_id}/cashups":
96
  "/cash_registers/{cash_register_id}/cashups":
91
    $ref: paths/cash_registers.yaml#/~1cash_registers~1{cash_register_id}~1cashups
97
    $ref: "paths/cash_registers.yaml#/~1cash_registers~1{cash_register_id}~1cashups"
92
  "/cashups/{cashup_id}":
98
  "/cashups/{cashup_id}":
93
    $ref: paths/cash_registers.yaml#/~1cashups~1{cashup_id}
99
    $ref: "paths/cash_registers.yaml#/~1cashups~1{cashup_id}"
94
  /checkouts:
100
  /checkouts:
95
    $ref: paths/checkouts.yaml#/~1checkouts
101
    $ref: paths/checkouts.yaml#/~1checkouts
96
  "/checkouts/{checkout_id}":
102
  "/checkouts/{checkout_id}":
97
    $ref: paths/checkouts.yaml#/~1checkouts~1{checkout_id}
103
    $ref: "paths/checkouts.yaml#/~1checkouts~1{checkout_id}"
104
  "/checkouts/{checkout_id}/allows_renewal":
105
    $ref: "paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1allows_renewal"
98
  "/checkouts/{checkout_id}/renewal":
106
  "/checkouts/{checkout_id}/renewal":
99
    $ref: paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1renewal
107
    $ref: "paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1renewal"
100
  /circulation-rules/kinds:
108
  /circulation-rules/kinds:
101
    $ref: paths/circulation-rules.yaml#/~1circulation-rules~1kinds
109
    $ref: paths/circulation-rules.yaml#/~1circulation-rules~1kinds
102
  /cities:
110
  /cities:
103
    $ref: paths/cities.yaml#/~1cities
111
    $ref: paths/cities.yaml#/~1cities
104
  "/cities/{city_id}":
112
  "/cities/{city_id}":
105
    $ref: paths/cities.yaml#/~1cities~1{city_id}
113
    $ref: "paths/cities.yaml#/~1cities~1{city_id}"
106
  "/clubs/{club_id}/holds":
114
  "/clubs/{club_id}/holds":
107
    $ref: paths/clubs.yaml#/~1clubs~1{club_id}~1holds
115
    $ref: "paths/clubs.yaml#/~1clubs~1{club_id}~1holds"
108
  /config/smtp_servers:
116
  /config/smtp_servers:
109
    $ref: paths/config_smtp_servers.yaml#/~1config~1smtp_servers
117
    $ref: paths/config_smtp_servers.yaml#/~1config~1smtp_servers
110
  "/config/smtp_servers/{smtp_server_id}":
118
  "/config/smtp_servers/{smtp_server_id}":
111
    $ref: paths/config_smtp_servers.yaml#/~1config~1smtp_servers~1{smtp_server_id}
119
    $ref: "paths/config_smtp_servers.yaml#/~1config~1smtp_servers~1{smtp_server_id}"
112
  /holds:
120
  /holds:
113
    $ref: paths/holds.yaml#/~1holds
121
    $ref: paths/holds.yaml#/~1holds
114
  "/holds/{hold_id}":
122
  "/holds/{hold_id}":
115
    $ref: paths/holds.yaml#/~1holds~1{hold_id}
123
    $ref: "paths/holds.yaml#/~1holds~1{hold_id}"
124
  "/holds/{hold_id}/pickup_location":
125
    $ref: "paths/holds.yaml#/~1holds~1{hold_id}~1pickup_location"
126
  "/holds/{hold_id}/pickup_locations":
127
    $ref: "paths/holds.yaml#/~1holds~1{hold_id}~1pickup_locations"
116
  "/holds/{hold_id}/priority":
128
  "/holds/{hold_id}/priority":
117
    $ref: paths/holds.yaml#/~1holds~1{hold_id}~1priority
129
    $ref: "paths/holds.yaml#/~1holds~1{hold_id}~1priority"
118
  "/holds/{hold_id}/suspension":
130
  "/holds/{hold_id}/suspension":
119
    $ref: paths/holds.yaml#/~1holds~1{hold_id}~1suspension
131
    $ref: "paths/holds.yaml#/~1holds~1{hold_id}~1suspension"
120
  "/holds/{hold_id}/pickup_locations":
132
  /ill_backends:
121
    $ref: paths/holds.yaml#/~1holds~1{hold_id}~1pickup_locations
133
    $ref: paths/ill_backends.yaml#/~1ill_backends
122
  "/holds/{hold_id}/pickup_location":
134
  "/ill_backends/{ill_backend_id}":
123
    $ref: paths/holds.yaml#/~1holds~1{hold_id}~1pickup_location
135
    $ref: "paths/ill_backends.yaml#/~1ill_backends~1{ill_backend_id}"
136
  /illrequests:
137
    $ref: paths/illrequests.yaml#/~1illrequests
138
  /import_batch_profiles:
139
    $ref: paths/import_batch_profiles.yaml#/~1import_batch_profiles
140
  "/import_batch_profiles/{import_batch_profile_id}":
141
    $ref: "paths/import_batch_profiles.yaml#/~1import_batch_profiles~1{import_batch_profile_id}"
124
  /items:
142
  /items:
125
    $ref: paths/items.yaml#/~1items
143
    $ref: paths/items.yaml#/~1items
126
  "/items/{item_id}":
144
  "/items/{item_id}":
127
    $ref: paths/items.yaml#/~1items~1{item_id}
145
    $ref: "paths/items.yaml#/~1items~1{item_id}"
128
  "/items/{item_id}/pickup_locations":
146
  "/items/{item_id}/pickup_locations":
129
    $ref: paths/items.yaml#/~1items~1{item_id}~1pickup_locations
147
    $ref: "paths/items.yaml#/~1items~1{item_id}~1pickup_locations"
130
  /libraries:
148
  /libraries:
131
    $ref: paths/libraries.yaml#/~1libraries
149
    $ref: paths/libraries.yaml#/~1libraries
132
  "/libraries/{library_id}":
150
  "/libraries/{library_id}":
133
    $ref: paths/libraries.yaml#/~1libraries~1{library_id}
151
    $ref: "paths/libraries.yaml#/~1libraries~1{library_id}"
134
  /transfer_limits:
152
  /oauth/token:
135
    $ref: paths/transfer_limits.yaml#/~1transfer_limits
153
    $ref: paths/oauth.yaml#/~1oauth~1token
136
  "/transfer_limits/{limit_id}":
137
    $ref: paths/transfer_limits.yaml#/~1transfer_limits~1{limit_id}
138
  /transfer_limits/batch:
139
    $ref: paths/transfer_limits.yaml#/~1transfer_limits~1batch
140
  "/checkouts/{checkout_id}/allows_renewal":
141
    $ref: paths/checkouts.yaml#/~1checkouts~1{checkout_id}~1allows_renewal
142
  /advanced_editor/macros:
143
    $ref: paths/advancededitormacros.yaml#/~1advanced_editor~1macros
144
  "/advanced_editor/macros/{advancededitormacro_id}":
145
    $ref: paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1{advancededitormacro_id}
146
  /advanced_editor/macros/shared:
147
    $ref: paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared
148
  "/advanced_editor/macros/shared/{advancededitormacro_id}":
149
    $ref: paths/advancededitormacros.yaml#/~1advanced_editor~1macros~1shared~1{advancededitormacro_id}
150
  /patrons:
154
  /patrons:
151
    $ref: paths/patrons.yaml#/~1patrons
155
    $ref: paths/patrons.yaml#/~1patrons
152
  "/patrons/{patron_id}":
156
  "/patrons/{patron_id}":
153
    $ref: paths/patrons.yaml#/~1patrons~1{patron_id}
157
    $ref: "paths/patrons.yaml#/~1patrons~1{patron_id}"
154
  "/patrons/{patron_id}/account":
158
  "/patrons/{patron_id}/account":
155
    $ref: paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account
159
    $ref: "paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account"
156
  "/patrons/{patron_id}/account/credits":
160
  "/patrons/{patron_id}/account/credits":
157
    $ref: paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account~1credits
161
    $ref: "paths/patrons_account.yaml#/~1patrons~1{patron_id}~1account~1credits"
158
  "/patrons/{patron_id}/extended_attributes":
162
  "/patrons/{patron_id}/extended_attributes":
159
    $ref: paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes
163
    $ref: "paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes"
160
  "/patrons/{patron_id}/extended_attributes/{extended_attribute_id}":
164
  "/patrons/{patron_id}/extended_attributes/{extended_attribute_id}":
161
    $ref: paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes~1{extended_attribute_id}
165
    $ref: "paths/patrons_extended_attributes.yaml#/~1patrons~1{patron_id}~1extended_attributes~1{extended_attribute_id}"
162
  "/patrons/{patron_id}/holds":
166
  "/patrons/{patron_id}/holds":
163
    $ref: paths/patrons_holds.yaml#/~1patrons~1{patron_id}~1holds
167
    $ref: "paths/patrons_holds.yaml#/~1patrons~1{patron_id}~1holds"
164
  "/patrons/{patron_id}/password":
168
  "/patrons/{patron_id}/password":
165
    $ref: paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password
169
    $ref: "paths/patrons_password.yaml#/~1patrons~1{patron_id}~1password"
166
  /ill_backends:
167
    $ref: paths/ill_backends.yaml#/~1ill_backends
168
  "/ill_backends/{ill_backend_id}":
169
    $ref: paths/ill_backends.yaml#/~1ill_backends~1{ill_backend_id}
170
  /illrequests:
171
    $ref: paths/illrequests.yaml#/~1illrequests
172
  /import_batch_profiles:
173
    $ref: paths/import_batch_profiles.yaml#/~1import_batch_profiles
174
  "/import_batch_profiles/{import_batch_profile_id}":
175
    $ref: paths/import_batch_profiles.yaml#/~1import_batch_profiles~1{import_batch_profile_id}
176
  "/rotas/{rota_id}/stages/{stage_id}/position":
177
    $ref: paths/rotas.yaml#/~1rotas~1{rota_id}~1stages~1{stage_id}~1position
178
  "/public/biblios/{biblio_id}":
170
  "/public/biblios/{biblio_id}":
179
    $ref: paths/biblios.yaml#/~1public~1biblios~1{biblio_id}
171
    $ref: "paths/biblios.yaml#/~1public~1biblios~1{biblio_id}"
180
  "/public/biblios/{biblio_id}/items":
172
  "/public/biblios/{biblio_id}/items":
181
    $ref: paths/biblios.yaml#/~1public~1biblios~1{biblio_id}~1items
173
    $ref: "paths/biblios.yaml#/~1public~1biblios~1{biblio_id}~1items"
182
  /public/libraries:
174
  /public/libraries:
183
    $ref: paths/libraries.yaml#/~1public~1libraries
175
    $ref: paths/libraries.yaml#/~1public~1libraries
184
  "/public/libraries/{library_id}":
176
  "/public/libraries/{library_id}":
185
    $ref: paths/libraries.yaml#/~1public~1libraries~1{library_id}
177
    $ref: "paths/libraries.yaml#/~1public~1libraries~1{library_id}"
186
  "/public/patrons/{patron_id}/article_requests/{article_request_id}":
178
  "/public/patrons/{patron_id}/article_requests/{article_request_id}":
187
    $ref: paths/article_requests.yaml#/~1public~1patrons~1{patron_id}~1article_requests~1{article_request_id}
179
    $ref: "paths/article_requests.yaml#/~1public~1patrons~1{patron_id}~1article_requests~1{article_request_id}"
188
  "/public/patrons/{patron_id}/password":
189
    $ref: paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1password
190
  "/public/patrons/{patron_id}/guarantors/can_see_charges":
180
  "/public/patrons/{patron_id}/guarantors/can_see_charges":
191
    $ref: paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_charges
181
    $ref: "paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_charges"
192
  "/public/patrons/{patron_id}/guarantors/can_see_checkouts":
182
  "/public/patrons/{patron_id}/guarantors/can_see_checkouts":
193
    $ref: paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_checkouts
183
    $ref: "paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1guarantors~1can_see_checkouts"
184
  "/public/patrons/{patron_id}/password":
185
    $ref: "paths/public_patrons.yaml#/~1public~1patrons~1{patron_id}~1password"
194
  /quotes:
186
  /quotes:
195
    $ref: paths/quotes.yaml#/~1quotes
187
    $ref: paths/quotes.yaml#/~1quotes
196
  "/quotes/{quote_id}":
188
  "/quotes/{quote_id}":
197
    $ref: paths/quotes.yaml#/~1quotes~1{quote_id}
189
    $ref: "paths/quotes.yaml#/~1quotes~1{quote_id}"
198
  /return_claims:
190
  /return_claims:
199
    $ref: paths/return_claims.yaml#/~1return_claims
191
    $ref: paths/return_claims.yaml#/~1return_claims
192
  "/return_claims/{claim_id}":
193
    $ref: "paths/return_claims.yaml#/~1return_claims~1{claim_id}"
200
  "/return_claims/{claim_id}/notes":
194
  "/return_claims/{claim_id}/notes":
201
    $ref: paths/return_claims.yaml#/~1return_claims~1{claim_id}~1notes
195
    $ref: "paths/return_claims.yaml#/~1return_claims~1{claim_id}~1notes"
202
  "/return_claims/{claim_id}/resolve":
196
  "/return_claims/{claim_id}/resolve":
203
    $ref: paths/return_claims.yaml#/~1return_claims~1{claim_id}~1resolve
197
    $ref: "paths/return_claims.yaml#/~1return_claims~1{claim_id}~1resolve"
204
  "/return_claims/{claim_id}":
198
  "/rotas/{rota_id}/stages/{stage_id}/position":
205
    $ref: paths/return_claims.yaml#/~1return_claims~1{claim_id}
199
    $ref: "paths/rotas.yaml#/~1rotas~1{rota_id}~1stages~1{stage_id}~1position"
206
  /suggestions:
200
  /suggestions:
207
    $ref: paths/suggestions.yaml#/~1suggestions
201
    $ref: paths/suggestions.yaml#/~1suggestions
208
  "/suggestions/{suggestion_id}":
202
  "/suggestions/{suggestion_id}":
209
    $ref: paths/suggestions.yaml#/~1suggestions~1{suggestion_id}
203
    $ref: "paths/suggestions.yaml#/~1suggestions~1{suggestion_id}"
204
  /transfer_limits:
205
    $ref: paths/transfer_limits.yaml#/~1transfer_limits
206
  /transfer_limits/batch:
207
    $ref: paths/transfer_limits.yaml#/~1transfer_limits~1batch
208
  "/transfer_limits/{limit_id}":
209
    $ref: "paths/transfer_limits.yaml#/~1transfer_limits~1{limit_id}"
210
info:
210
info:
211
  title: Koha REST API
211
  title: Koha REST API
212
  version: "1"
212
  version: 1
213
  license:
213
  license:
214
    name: GPL v3,
214
    name: "GPL v3,"
215
    url: http://www.gnu.org/licenses/gpl.txt
215
    url: http://www.gnu.org/licenses/gpl.txt
216
  contact:
216
  contact:
217
    name: Koha Development Team
217
    name: Koha Development Team
218
    url: https://koha-community.org/
218
    url: https://koha-community.org/
219
  description: |
219
  description: |
220
    ## Introduction
220
    ## Introduction
221
221
    
222
    This API is documented in **OpenAPI format**.
222
    This API is documented in **OpenAPI format**.
223
223
    
224
    ## Authentication
224
    ## Authentication
225
225
    
226
    The API supports the following authentication mechanisms
226
    The API supports the following authentication mechanisms
227
227
    
228
    * HTTP Basic authentication
228
    * HTTP Basic authentication
229
    * OAuth2 (client credentials grant)
229
    * OAuth2 (client credentials grant)
230
    * Cookie-based
230
    * Cookie-based
231
231
    
232
    Both _Basic authentication_ and the _OAuth2_ flow, need to be enabled
232
    Both _Basic authentication_ and the _OAuth2_ flow, need to be enabled
233
    by system preferences.
233
    by system preferences.
234
234
    
235
    ## Errors
235
    ## Errors
236
236
    
237
    The API uses standard HTTP status codes to indicate the success or failure
237
    The API uses standard HTTP status codes to indicate the success or failure
238
    of the API call. The body of the response will be JSON in the following format:
238
    of the API call. The body of the response will be JSON in the following format:
239
239
    
240
    ```
240
    ```
241
    {
241
    {
242
      "error": "Current settings prevent the passed due date to be applied",
242
      "error": "Current settings prevent the passed due date to be applied",
243
      "error_code": "invalid_due_date"
243
      "error_code": "invalid_due_date"
244
    }
244
    }
245
    ```
245
    ```
246
246
    
247
    Note: Some routes might offer additional attributes in their error responses but that's
247
    Note: Some routes might offer additional attributes in their error responses but that"s
248
    subject to change and thus not documented.
248
    subject to change and thus not documented.
249
249
    
250
    ## Filtering responses
250
    ## Filtering responses
251
251
    
252
    The API allows for some advanced response filtering using a JSON based query syntax. The
252
    The API allows for some advanced response filtering using a JSON based query syntax. The
253
    query can be added to the requests:
253
    query can be added to the requests:
254
254
    
255
    * as a query parameter `q=`
255
    * as a query parameter `q=`
256
    * in the request body
256
    * in the request body
257
    * in a special header `x-koha-query`
257
    * in a special header `x-koha-query`
258
258
    
259
    For simple field equality matches we can use `{ "fieldname": "value" }` where the fieldname
259
    For simple field equality matches we can use `{ "fieldname": "value" }` where the fieldname
260
    matches one of the fields as described in the particular endpoints response object.
260
    matches one of the fields as described in the particular endpoints response object.
261
261
    
262
    We can refine that with more complex matching clauses by nesting a the clause into the
262
    We can refine that with more complex matching clauses by nesting a the clause into the
263
    object; `{ "fieldname": { "clause": "value" } }`.
263
    object; `{ "fieldname": { "clause": "value" } }`.
264
264
    
265
    Available matching clauses include ">", "<", ">=", "<=", "-like", and "-not_like".
265
    Available matching clauses include ">", "<", ">=", "<=", "-like", and "-not_like".
266
266
    
267
    We can filter on multiple fields by adding them to the JSON respresentation. Adding at `HASH`
267
    We can filter on multiple fields by adding them to the JSON respresentation. Adding at `HASH`
268
    level will result in an 'AND' query, whilst combinding them in an `ARRAY` wilth result in an
268
    level will result in an "AND" query, whilst combinding them in an `ARRAY` wilth result in an
269
    'OR' query: `{ "field1": 'value2', "field2": "value2" }` will filter the response to only those
269
    "OR" query: `{ "field1": "value2", "field2": "value2" }` will filter the response to only those
270
    results with both field1 containing value2 AND field2 containing value2 for example.
270
    results with both field1 containing value2 AND field2 containing value2 for example.
271
271
    
272
    ### Examples
272
    ### Examples
273
273
    
274
    The following request would return any patron with firstname "Henry" and lastname "Acevedo";
274
    The following request would return any patron with firstname "Henry" and lastname "Acevedo";
275
275
    
276
    `curl -u koha:koha --request GET 'http://127.0.0.1:8081/api/v1/patrons/' --data-raw '{ "surname": "Acevedo", "firstname": "Henry" }'`
276
    `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": "Acevedo", "firstname": "Henry" }"`
277
277
    
278
    The following request would return any patron whose lastname begins with "Ace";
278
    The following request would return any patron whose lastname begins with "Ace";
279
279
    
280
    `curl -u koha:koha --request GET 'http://127.0.0.1:8081/api/v1/patrons/' --data-raw '{ "surname": { "-like": "Ace%" }'`
280
    `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": { "-like": "Ace%" }"`
281
281
    
282
    The following request would return any patron whilse lastname is 'Acevedo' OR 'Bernardo'
282
    The following request would return any patron whilse lastname is "Acevedo" OR "Bernardo"
283
283
    
284
    `curl -u koha:koha --request GET 'http://127.0.0.1:8081/api/v1/patrons/' --data-raw '{ "surname": [ "Acevedo", "Bernardo" ] }'`
284
    `curl -u koha:koha --request GET "http://127.0.0.1:8081/api/v1/patrons/" --data-raw "{ "surname": [ "Acevedo", "Bernardo" ] }"`
285
285
    
286
    ## Special headers
286
    ## Special headers
287
287
    
288
    ### x-koha-library
288
    ### x-koha-library
289
289
    
290
    This optional header should be passed to give your api request a library
290
    This optional header should be passed to give your api request a library
291
    context; If it is not included in the request, then the request context
291
    context; If it is not included in the request, then the request context
292
    will default to using your api comsumer's assigned home library.
292
    will default to using your api comsumer"s assigned home library.
293
tags:
293
tags:
294
  - name: "article_requests"
294
  - description: "Manage article requests\n"
295
    name: article_requests
295
    x-displayName: Article requests
296
    x-displayName: Article requests
296
    description: |
297
  - description: "Manage bibliographic records\n"
297
      Manage article requests
298
    name: biblios
298
  - name: "biblios"
299
    x-displayName: Biblios
299
    x-displayName: Biblios
300
    description: |
300
  - description: "Manage cash register cashups\n"
301
      Manage bibliographic records
301
    name: cashups
302
  - name: "cashups"
303
    x-displayName: Cashups
302
    x-displayName: Cashups
304
    description: |
303
  - description: "Manage checkouts\n"
305
      Manage cash register cashups
304
    name: checkouts
306
  - name: "checkouts"
307
    x-displayName: Checkouts
305
    x-displayName: Checkouts
308
    description: |
306
  - description: "Manage circulation rules\n"
309
      Manage checkouts
307
    name: circulation_rules
310
  - name: "circulation_rules"
311
    x-displayName: Circulation rules
308
    x-displayName: Circulation rules
312
    description: |
309
  - description: "Manage cities\n"
313
      Manage circulation rules
310
    name: cities
314
  - name: "cities"
315
    x-displayName: Cities
311
    x-displayName: Cities
316
    description: |
312
  - description: "Manage patron clubs\n"
317
      Manage cities
313
    name: clubs
318
  - name: "clubs"
319
    x-displayName: Clubs
314
    x-displayName: Clubs
320
    description: |
315
  - description: "Manage funds for the acquisitions module\n"
321
      Manage patron clubs
316
    name: funds
322
  - name: "funds"
323
    x-displayName: Funds
317
    x-displayName: Funds
324
    description: |
318
  - description: "Manage holds\n"
325
      Manage funds for the acquisitions module
319
    name: holds
326
  - name: "holds"
327
    x-displayName: Holds
320
    x-displayName: Holds
328
    description: |
321
  - description: "Manage ILL module backends\n"
329
      Manage holds
322
    name: illbackends
330
  - name: "illbackends"
331
    x-displayName: ILL backends
323
    x-displayName: ILL backends
332
    description: |
324
  - description: "Manage ILL requests\n"
333
      Manage ILL module backends
325
    name: illrequests
334
  - name: "illrequests"
335
    x-displayName: ILL requests
326
    x-displayName: ILL requests
336
    description: |
327
  - description: "Manage items\n"
337
      Manage ILL requests
328
    name: items
338
  - name: "items"
339
    x-displayName: Items
329
    x-displayName: Items
340
    description: |
330
  - description: "Manage libraries\n"
341
      Manage items
331
    name: libraries
342
  - name: "libraries"
343
    x-displayName: Libraries
332
    x-displayName: Libraries
344
    description: |
333
  - description: "Manage macros\n"
345
      Manage libraries
334
    name: macros
346
  - name: "macros"
347
    x-displayName: Macros
335
    x-displayName: Macros
348
    description: |
336
  - description: "Manage acquisition orders\n"
349
      Manage macros
337
    name: orders
350
  - name: "orders"
351
    x-displayName: Orders
338
    x-displayName: Orders
352
    description: |
339
  - description: "Handle OAuth flows\n"
353
      Manage acquisition orders
340
    name: oauth
354
  - name: "oauth"
341
    x-displayName: OAuth
355
    x-displayName: "OAuth"
342
  - description: "Manage patrons\n"
356
    description: |
343
    name: patrons
357
      Handle OAuth flows
358
  - name: "patrons"
359
    x-displayName: Patrons
344
    x-displayName: Patrons
360
    description: |
345
  - description: "Manage quotes\n"
361
      Manage patrons
346
    name: quotes
362
  - name: "quotes"
363
    x-displayName: Quotes
347
    x-displayName: Quotes
364
    description: |
348
  - description: "Manage return claims\n"
365
      Manage quotes
349
    name: return_claims
366
  - name: "return_claims"
367
    x-displayName: Return claims
350
    x-displayName: Return claims
368
    description: |
351
  - description: "Manage rotas\n"
369
      Manage return claims
352
    name: rotas
370
  - name: "rotas"
371
    x-displayName: Rotas
353
    x-displayName: Rotas
372
    description: |
354
  - description: "Manage SMTP servers configurations\n"
373
      Manage rotas
355
    name: smtp_servers
374
  - name: "smtp_servers"
375
    x-displayName: SMTP servers
356
    x-displayName: SMTP servers
376
    description: |
357
  - description: "Manage transfer limits\n"
377
      Manage SMTP servers configurations
358
    name: transfer
378
  - name: "transfer"
379
    x-displayName: Transfer limits
359
    x-displayName: Transfer limits
380
    description: |
360
  - description: "Manage purchase suggestions\n"
381
      Manage transfer limits
361
    name: suggestions
382
  - name: "suggestions"
362
    x-displayName: Purchase suggestions
383
    x-displayName: "Purchase suggestions"
363
  - description: "Manage vendors for the acquisitions module\n"
384
    description: |
364
    name: vendors
385
      Manage purchase suggestions
365
    x-displayName: Vendors
386
  - name: "vendors"
366
  - description: "Manage batch import profiles\n"
387
    x-displayName: "Vendors"
367
    name: batch_import_profiles
388
    description: |
389
      Manage vendors for the acquisitions module
390
  - name: "batch_import_profiles"
391
    x-displayName: Batch import profiles
368
    x-displayName: Batch import profiles
392
    description: |
393
      Manage batch import profiles
394
- 

Return to bug 30194