[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:41:56 CEST 2021


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

Lari Taskula <lari.taskula at hypernova.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #119971|0                           |1
        is obsolete|                            |

--- Comment #39 from Lari Taskula <lari.taskula at hypernova.fi> ---
Created attachment 119972
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119972&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

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


More information about the Koha-bugs mailing list