- 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.
58 lines
1.4 KiB
Plaintext
58 lines
1.4 KiB
Plaintext
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`
|
||
}
|