Skip to content
getgeolens.com

Analysis Preview Endpoint

POST
/datasets/{dataset_id}/analysis/preview/
curl --request POST \
--url https://example.com/datasets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/analysis/preview/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "distance_meters": 1, "mask": {}, "mask_dataset_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "operation": "buffer" }'

Run a parameterized PostGIS operation and return a GeoJSON preview.

Synchronous, read-only, and capped: results are for on-map preview, not persistence — use the materialize endpoint to save output as a dataset.

dataset_id
required
Dataset Id
string format: uuid
Media type application/json
AnalysisPreviewRequest

Parameters for a synchronous analysis preview.

Deliberately flat (no discriminated union) so SDK generators keep the endpoint; per-operation requiredness is enforced by the validator.

object
distance_meters
Any of:
number
> 0 <= 100000
mask
Any of:
object
key
additional properties
any
mask_dataset_id
Any of:
string format: uuid
operation
required
Operation
string
Allowed values: buffer centroid clip

Successful Response

Media type application/json
AnalysisPreviewResponse

GeoJSON FeatureCollection preview of an analysis operation.

object
bbox
Any of:
Array<number>
feature_count
required
Feature Count
integer
geojson
required
Geojson
object
key
additional properties
any
source_feature_count
Any of:
integer
truncated
required
Truncated
boolean
Example generated
{
"bbox": [
1
],
"feature_count": 1,
"geojson": {},
"source_feature_count": 1,
"truncated": true
}

Bad request — invalid payload

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

Not found

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

Validation error

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