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):
- Zero or more
event: backfillmessages, each with JSONdata{id, name, data, timestamp}for previously unconsumed notifications (up to 10 minutes old), delivered oldest-first. - One
event: backfill_completemessage withdata: {}. At this point the client can treat local state as synchronized. - Live
data:messages (no expliciteventfield) for real-time notifications from Redis pub/sub, using the same JSON shape:{id, name, data, timestamp}. - Periodic
:keepaliveSSE 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.
AuthorizationBearer <token>
Token-based authentication using access tokens.
In: header
Query Parameters
token?Token
id_task?Id Task
Default
nullid_image?Id Image
Default
nullname_list?Name List
Default
nullResponse 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