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

58 lines
1.4 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
meta {
name: Get Full Image
type: http
seq: 7
}
get {
url: {{baseUrl}}/api/v1/images/{{imageId}}/full
body: none
auth: bearer
}
auth:bearer {
token: {{accessToken}}
}
tests {
test("returns 200 or 202", function() {
expect([200, 202]).to.include(res.status);
});
test("if 200, content-type is image/jpeg", function() {
if (res.status === 200) {
expect(res.headers["content-type"]).to.equal("image/jpeg");
}
});
test("if 200, body is non-empty", function() {
if (res.status === 200) {
expect(res.body.length).to.be.above(0);
}
});
test("if 202, export was queued", function() {
if (res.status === 202) {
expect(res.body.status).to.equal("queued");
expect(res.body.retry_after).to.be.a("number");
}
});
}
docs {
## Get Full-Resolution Image
Returns the full-resolution JPEG developed through darktable's complete
processing pipeline (all active development modules applied).
### Workflow
1. POST `/api/v1/images/:id/export` — enqueue the export (returns 202)
2. Wait ~2–10 s (depending on complexity and hardware)
3. GET `/api/v1/images/:id/full` — download the result (200 with JPEG body)
If no export exists yet this endpoint auto-enqueues one and returns **202**
with a `Retry-After: 5` header. Keep retrying until you receive **200**.
Requires scope: `previews:read`
}