Skip to content

Wait for a request's outcome (SSE)

GET
/api/certs/requests/{id}/events
curl --request GET \
--url https://example.com/api/certs/requests/example/events

A real text/event-stream, separate from the creating POST because an EventSource-style client is GET-only. Safe to reconnect any number of times.

The SSE event name carries the terminal status (approved, denied, expired, enrolled, failed); each event’s data is an envelope whose data half carries the certificate, or the enrollment code together with the service account it was approved for and when the code expires. That shape is not in this document: the response body is a stream rather than JSON, so there is nowhere to declare a schema for what individual events carry.

Unauthenticated: the request ID is the credential.

id
required
string

The certificate request’s UUID

The stream, closed after one terminal event

Media typetext/event-stream
string

No such request

Media typetext/event-stream
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string

Example

certificate request "9f1c…" not found
error_code
required

ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.

string

Example

not_found

The certificate was issued but is no longer available. They are never persisted, so a client that missed delivery must re-request.

Media typetext/event-stream
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string

Example

certificate request "9f1c…" not found
error_code
required

ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.

string

Example

not_found

This instance is shutting down. The request is still pending: reconnect.

Media typetext/event-stream
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string

Example

certificate request "9f1c…" not found
error_code
required

ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.

string

Example

not_found