Skip to content
getgeolens.com

Upload From Url

POST
/ingest/upload/url
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.

Media type application/json
UrlUploadRequest

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
url
required
Url

HTTP(S) URL of the file to import. The server validates the URL against SSRF, downloads it with the configured size cap, and stages it like a direct upload.

string
>= 1 characters <= 2000 characters
filename
Any of:
string
>= 1 characters <= 255 characters
Example generated
{
"url": "example",
"filename": "example"
}

Successful Response

Media type application/json
UploadResponse
object
job_id
required
Job Id

Unique identifier for the ingestion job. Use this to poll status and to commit the upload.

string format: uuid
status
Status

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.

string
default: pending
message
required
Message

Human-readable message describing the upload result.

string
Example
{
"status": "pending"
}

Bad request — invalid payload

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Unauthorized — missing or invalid credentials

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Forbidden — caller lacks write access

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Not found

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Conflict — resource state prevents the operation

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Payload too large

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Validation error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Too many requests — retry after the advertised interval

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}
Retry-After
integer

Seconds until the request may be retried

Internal server error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Bad gateway — an upstream provider failed

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Service unavailable — the database could not serve the request

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}