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: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: tomascohen@gmail.com 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.