Skip to content
Navigation

Download one member of a finished 3D extract

Streams a single output file of the job by its exact name as listed in the status files array. Only allowlisted members are served - matched by extension (.obj, .mtl, .dxf, .dwg, .gpkg, .zip) or basename (buildings.json, preview.png, README.txt); anything else in the job directory (state.json, result.json, temp files) answers 404. Names containing path separators or .. answer 400. Sent with Content-Disposition: attachment and Accept-Ranges: bytes. 409 while queued/running, 410 when the job failed.

Accepts the token in the token header or as ?token= so the URL works from <a href> and from a Grasshopper HTTP fetch.

GET
https://res.aireon.ch/res_api/building3d-extract/download/{jobId}/{file}

Authorization

  • ResApiToken
    optional
    API key in header
  • ResApiTokenQuery
    optional
    API key in query

Path parameters

  • jobId
    string
    required

    Job id from the 202 of POST /res_api/building3d-extract (UUID v4).

    format: uuid · pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
  • file
    string
    required

    Exact member name from the status files list (e.g. rainweg_1_4710_balsthal.obj, model.mtl, buildings.json, preview.png, README.txt, the _clip.gpkg or the zip), OR a bare extension alias - obj, mtl, dxf, dwg, gpkg, zip - which resolves to the job's first member with that extension so a client can build the URL without reading the status first.

    maxLength: 120 · pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,119}$

Query parameters

  • token
    optional
    string

    The RES API token as a query parameter - alternative to the token header for links and header-less HTTP fetches (Grasshopper). Treat the resulting URL as a credential.

Returns

200

The file bytes. Content-Type follows the extension (text/plain for OBJ/MTL/README, image/png, application/json, application/geopackage+sqlite3, image/vnd.dxf, image/vnd.dwg, application/zip); clients that do not care can read it as octets.

400

jobId is not a UUID v4, or file contains a path separator / ...
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

401

Authentication missing or invalid.
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

403

Authenticated but not permitted.
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

404

Unknown job, or file is not an allowlisted member of this job.
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

409

The job is still queued or running - poll statusUrl and retry once status is ready.
JSON
  • error
    string
    required
  • status
    queued
    or
    running
    required
  • phase
    optional
    string | null
  • statusUrl
    optional
    string

410

The job failed (unknown address, no swissBUILDINGS3D 3.0 tile covering the point, empty box, worker crash) or its output has been evicted; error says why. Nothing will ever be downloadable for this jobId - start a new job.
JSON
  • error
    string
    required
  • status
    error
    required

Type to search…

↑↓ navigate↵ selectEsc close