Bug 16825: Add API route for getting an item
authorLari Taskula <larit@student.uef.fi>
Mon, 27 Jun 2016 13:03:49 +0000 (16:03 +0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Fri, 13 Sep 2019 13:03:15 +0000 (15:03 +0200)
commit814c5a00b4958e9d9bba18f3fc25159f712f1222
tree565e136b085fe1db1c9dd5984cc33b802bf88b13
parentc67f4ce30a6c5aaeb850f77572be9fe052717cde
Bug 16825: Add API route for getting an item

GET /api/v1/items/{item_id} Gets one Item

This patch adds route to get one item from koha.items table.

To test:
1. Apply patch
2. Open a browser tab on Koha staff and log in (to create CGISESSID
   cookie).
3. Send GET request to http://yourlibrary/api/v1/items/YYY
   where YYY is an existing itemnumber.
4. Make sure the returned data is correct.
5. Run unit tests in t/db_dependent/api/v1/items.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit e9e6537fae1dd921a95f55394ff2b463be8c834a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/REST/V1/Items.pm [new file with mode: 0644]
api/v1/swagger/definitions.json
api/v1/swagger/definitions/item.json [new file with mode: 0644]
api/v1/swagger/parameters.json
api/v1/swagger/parameters/item.json [new file with mode: 0644]
api/v1/swagger/paths.json
api/v1/swagger/paths/items.json [new file with mode: 0644]
t/db_dependent/api/v1/items.t [new file with mode: 0644]