Files
stephen schuresko 0831ee943c feat(api): enhance image module management and export functionality
- Added read-write access to the darktable SQLite catalog for module parameter edits.
- Implemented new endpoints for exporting images and retrieving full-resolution images.
- Introduced PATCH method for updating module parameters with optional preview.
- Added comprehensive tests for new API functionalities, including module retrieval and error handling.
- Updated CORS headers to support new HTTP methods.
- Created detailed documentation for new API endpoints and module operations.
2026-06-10 19:50:56 -04:00

53 lines
1.2 KiB
Plaintext

meta {
name: Export Image
type: http
seq: 6
}
post {
url: {{baseUrl}}/api/v1/images/{{imageId}}/export
body: none
auth: bearer
}
auth:bearer {
token: {{accessToken}}
}
tests {
test("returns 202 Accepted", function() {
expect(res.status).to.equal(202);
});
test("status is accepted", function() {
expect(res.body.status).to.equal("accepted");
});
test("image_id matches request", function() {
expect(res.body.image_id).to.equal(Number(bru.getVar("imageId")));
});
test("has filename", function() {
expect(res.body.filename).to.be.a("string");
});
test("has export path", function() {
expect(res.body.export).to.be.a("string");
});
}
docs {
## Export Image (Full Resolution)
Enqueues a full-resolution JPEG export processed through darktable's complete
development pipeline — tone curves, exposure, colour grading, noise reduction,
and all other active modules are applied.
Returns **202 Accepted** immediately. The darktable bridge plugin writes the
result to the path shown in `export` (default: `/tmp/dt-api-exports/<id>.jpg`).
Poll **GET /api/v1/images/:id/full** to retrieve the image once ready.
Requires scope: `cache:refresh`
}