Browse API

Task preview

Observe or manage an isolated App preview pinned to a task SHA.

GET/api/v0/projects/<key>/tasks/<number>/preview

Read the current preview

GET https://repopack.com/api/v0/projects/<key>/tasks/<number>/preview
Authorization: Bearer <token>

The response is { "preview": null } if none exists. Otherwise preview contains App name, source SHA, blueprint name/ID/specification hash, lease expiry, state and URL. app.preview permission and task visibility are required. A preview URL can be visited by anyone who knows it: do not put production secrets in the preview.

In Repopack Chat, a paired runner can use the same endpoint with its account's permissions. Preview progress streams to the runner, and revoking the pairing closes the stream.

Start, refresh or stop

POST the same URL with Content-Type: application/json and body { "blueprint": "<name>" } to start a preview; blueprint can be omitted to use the default. Set "update":true to explicitly refresh a running preview's source or blueprint; omitting it does not silently replace that preview. If the request's Accept includes text/event-stream, the route can stream deployment and status events followed by preview_result or preview_error; otherwise it returns the completed operation result. DELETE on the same path stops the preview. Errors have JSON error and message plus relevant detail. An unreadable project returns 401, missing app.preview permission 403, and an invisible task 404. After a timeout GET first to avoid starting an unintended second operation. See task-preview guide.