Skip to content

Capture application snapshots as a service.

kapture drives a headless browser (Puppeteer) on a Kano-like application and returns the rendered page as a PNG image. The target application, its token and its name come from the APP_URL, APP_JWT and APP_NAME environment variables, and every request can override them along with the layers, the view, the size and the timings.

This service is not a Feathers application: it is a plain Express server exposing two routes at the root, with no API prefix.


Health

Service status


Service health check

GET
/healthcheck

Always answers 200 with { "isRunning": true } as soon as the server accepts connections. Unlike the other services of the ekosystem, it reports neither a name nor a version.

Responses

Service is up

application/json
JSON
{
  
"isRunning": true
}

Playground

Samples


Capture

Snapshot rendering

Operations


Render a snapshot of the application

POST
/capture

Opens the target application in a headless browser, applies the requested view, waits for the network to settle and returns a full-page PNG screenshot.

The body can be either a capture request (layers, bbox, size, …), or a GeoJSON Feature / FeatureCollection, in which case the features are uploaded to the application and rendered as an overlay. Both can be combined by adding the capture properties next to the GeoJSON ones.

The request body size is limited by the BODY_LIMIT environment variable (100kb by default), which is quickly reached when embedding features — a payload above the limit is rejected by the body parser before the route is reached.

Authorizations

bearerAuth

Paste a Kalisio JWT access token to authorize requests sent through the API gateway. The service itself does not check it: reached directly on its own port it answers without a token. Not to be confused with the jwt body property, which is the token kapture uses to log into the captured application.

Type
HTTP (bearer)

Request Body

application/json
JSON
{
  
"layers": [
  
  
"Layers.IMAGERY",
  
  
"Layers.OSM_BRIGHT"
  
],
  
"bbox": [
  
  
1.89,
  
  
43.28,
  
  
2.01,
  
  
43.34
  
],
  
"size": {
  
  
"width": 1024,
  
  
"height": 768
  
}
}

Responses

The rendered snapshot

image/png

Playground

Server
Authorization
Body

Samples