https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42869
Bug ID: 42869
Summary: Add REST API coding guideline for async job endpoints
(202 Accepted)
Initiative type: ---
Sponsorship ---
status:
Product: Koha
Version: Main
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: REST API
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
CC: [email protected]
Target Milestone: ---
Koha currently has several REST API endpoints that enqueue background jobs and
return a job_id. These endpoints incorrectly use HTTP 201 Created, which
implies a resource was durably created and is immediately addressable.
Per HTTP semantics, endpoints that accept a request for asynchronous processing
should return 202 Accepted with a Location header pointing to the job tracking
endpoint (/api/v1/jobs/{job_id}).
Affected endpoints:
- POST /api/v1/erm/eholdings/local/titles/import_from_list (returns 201)
- POST /api/v1/erm/eholdings/local/titles/import_from_kbart_file (returns 201)
- POST /api/v1/cover_images/batch (fixed in bug 42404)
This bug tracks:
1. Adding REST3.2.1.2 to the coding guidelines wiki
2. Updating existing endpoints to comply
See also: Bug 42404
Wiki page:
https://wiki.koha-community.org/wiki/Coding_Guidelines_-_API#REST3.4.1_POST
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/