Upload From Url
const url = 'https://example.com/ingest/upload/url';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"example","filename":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/ingest/upload/url \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "example", "filename": "example" }'Start importing a geospatial file from an HTTP(S) URL.
feat(#1705): the URL variant of POST /ingest/upload — NOT a new
source type. The server fetches the file itself and the staged bytes
enter the normal pipeline unchanged (preview then commit).
feat(#1710): the download is a background job. This call validates the
URL and returns a job id immediately; poll GET /jobs/{job_id} and
preview once the job reaches pending. While the file is downloading
the job reports status running with step downloading.
Rule 2 posture: validate_url_for_ssrf gates the URL here, the worker
downloads through make_safe_client() (connect-time IP pinning plus
per-hop redirect revalidation), the size cap is enforced while
streaming, the staged file passes the same extension allowlist and
content sniff as a direct upload, and GDAL only ever sees the staged
local file.
Authorizations
Section titled “ Authorizations ”Request Body required
Section titled “ Request Body required ”Request body for the URL variant of upload (feat #1705).
The server fetches the file itself (SSRF-validated, size-capped) and stages it exactly like a direct upload — preview and commit take over unchanged.
object
Example generated
{ "url": "example", "filename": "example"}Responses
Section titled “ Responses ”Successful Response
object
Unique identifier for the ingestion job. Use this to poll status and to commit the upload.
Initial job status. ‘pending’ means the file is staged and ready to preview; ‘running’ means the server is still fetching it, as it is for a URL import.
Human-readable message describing the upload result.
Example
{ "status": "pending"}Bad request — invalid payload
Unauthorized — missing or invalid credentials
Forbidden — caller lacks write access
Not found
Conflict — resource state prevents the operation
Payload too large
Validation error
Too many requests — retry after the advertised interval
Headers
Section titled “ Headers ”Seconds until the request may be retried
Internal server error
Bad gateway — an upstream provider failed
Service unavailable — the database could not serve the request