Bug 30652 - RPC style action endpoint for choosing matches
Summary: RPC style action endpoint for choosing matches
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on: 22785
Blocks:
  Show dependency treegraph
 
Reported: 2022-04-29 11:55 UTC by Martin Renvoize
Modified: 2022-05-13 16:11 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2022-04-29 11:55:30 UTC
In bug 22785 we added endpoint for selecting which match of a record is used at import.

I wasn't sure about the API structure as it didn't feel RESTful.. you are changing the state of more than the single resource you are pointing to.

I propose the following as an alternative.

POST /import/{import_batch_id}/records/{import_record_id}/matches/{record_match_id}/choose
POST  /import/{import_batch_id}/records/{import_record_id}/matches/{record_match_id}/unchoose
Comment 1 Tomás Cohen Arazi 2022-05-13 16:11:56 UTC
(In reply to Martin Renvoize from comment #0)
>
> POST
> /import/{import_batch_id}/records/{import_record_id}/matches/
> {record_match_id}/choose
> POST 
> /import/{import_batch_id}/records/{import_record_id}/matches/
> {record_match_id}/unchoose

POST /.../chosen
DELETE /.../chosen

?