ReferenceAPI overview
Server-Sent Events
The API sends logs and changes as Server-Sent Events, on an HTTP answer that stays open.
The client sends one GET request. The answer stays open.
1 / 4
Server-Sent Events are a standard of the web. A stream is a plain HTTP answer.
The streams
| Endpoint | Stream | Ends |
|---|---|---|
GET /api/v1/deploys/{deploy_id}/logs?follow= | The build and deploy log of one deploy | After the saved lines. With follow=true: when the deploy is complete. |
GET /api/v1/jobs/{job_id}/logs?follow= | The output of one job run | After the saved lines. With follow=true: when the job is complete. |
GET /api/v1/services/{id}/logs?follow=&tail= | The runtime output of the current containers of the service | Without follow: after the recent lines. With follow=true: never. |
GET /api/v1/events | The change feed | Never |
The headers of the answer
| Header | Value |
|---|---|
Content-Type | text/event-stream |
Cache-Control | no-cache |
X-Accel-Buffering | no. With it, a proxy such as nginx does not buffer the stream. |
A keep-alive comment is the line : keep-alive.