Harden export preview handling
This commit is contained in:
+13
-5
@@ -1010,14 +1010,22 @@ Returns one persisted export record.
|
||||
### GET `/api/v1/exports/{export_id}/content`
|
||||
|
||||
Returns the stored JSON artifact content through the standard API envelope.
|
||||
HTML report artifacts are intentionally download-only through `/download`.
|
||||
Calling `/content` for `project_report_html` returns:
|
||||
|
||||
```text
|
||||
code: EXPORT_CONTENT_UNSUPPORTED
|
||||
message: Export content preview is only available for JSON and GeoJSON artifacts. Download HTML report artifacts instead.
|
||||
```
|
||||
|
||||
### GET `/api/v1/exports/{export_id}/download`
|
||||
|
||||
Downloads the stored JSON/GeoJSON export artifact as a raw file response with
|
||||
`application/json` content type and a `Content-Disposition` attachment
|
||||
filename. This endpoint intentionally does not use the JSON envelope because
|
||||
it is a browser/file-download path; callers that need canonical API JSON should
|
||||
use `/content`.
|
||||
Downloads the stored JSON/GeoJSON/HTML export artifact as a raw file response
|
||||
with a `Content-Disposition` attachment filename. JSON and GeoJSON artifacts
|
||||
use `application/json`; HTML report artifacts use `text/html`. This endpoint
|
||||
intentionally does not use the JSON envelope because it is a browser/file-download
|
||||
path; callers that need canonical API JSON should use `/content` for JSON/GeoJSON
|
||||
artifacts.
|
||||
|
||||
### POST `/api/v1/exports/yolo`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user