[Koha-bugs] [Bug 20028] Export all patron related personal data in one package
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Apr 21 21:54:52 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20028
--- Comment #43 from Michal Denar <black23 at gmail.com> ---
Created attachment 119977
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119977&action=edit
Bug 20028: Add Patron Export REST controller
This patch adds a REST controller for patron data exporting.
GET /api/v1/patrons/51/export
GET /api/v1/public/patrons/51/export
Supports pagination parameters "_per_page" and "_page".
Response is an array that contains "_per_page" amount of objects, each
with the following format:
{
"data": {the object, e.g. patron}
"type": DBIx source name, e.g. "Borrower"
}
Example response:
[
{
"data":{
"address":null,
...,
"patron_id":1,
...
},
"type":"Borrower"
},
{
"data":{
"borrower_message_preference_id":24,
"borrowernumber":1,
...,
"wants_digest":1
},
"type":"BorrowerMessagePreference"
},
{
"data":{
"auto_renew":false,
...,
"checkout_id":97,
"due_date":"2021-02-19T23:59:00+00:00",
...,
"patron_id":1,
...
},
"type":"Issue"
},
{
"data":{
"auto_renew":false,
...,
"checkout_id":42,
"due_date":"2021-01-19T23:59:00+00:00",
...,
"patron_id":1,
...
},
"type":"OldIssue"
}
]
To test:
1. prove t/db_dependent/api/v1/patrons_export.t
Sponsored-by: The National Library of Finland
Signed-off-by: Michal Denar <black23 at gmail.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list