Bug 30652

Summary: RPC style action endpoint for choosing matches
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: REST APIAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P5 - low CC: tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 22785    
Bug Blocks:    

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

?