Push Notifications¶
Learn how to implement push notifications between OCPI parties.
Overview¶
OCPI push notifications allow parties to notify each other about changes to OCPI objects (locations, sessions, CDRs, etc.).
Implementation¶
push ¶
Classes¶
Functions:¶
client_url ¶
Receiver URL for a pushed object.
The path segments name the party that owns the object, so they come from the object itself: a CPO may publish under several parties, and a receiver rejects a path party that differs from the body (elu-charge#1607). The configured party is only the fallback for objects that carry none.
Source code in ocpi/core/push.py
HTTP Push¶
HTTP push notifications are sent via POST requests to the receiving party's push endpoint.
WebSocket Push¶
WebSocket push notifications provide real-time bidirectional communication.
Note
WebSocket push is experimental and may not be supported by all OCPI implementations.