Webhook Events
Clients can subscribe to the Webhooks of the Lissi Agent to get informed about a variety of events. As an alternative to the HTTP-based Webhook events, clients can also subscribe to Kafka or WebSocket events.
Subscribing to Webhook Events
Clients can subscribe to Webhook events via the HTTP API.
Subscribe |
|
Unsubscribe |
|
Each Webhook subscription only serves the events of one tenant. Clients can subscribe to the Webhook events of multiple tenants in order to receive events of multiple tenants. In order to know to which tenant an event belongs it is recommended to encode the tenant ID in the client's base URL (e.g. https://sample-client.com/events/<tenant-id>
).
Shared topic subscription
When subscribing to Webhook events, one can specify the boolean request query parameter sharedTopic
:
if set to
false
, the Lissi Agent will send Webhook events to the base URL, followed by the corresponding event path (e.g./<topic>/<id>/<event>
) with payload objectpayload
;if set to
true
, the Agent sends all Webhook events to the provided base URL only—not to the event path. The event path is sent as a string within the payload, which consists of a stringevent
and an objectpayload
. The Webhook subscriber is responsible for parsing thisevent
and using it to interpret thepayload
.
Examples
With
sharedTopic=false
, a notification is sent tohttps://sample-client.com/events/<topic>/<id>/<event>
with payloadpayload
;with
sharedTopic=true
, a notification is sent to the base URLhttps://sample-client.com/events
with a payload object consisting of the samepayload
as above and the event path stringevent="/<topic>/<id>/<event>"
.
If not defined, the default value of sharedTopic
is false
.
Webhook Endpoints
The following table lists the Webhook events that are sent by the Lissi Agent to the clients.
Endpoint | Payload | Description |
|
JSON
| Informs about an state update of a connection. The possible states are:
(see also https://github.com/hyperledger/aries-rfcs/tree/main/features/0160-connection-protocol) |
|
| Informs about the deletion of ONE connection. The URL paths encodes the ID of the connection that has been deleted. |
|
JSON
| Informs about the deletion of connections. The payload is a list of IDs of all the connections that have been deleted. |
|
JSON
| Informs about an state update of a credential. The possible states are:
(see also https://github.com/hyperledger/aries-rfcs/tree/main/features/0036-issue-credential ) |
|
| Informs about the deletion of ONE credential. The URL paths encodes the ID of the credential that has been deleted. |
|
JSON
| Informs about the deletion of credentials. The payload is a list of IDs of all the connections that have been deleted. |
|
| Informs about the revocation of ONE credential. The URL paths encodes the ID of the credential that has been revoked. Every deleted credential will also be revoked in case the credential definition used to create this credential is revocable. |
|
JSON
| Informs about the revocation of credentials. The payload is a list of IDs of all the connections that have been revoced. Every deleted credential will also be revoked in case the credential definition used to create this credential is revocable. |
|
JSON
| Informs about the state of a credential from the holder perspective. The possible states are:
(see also https://github.com/hyperledger/aries-rfcs/tree/main/features/0036-issue-credential ) |
|
| Informs about the deletion of a credentials from an Holder perspective. The URL paths encodes the ID of the credential that has been deleted. |
|
JSON
| Informs about an state update of a proof request. The possible states are:
(see also https://github.com/hyperledger/aries-rfcs/tree/main/features/0037-present-proof) |
|
| Informs about the deletion of ONE proof request. The URL paths encodes the ID of the proof request that has been deleted. |
|
JSON
| Informs about the deletion of proof requests. The payload is a list of IDs of all the proof reuests that have been deleted. |
|
JSON
| Informs about an state update of a proof request from the holder perspective. The possible states are:
(see also https://github.com/hyperledger/aries-rfcs/tree/main/features/0037-present-proof) |
|
| Informs about the deletion of a proof request from an holder perspective. The URL paths encodes the ID of the proof request that has been deleted. |
Authentication
To authenticate the Webhook calls, the Lissi Agent includes the header X-API-Key
in all the requests sent to the clients. The API key is defined when subscribing to the Webhook events.
Failure Handling
In case a client is not available when an event is sent out the event will be lost. Currently, there is no retry mechanism in place. The Lissi Agent will log an error in case it failed to send any Webhook event to a subscribed client.