CloudEvents & Knative Eventing
YipYap’s CloudEvents surface has three distinct API planes:
- Inbound ingest: external systems push CloudEvents into YipYap.
- Consumer transports: the yipyap-knative-source ContainerSource drains events out over HTTP poll or a newline-delimited JSON stream.
- Reply audit: admins review the accepted/rejected reply log.
For conceptual documentation, see Knative Eventing → Overview.
Edition and plan gate
Section titled “Edition and plan gate”These endpoints are part of YipYap Cloud. Self-hosted YipYap FOSS does not serve them.
Poll, stream and the source-config hint need a Pro or Enterprise plan. A Free organization gets 403 with {"error": "this feature requires a paid plan", "upgrade_required": true}. Ingest is not plan-gated and works on every Cloud plan.
Endpoints
Section titled “Endpoints”| Method | Path | Description | Auth |
|---|---|---|---|
POST | /api/v1/cloudevents/ingest/{token} | Push CloudEvents (single or batched). | Monitor integration key in the path, plus an OIDC Bearer JWT if the org requires one. |
GET | /api/v1/cloudevents/poll | Drain outbound events. | Bearer API key or session. |
GET | /api/v1/cloudevents/stream | Newline-delimited JSON stream of outbound events. | Bearer API key or session. |
GET | /api/v1/knative/source-config | Mode and cadence hints for the yipyap-knative-source binary. | Bearer API key or session. |
GET | /api/v1/admin/cloudevents/replies | Reply audit log. | Signed-in owner or admin. |
Ingest
Section titled “Ingest”POST /api/v1/cloudevents/ingest/{token}
Accepts:
Content-Type: application/cloudevents+json: one event, structured mode.Content-Type: application/cloudevents-batch+json: a JSON array of up to 256 events.- Binary mode, with the usual
Ce-*headers and the event data as the body.
{token} is the integration key of the monitor the events belong to. If the organization has set its ingest auth to OIDC, the request also needs an Authorization: Bearer <JWT> header from the configured issuer. See Knative Eventing: Authentication.
Responses:
| Status | When |
|---|---|
200 OK | Accepted. An event whose id was already seen for this monitor in the last 24 hours is accepted and not stored again. |
400 | Not a valid CloudEvent, no events, or bad event data. |
401 | Unknown integration key, or a missing or invalid Bearer JWT. |
403 | The JWT has the wrong issuer or audience for this organization. |
413 | Body over 4 MiB, or more than 256 events. |
422 | The event type is not one the ingest endpoint accepts. |
429 | Over 60 requests a minute from one IP. See Rate Limits. |
503 | The identity provider could not be reached to verify the JWT. |
Poll mode
Section titled “Poll mode”GET /api/v1/cloudevents/poll?filter=run.yipyap.alert.*
Waits up to 2 seconds collecting events for your organization, then returns what it has:
{ "events": [ /* CloudEvents in structured-mode JSON */ ], "next_cursor": "eyJzZXEiOjQyfQ"}| Parameter | Description |
|---|---|
filter | A glob on the CloudEvent type. Repeat it to match any of several. Leave it out for every type. |
max | Most events to return: default 100, at most 500. |
The server keeps your position for each distinct filter set, so the next poll with the same filters continues where the last one stopped. next_cursor changes on every response; it is informational, and the server does not read it back. Poll and stream with the same filters share one position, so you can switch between them without gaps.
Limits: 60 polls a minute per organization, and 16 distinct filter sets per organization. See Rate Limits.
Stream mode
Section titled “Stream mode”GET /api/v1/cloudevents/stream?filter=run.yipyap.alert.*
Keeps the connection open and writes each event as one line of structured-mode JSON (newline-delimited), flushing after each event. The response has Content-Type: application/cloudevents-batch+json. filter works as in poll mode.
Up to 10 streams can be open per organization. The eleventh returns 429 at once and does not affect open streams.
Source config hint
Section titled “Source config hint”GET /api/v1/knative/source-config
Returns the recommended mode (auto/poll/stream) and poll cadence for the yipyap-knative-source ContainerSource. The binary calls this on startup and again every refresh_after_seconds:
{ "mode": "stream", "poll_interval_seconds": 5, "stream_heartbeat_seconds": 20, "refresh_after_seconds": 3600}No writes are possible; this is a read-only advisor.
Reply audit (admin)
Section titled “Reply audit (admin)”GET /api/v1/admin/cloudevents/replies
Lists the state-changing replies the organization has received, accepted or rejected, including dispatcher rejections such as org mismatch, missing trust flag, rate limiting and unknown alert. Newest first.
{ "entries": [ { "id": 1042, "reply_id": "reply-01HX...", "reply_type": "run.yipyap.reply.alert.claimed.v1", "reply_source": "https://sre.example.com/", "reply_sub": "", "alert_id": "5d7a3c1e-2f4b-4e6a-9b8c-0e1f2a3b4c5d", "monitor_id": "6f1c2a9e-0b7d-4c1e-9a53-2f8e1d4b7c60", "org_id": "8a9b0c1d-2e3f-4a5b-8c6d-7e8f9a0b1c2d", "channel_id": "1e2d3c4b-5a69-4788-9a0b-c1d2e3f4a5b6", "outcome": "accepted", "received_at": "2026-04-24T17:42:03Z" } ], "has_more": false}Entries can also carry before and after objects showing the state the reply changed.
| Parameter | Description |
|---|---|
since | RFC 3339. Only entries received at or after this time. Default: the last 24 hours. An invalid value returns 400. |
limit | 1 to 500, default 100. A value above 500 is treated as 500. Zero, negative or not a number returns 400. |
channel | Only entries for this channel ID. |
alert | Only entries for this alert ID. |
type | Only entries of this reply type. |
has_more is true when more entries were received since since than limit allows. The channel, alert and type filters are applied after limit, so a filtered page can be shorter than limit (or empty) while has_more is true. To get more, raise limit (up to 500). There is no offset.