Flow

Stream a deploy's progress

GET
/deploys/{deploy}/events

Opens an SSE connection on a deploy, with the access of GET /deploys/{deploy}:

  • progress — a step of indexing the bundle (DeployProgress), whose id is its sequence number. A retried indexing repeats its steps.
  • done — the deploy once it has left PENDING. Always the last event.

A deploy that already ended sends its progress while it is kept (some days), then done. Reconnecting clients pass the standard Last-Event-ID header to resume after that event. Comment lines keep an idle connection open.

BearerAuth
headerAuthorizationBearer <JWT>

Admin token, API token issued via /api-tokens, or an OIDC JWT access token issued by the configured OIDC provider.

deploy*string

Deploy identifier (UUID).

Formatuuid

SSE stream of the deploy's progress: each event's data is a DeployProgress (progress) or the Deploy (done).

text/event-stream
  1. response

A step of indexing a deploy's bundle, the data of a progress event of GET /deploys/{deploy}/events.

step*string

UNPACKING the bundle's files; INSTALLING the dependencies its package.json names, when it names any; INDEXING_FUNCTIONS, finding the functions in its code; READING_BLOCKS of each file that has them; SAVING the index.

Value in"UNPACKING""INSTALLING""INDEXING_FUNCTIONS""READING_BLOCKS""SAVING"
files?integer

With READING_BLOCKS, how many files are read.

Example Request
curl -X GET 'https://example.com/api/hub/deploys/497f6eca-6276-4993-bfeb-53cbbbba6f08/events'
Example Response
{  "step": "UNPACKING",  "files": 0}