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: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on: 22785
Blocks:
  Show dependency treegraph
 
Reported: 2022-04-29 11:55 UTC by Martin Renvoize (ashimema)
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:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 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 (tcohen) 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

?