Notifications

Stream notifications

Establish a Server-Sent Events (SSE) stream to receive real-time notifications for the authenticated user, filtered by notification names and/or job/image IDs. Event chain on first connection (from the client's perspective):

  1. Zero or more event: backfill messages, each with JSON data {id, name, data, timestamp} for previously unconsumed notifications (up to 10 minutes old), delivered oldest-first.
  2. One event: backfill_complete message with data: {}. At this point the client can treat local state as synchronized.
  3. Live data: messages (no explicit event field) for real-time notifications from Redis pub/sub, using the same JSON shape: {id, name, data, timestamp}.
  4. Periodic :keepalive SSE comments (~every 15s) to keep the connection open through proxies/timeouts; clients should ignore them.

Consumed notifications must be deleted by the client (see DELETE /notifications/{id}), so they are not replayed on the next connection/poll.

GET
/notifications/events
AuthorizationBearer <token>

Token-based authentication using access tokens.

In: header

Query Parameters

token?Token
id_task?Id Task
Defaultnull
id_image?Id Image
Defaultnull
name_list?Name List
Defaultnull

Response Body

Examples

curl -X GET "https://v2.api.piktid.com/notifications/events?token=string"
Empty
{
  "error": "Invalid request",
  "detail": [
    {
      "field": null,
      "message": "string",
      "position": "query"
    }
  ]
}
Empty