REST API reference

Generated from the engine's own contract at build time, so this page cannot describe a route the service does not have.

The API reference on this page is generated from the engine's OpenAPI document at the version this platform is pinned to, at build time.

The REST API and the MCP server are two front doors onto one typed contract, so an HTTP client and an AI assistant reach the same operations with the same names, schemas and errors.

On this page

Generated from contracts/engine/openapi.yaml

lazweaver · OpenAPI 3.1.0 · contract version1

Uploads

POST/v1/files/upload-url

A place to PUT one file, and the file URI it will have

On S3 the put_url is a presigned PUT valid for an hour. On a local store it is the path of PUT /v1/files/{id} on this server, so the same client code works on a laptop.

Operation id uploadUrl

Request body: application/json UploadUrlRequest

Request
FieldTypeRequiredDescription
namestringyesOne path segment of [A-Za-z0-9_.-], 1-64 characters
bytesintegerno
content_typestringno
Responses
StatusBodyMeaning
200UploadUrlResponseWhere to put the bytes
401ErrorNo bearer token, or one that names no tenant

PUT/v1/files/{id}

Upload a file body (local store; development mode)

The id is the `<upload-id>/<name>` part of the put_url upload_url returned. The body is the file. With an S3 store the presigned PUT is used instead and this route is not needed.

Operation id putFile

Parameters
FieldTypeRequiredDescription
id (path)stringyes`<upload-id>/<name>`

Request body: application/octet-stream

Responses
StatusBodyMeaning
200UploadedFileThe stored file
400ErrorThe request is wrong
401ErrorNo bearer token, or one that names no tenant

Synchronous questions about one file

POST/v1/inspect

Header, bounds, point format and georeferencing

On S3 this reads only the front of the object (the fixed header and the VLR block) with ranged GETs, so it answers in milliseconds however large the file is. header_only says which path was taken.

Operation id inspect

Request body: application/json FileRequest

Request
FieldTypeRequiredDescription
filestringyes
Responses
StatusBodyMeaning
200InspectResponseThe info report
400ErrorThe request is wrong
401ErrorNo bearer token, or one that names no tenant
404ErrorNo such job, file or artifact for this tenant

POST/v1/validate

Integrity checks, each pass, warn or fail

Operation id validate

Request body: application/json FileRequest

Request
FieldTypeRequiredDescription
filestringyes
Responses
StatusBodyMeaning
200ValidateResponseThe validation report
401ErrorNo bearer token, or one that names no tenant
404ErrorNo such job, file or artifact for this tenant

POST/v1/stats

Streaming per-point statistics (classes, intensity, elevation)

Operation id stats

Request body: application/json FileRequest

Request
FieldTypeRequiredDescription
filestringyes
Responses
StatusBodyMeaning
200StatsResponseThe statistics
401ErrorNo bearer token, or one that names no tenant
404ErrorNo such job, file or artifact for this tenant

POST/v1/dry-run

What a submission would cost in chunks, memory and time

Reads nothing but the header and writes nothing.

Operation id dryRun

Request body: application/json SubmitRequest

Request
FieldTypeRequiredDescription
filestringyes
presetstring — one of terrain, powerline, survey, fullno
processProcessRequestnoEvery `lazweaver process` option, all optional; an unset field takes the CLI default. GET /v1/presets returns the named sets.
chainobjectno`{"stages": [...]}`, validated before enqueueing
tierstring — one of thin, denoise, classify, terrain, powerline, corridorno
callback_urlstringnoHTTPS URL to POST the final status to
labelstringno
Responses
StatusBodyMeaning
200DryRunResponseThe estimate
400ErrorThe request is wrong
401ErrorNo bearer token, or one that names no tenant
404ErrorNo such job, file or artifact for this tenant

What the engine can run

GET/v1/stages

Every stage type, with its parameter schema and default halo

Operation id stages

Responses
StatusBodyMeaning
200StagesResponseThe stage registry

GET/v1/presets

The named process presets (terrain, powerline, survey, full)

Operation id presets

Responses
StatusBodyMeaning
200PresetsResponseThe preset table

GET/v1/openapi.yaml

This document, as compiled into the running server (for contract pinning)

Operation id openapiDocument

Responses
StatusBodyMeaning
200application/yamlThe OpenAPI document

Submitting work and reading the run ledger

GET/v1/jobs

This tenant's jobs, newest first

Operation id jobs

Parameters
FieldTypeRequiredDescription
limit (query)integerno
state (query)JobStateno
Responses
StatusBodyMeaning
200JobsResponseThe job list
401ErrorNo bearer token, or one that names no tenant

POST/v1/jobs

Submit a job

Give exactly one of preset/process, chain or tier. The file must be one of this tenant's uploads. The job's initial status.json is written before the message is enqueued, so a poll immediately after this call finds state "queued".

Operation id submit

Request body: application/json SubmitRequest

Request
FieldTypeRequiredDescription
filestringyes
presetstring — one of terrain, powerline, survey, fullno
processProcessRequestnoEvery `lazweaver process` option, all optional; an unset field takes the CLI default. GET /v1/presets returns the named sets.
chainobjectno`{"stages": [...]}`, validated before enqueueing
tierstring — one of thin, denoise, classify, terrain, powerline, corridorno
callback_urlstringnoHTTPS URL to POST the final status to
labelstringno
Responses
StatusBodyMeaning
202SubmitResponseAccepted and enqueued
400ErrorThe request is wrong
401ErrorNo bearer token, or one that names no tenant
404ErrorNo such job, file or artifact for this tenant

GET/v1/jobs/{id}

status.json from the job prefix

Operation id status

Parameters
FieldTypeRequiredDescription
id (path)stringyesA job id (`j_` and a ULID)
Responses
StatusBodyMeaning
200StatusThe job's status
401ErrorNo bearer token, or one that names no tenant
404ErrorNo such job, file or artifact for this tenant

GET/v1/jobs/{id}/events

events.json - what a person should be told about this run

Operation id events

Parameters
FieldTypeRequiredDescription
id (path)stringyesA job id (`j_` and a ULID)
Responses
StatusBodyMeaning
200EventsResponseThe events, in time order
401ErrorNo bearer token, or one that names no tenant
404ErrorNo such job, file or artifact for this tenant

GET/v1/jobs/{id}/logs

logs.jsonl - the job's own log lines, a page at a time

Poll with after_line set to the next_line of the last page.

Operation id logs

Parameters
FieldTypeRequiredDescription
id (path)stringyesA job id (`j_` and a ULID)
after_line (query)integerno
level (query)string — one of trace, debug, info, warn, errorno
limit (query)integerno
Responses
StatusBodyMeaning
200LogsResponseOne page of log lines
401ErrorNo bearer token, or one that names no tenant
404ErrorNo such job, file or artifact for this tenant

GET/v1/jobs/{id}/report

The job's report

report.json for a process job, manifest.json for a chain or tier job, error.json for a failure; source says which one this is.

Operation id report

Parameters
FieldTypeRequiredDescription
id (path)stringyesA job id (`j_` and a ULID)
Responses
StatusBodyMeaning
200ReportResponseThe report
401ErrorNo bearer token, or one that names no tenant
404ErrorNo such job, file or artifact for this tenant

GET/v1/jobs/{id}/artifacts

The deliverables in the job prefix, with a URL for each

get_url is a presigned GET on S3, or the path of GET /v1/jobs/{id}/files/{name} on this server for a local store. A name may be nested (tiles/tileset.json, tiles/0_0/lod0.glb) — a 3D Tiles tileset and its tiles keep their relative layout under the job prefix. The ledger objects (status.json, events.json, logs.jsonl, cancel) have their own operations and are not listed here.

Operation id artifacts

Parameters
FieldTypeRequiredDescription
id (path)stringyesA job id (`j_` and a ULID)
Responses
StatusBodyMeaning
200ArtifactsResponseThe artifact list
401ErrorNo bearer token, or one that names no tenant
404ErrorNo such job, file or artifact for this tenant

GET/v1/jobs/{id}/artifacts.zip

Every artifact in the job prefix, in one zip

Every entry `artifacts` lists, nested names included, Stored (not compressed — LAZ, glb and PNG deliverables already are). Built on request into the service's scratch directory and streamed back; a second call replaces the first rather than piling up.

Operation id artifactsZip

Parameters
FieldTypeRequiredDescription
id (path)stringyesA job id (`j_` and a ULID)
Responses
StatusBodyMeaning
200application/zipThe zip
401ErrorNo bearer token, or one that names no tenant
404ErrorNo such job, file or artifact for this tenant

GET/v1/jobs/{id}/files/{name}

One artifact's bytes (local store; development mode)

name may be nested (tiles/tileset.json). Content-Type is by extension (glb, gltf, laz/las, csv, svg, zip and the rest each get their own type); Content-Disposition is inline for a type a console fetches directly (json, geojson, glb, gltf, png, html, svg, txt) and attachment otherwise. A single Range: bytes=start-end request (a COPC viewer reading cloud.copc.laz in pieces) answers 206 with Content-Range and Accept-Ranges; anything else — no Range header, a multi-range request — answers the whole file.

Operation id artifactFile

Parameters
FieldTypeRequiredDescription
id (path)stringyesA job id (`j_` and a ULID)
name (path)stringyesThe artifact's relative name, as artifacts reported it
Range (header)stringnoA single 'bytes=start-end' range
Responses
StatusBodyMeaning
200application/octet-streamThe file
206application/octet-streamThe requested byte range
401ErrorNo bearer token, or one that names no tenant
404ErrorNo such job, file or artifact for this tenant

POST/v1/jobs/{id}/cancel

Ask a job to stop

Writes the cancel object the engine looks for at its next step boundary. A job that had not started yet is cancelled immediately; partial outputs of a running job stay where they are.

Operation id cancel

Parameters
FieldTypeRequiredDescription
id (path)stringyesA job id (`j_` and a ULID)
Responses
StatusBodyMeaning
200CancelResponseThe state after the request
401ErrorNo bearer token, or one that names no tenant
404ErrorNo such job, file or artifact for this tenant

Liveness, readiness and metrics

GET/healthz

Liveness

Operation id healthz

Responses
StatusBodyMeaning
200text/plainok

GET/readyz

Readiness (the store and queue are initialised)

Operation id readyz

Responses
StatusBodyMeaning
200text/plainready
503text/plainstarting

GET/metrics

Prometheus metrics

Operation id metrics

Responses
StatusBodyMeaning
200text/plainThe metric families

The schemas

Error

FieldTypeRequiredDescription
codestring — one of not_found, unauthorized, unauthenticated, forbidden, invalid, internalyes
messagestringyes

JobState

string — one of queued, running, done, failed, cancelled

UploadUrlRequest

FieldTypeRequiredDescription
namestringyesOne path segment of [A-Za-z0-9_.-], 1-64 characters
bytesintegerno
content_typestringno

UploadUrlResponse

FieldTypeRequiredDescription
filestringyesPass this as `file` to every other operation
put_urlstringyes
expires_atstring (date-time)yes

UploadedFile

FieldTypeRequiredDescription
filestringyes
bytesintegeryes

FileRequest

FieldTypeRequiredDescription
filestringyes

InspectResponse

FieldTypeRequiredDescription
filestringyes
header_onlybooleanyes
infoobjectyesThe `lazweaver info --json` report. `info.georef` carries the codes (`horizontal_epsg`, `geodetic_epsg`, `vertical_epsg`), the CRS names (`horizontal_name`, `vertical_name`, `vertical_datum`) for files that name a CRS they have no code for, and `units` (`{name, to_metres, assumed}`) — the linear unit the coordinates are in, which every metre-denominated default is scaled by.

ValidateResponse

FieldTypeRequiredDescription
filestringyes
okbooleanyes
failuresintegeryes
warningsintegeryes
reportobjectyes

StatsResponse

FieldTypeRequiredDescription
filestringyes
point_countintegeryes
statsobjectyesThe `lazweaver stats --json` report. `density` is points per square *file unit*, `density_unit` says which (`pts/m²`, `pts/ft²`, `pts/deg²`) and `density_per_m2` is the comparable number (null for a geographic CRS).

DryRunResponse

FieldTypeRequiredDescription
filestringyes
estimated_secondsnumberyes
estimated_peak_bytesintegeryes
warningsarray of stringyes
dry_runobjectyes

StageInfo

FieldTypeRequiredDescription
namestringyes
descriptionstringyes
schemaobjectyes
default_halonumberyes

StagesResponse

FieldTypeRequiredDescription
stagesarray of StageInfoyes

ProcessRequest

Every `lazweaver process` option, all optional; an unset field takes the CLI default. GET /v1/presets returns the named sets.

FieldTypeRequiredDescription
target_pointsintegerno
halonumberno
cellnumberno
contour_intervalnumberno
noise_gapnumberno
ground_max_windownumberno
ground_slopenumberno
ground_thresholdnumberno
groundstring — one of auto, pmf, csfno
buildingsbooleanno
h_epsgintegerno
v_epsgintegerno
colorizebooleanno
tilesbooleanno
tiles_formatstring — one of laz, 3dtilesnoViewer tiles as the LAZ LOD pyramid or 3D Tiles 1.1. Every named preset asks for `3dtiles`; the CLI default is `laz`.
copcbooleanno
dedupe_stripsbooleanno
parallelismintegerno
use_pdalbooleanno
powerlinebooleanno
clearancenumberno
from_rawbooleanno
idsbooleanno
equalize_intensitybooleanno
treesbooleanno
dry_runbooleanno
max_memoryintegerno
resumebooleanno
railbooleanno
polygonsstringnoPath or URI of a GeoJSON of class-override polygons, resolved the same way `file` is. Applied right after classification (`classify.polygons`), so the deliverables come from the corrected labels.
decisionsstringnoPath or URI of a review-decisions JSON (`{"version":1,"decisions":[{"kind":"tree","id":12,"action":"reject"}]}`), resolved the same way `file` is. Applied right after classification (`relabel.decisions`); the object GeoJSON the decisions name are read from that file's own directory.
specstringnoPath to a JSON acceptance spec (see `qa spec`), resolved like `file`. Checked against the classified cloud at the end of the run; the report's HTML/PDF gain an "Acceptance" table and, on a failing check, a warning (the run itself does not fail).

PresetInfo

FieldTypeRequiredDescription
namestring — one of terrain, powerline, survey, fullyes
descriptionstringyes
requestProcessRequestyesEvery `lazweaver process` option, all optional; an unset field takes the CLI default. GET /v1/presets returns the named sets.

PresetsResponse

FieldTypeRequiredDescription
presetsarray of PresetInfoyes

SubmitRequest

FieldTypeRequiredDescription
filestringyes
presetstring — one of terrain, powerline, survey, fullno
processProcessRequestnoEvery `lazweaver process` option, all optional; an unset field takes the CLI default. GET /v1/presets returns the named sets.
chainobjectno`{"stages": [...]}`, validated before enqueueing
tierstring — one of thin, denoise, classify, terrain, powerline, corridorno
callback_urlstringnoHTTPS URL to POST the final status to
labelstringno

SubmitResponse

FieldTypeRequiredDescription
job_idstringyes
tenantstringyes
status_urlstringyes
kindstring — one of job, processyes

Step

FieldTypeRequiredDescription
namestringyes
statestringyes
secondsnumbernullno
pointsintegernullno

Status

status.json in the job prefix, rewritten whole by the engine

FieldTypeRequiredDescription
job_idstringyes
kindstringyes
tenantstringyes
stateJobStateyes
phasestringyesThe step or stage running now; empty when not running
percentnumberyes
pointsintegernullyesnull until the engine has read the header
started_atstringno
updated_atstringno
finished_atstringnullno
workerstringnullno
trace_idstringnullno
trace_urlstringnullno
stepsarray of Stepno
errorstringnullno
outputsarray of stringno

Event

FieldTypeRequiredDescription
timestringyes
levelstring — one of info, warn, erroryes
codestringyesA stable snake_case identifier
messagestringyes
dataobjectno

EventsResponse

FieldTypeRequiredDescription
job_idstringyes
eventsarray of Eventyes

LogsResponse

FieldTypeRequiredDescription
job_idstringyes
linesarray of objectyes
next_lineintegeryes
total_linesintegeryes

ReportResponse

FieldTypeRequiredDescription
job_idstringyes
sourcestring — one of report.json, manifest.json, error.jsonyes
reportobjectyes

ArtifactInfo

FieldTypeRequiredDescription
namestringyes
bytesintegeryes
uristringyes
get_urlstringnullno
expires_atstringno

ArtifactsResponse

FieldTypeRequiredDescription
job_idstringyes
artifactsarray of ArtifactInfoyes

CancelResponse

FieldTypeRequiredDescription
job_idstringyes
stateJobStateyes
requestedbooleanyes

JobsResponse

FieldTypeRequiredDescription
tenantstringyes
jobsarray of Statusyes