[Koha-bugs] [Bug 16330] Add routes to add, update and delete patrons

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Feb 19 12:34:04 CET 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330

Josef Moravec <josef.moravec at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #71920|0                           |1
        is obsolete|                            |
  Attachment #71921|0                           |1
        is obsolete|                            |
  Attachment #71922|0                           |1
        is obsolete|                            |
  Attachment #71923|0                           |1
        is obsolete|                            |
  Attachment #71924|0                           |1
        is obsolete|                            |
  Attachment #71925|0                           |1
        is obsolete|                            |

--- Comment #104 from Josef Moravec <josef.moravec at gmail.com> ---
Created attachment 71933
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71933&action=edit
Bug 16330: Add routes to add, update and delete patrons

This patch adds support for add, edit and delete patrons via REST API.

GET  /api/v1/patrons                   Get patron list from params
GET  /api/v1/patrons/<borrowernumber>  Get single patron
POST /api/v1/patrons                   Create a new patron
PUT  /api/v1/patrons/<borrowernumber>  Update data about patron
DEL  /api/v1/patrons/<borrowernumber>  Delete a patron

Revised Test plan:
1) Apply this patch
2) Run tests perl t/db_dependent/api/v1/patrons.t
3) Add a user with proper rights to use the REST API
4) play with your favourite REST client (curl/httpie, etc.):
   Authenticate with the user created above and get a CGISESSION id.
   Use the CGISESSION to add, edit and delete patrons via the API.
5) Use PUT /patrons/<borrowernumber> for a patron without borrowers
   flag. This should go into pending patron modification status and
   needs to be accepted by a librarian.

Please note there is no validation of body input in PUT/POST other
than branchcode,category,userid,cardnumber.

Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth at kul.oslo.kommune.no>

Signed-off-by: Josef Moravec <josef.moravec at gmail.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list