Job Management

Get result

Download the GeoJSON result of a completed detection job.

GET /api/v1/jobs/{job_id}/result.geojson

Download the GeoJSON FeatureCollection produced by a completed job. The response is a 302 redirect to a pre-signed S3 URL. Follow redirects (most HTTP clients do automatically).

Request

curl -L https://api.spcsft.com/api/v1/jobs/351e635d-7c25-4ae8-a2a5-60c01a6f434c/result.geojson \
  -H "Authorization: Bearer sk_live_xxxxx" \
  -o result.geojson

The -L flag tells curl to follow the redirect.

Response

A GeoJSON FeatureCollection conforming to RFC 7946. Coordinates are WGS84 longitude/latitude.

{
  "type": "FeatureCollection",
  "bbox": [139.65, 35.67, 139.66, 35.68],
  "features": [
    {
      "type": "Feature",
      "id": 1,
      "geometry": {
        "type": "Polygon",
        "coordinates": [[[139.65, 35.67], [139.66, 35.67], [139.66, 35.68], [139.65, 35.68], [139.65, 35.67]]]
      },
      "properties": {
        "area_sqm": 2480.5,
        "confidence": 0.8734
      }
    }
  ]
}
MemberDescription
bboxBounding box covering all detections, as [minx, miny, maxx, maxy]. Omitted when there are no detections.
features[].idSequential identifier starting at 1. Sits on the Feature itself, not inside properties.
features[].properties.area_sqmPolygon area in square metres, computed geodesically on the WGS84 ellipsoid so it is unaffected by projection distortion. Holes are subtracted.
features[].properties.confidenceMedian of the model's probability values over the pixels the polygon covers, or null. See below.

Confidence

confidence is always present on every Feature, so confidence === null is the single check for "this detection type carries no confidence". It is never absent.

Endpointconfidence
newbuilding, disappearbuildingMedian probability over the polygon
shipnull — detection uses CFAR (a brightness ratio against the local background) and produces no probability
oilslicknull — the detector keeps only very high probability pixels, so every polygon would report the same value

Do not compare confidence across endpoints, and do not read it as an absolute likelihood. Each model is tuned independently, so the same number means different things for different detection types — a value that is unremarkable for one endpoint may be exceptional for another. Use it to rank and filter detections within a single job.

Values near zero do not occur: only pixels the model scored above its detection threshold become part of a polygon at all, so the lowest confidence you can see is bounded by that threshold rather than by 0.

A polygon whose pixels could not be read reports null rather than a substituted value.

There is no crs member. RFC 7946 fixes coordinates to WGS84 and removed crs from the specification.

The detection type is not part of the result. Read endpoint_id from Get job status — the download filename is also {endpoint_id}_{job_id}.geojson.

When no detections are found:

{
  "type": "FeatureCollection",
  "features": []
}

Endpoints with a different shape

EndpointShape
timeseriesOne Feature per grid cell, carrying deviation (deviation from the long-term moving average, divided by its standard deviation), changePointDates, styling keys, and time-series chart data.
idlefarmReturns a .zip archive from /api/v1/jobs/{job_id}/result.zip, not GeoJSON.

Retention

Results are available for 30 days after completion. Afterwards the endpoint returns:

HTTP/1.1 410 Gone
{
  "error": {
    "code": "GONE",
    "message": "Result has been deleted after the 30-day retention period"
  }
}

Job metadata (status, timestamps) remains accessible via Get job status indefinitely. Clients should detect error.code === "GONE" and surface a dedicated message.

Download and archive results you need to retain beyond 30 days. There is currently no option to extend retention per job.

Next steps

On this page