Provides operations to manage certificates.
| Event | Description | Payload | Payload Description | Remarks |
|---|---|---|---|---|
ElectronicSeal_Activated |
Webhook raised when an electronic seal owner is activated. | ElectronicSealActivatedPayload |
Describes information about the electronic seal owner. | |
ElectronicSeal_Deactivated |
Webhook raised when an electronic seal owner is deactivated. | ElectronicSealDeactivatedPayload |
Describes information about the electronic seal owner. | |
ElectronicSealParent_Activated |
Webhook raised when an electronic seals parent owner is activated. | ElectronicSealParentPayload |
Describes information about the electronic seals parent owner. | |
ElectronicSealParent_Deactivated |
Webhook raised when an electronic seals parent owner is deactivated. | ElectronicSealParentPayload |
Describes information about the electronic seals parent owner. | |
ElectronicSealSignature_Completed |
Webhook raised when an electronic seal signature has completed. | ElectronicSealSignatureCompletedPayload |
Describes information about the electronic seal signature. |
ElectronicSealActivatedPayloadDefines the payload for electronic seals owners webhooks.
| Property | Description |
|---|---|
Environment |
The provider environment used. |
ParentOwnerId |
The parent owner identifier. |
ProviderId |
The provider identifier. |
OwnerId |
The owner identifier. |
AuthorizerId |
The authorizer identifier. |
AuthorizerSecret |
The authorizer secret. |
ElectronicSealDeactivatedPayloadDefines the payload for electronic seals owners webhooks.
| Property | Description |
|---|---|
Environment |
The provider environment used. |
ParentOwnerId |
The parent owner identifier. |
ProviderId |
The provider identifier. |
OwnerId |
The owner identifier. |
ElectronicSealParentPayloadDefines the payload for electronic seals parent owners webhooks.
| Property | Description |
|---|---|
Environment |
The provider environment used. |
ParentOwnerId |
The parent owner identifier. |
ProviderId |
The provider identifier. |
ElectronicSealSignatureCompletedPayloadDefines the payload for electronic seals owners webhooks.
| Property | Description |
|---|---|
Environment |
The provider environment used. |
ParentOwnerId |
The parent owner identifier. |
ProviderId |
The provider identifier. |
OwnerId |
The owner identifier. |
RequestId |
The unique identifier of the request. |
RequestState |
The request state. |
The REST API provides endpoints that allow creating, updating, and deleting subscriptions to specific events.
Creates a subscription for one or more webhooks events.
| Parameter | Description | Example |
|---|---|---|
ClientId |
The unique identifier of the client application subscribing the webhook. | MyApplication |
EventNames |
A list containing the names of the events being subscribed. | [ElectronicSealParent_Activated] |
CallbackUrl |
The address of the endpoint that should receive the webhook callback. | https://server.io/callback |
Secret |
A shared secret, defined by the client application, that can be used to authenticate the callbacks. | MySpecialSecret |
DeadLettering.Enabled |
A value indicating whether the subscription should support dead-lettering. | false |
DeadLettering.Configuration |
The configuration that should be use for dead-lettering (when enabled). | See Dead-lettering |
Active |
A value indicating whether the subscription should be activated. | true |
The subscription identifier, which can latter be used to update, delete it, etc.
POST /api/v{version:apiVersion}/webhooks
content-type: application/json
body:
{
"clientId": "{ClientId}",
"eventNames": [
"{EventName}
],
"callbackUrl": "{CallbackUrl}",
"secret": "{Secret}",
"deadLettering": {
"enabled": false,
"configuration": null
},
"active": true
}
CreateWebhookSubscriptionRequest request = new CreateWebhookSubscriptionRequest()
{
(...)
};
try
{
RestServiceResult<string> result = await this.ServiceClient.Webhooks.CreateSubscriptionAsync(request).ConfigureAwait(false);
string subscriptionId = result.Value;
(...)
}
catch (RestRequestException ex)
{
(...)
}
Updates an existing subscription.
| Parameter | Description | Example |
|---|---|---|
SubscriptionId |
The identifier of the subscription that should be updated. | |
ClientId |
The unique identifier of the client application that subscribed the webhook. | MyApplication |
EventNames |
A list containing the names of the events being subscribed. | [ElectronicSealParent_Activated] |
CallbackUrl |
The address of the endpoint that should receive the webhook callback. | https://server.io/callback |
Secret |
A shared secret, defined by the client application, that can be used to authenticate the callbacks. | MySpecialSecret |
DeadLettering.Enabled |
A value indicating whether the subscription should support dead-lettering. | false |
DeadLettering.Configuration |
The configuration that should be use for dead-lettering (when enabled). | See Dead-lettering |
Active |
A value indicating whether the subscription should be activated. | true |
PUT /api/v{version:apiVersion}/webhooks
content-type: application/json
body:
{
"subscriptionId": "{SubscriptionId}",
"clientId": "{ClientId}",
"eventNames": [
"{EventName}
],
"callbackUrl": "{CallbackUrl}",
"secret": "{Secret}",
"deadLettering": {
"enabled": false,
"configuration": null
},
"active": true
}
UpdateWebhookSubscriptionRequest request = new UpdateWebhookSubscriptionRequest()
{
(...)
};
try
{
RestServiceResult result = await this.ServiceClient.Webhooks.UpdateSubscriptionAsync(request).ConfigureAwait(false);
(...)
}
catch (RestRequestException ex)
{
(...)
}
Deletes an existing subscription.
| Parameter | Description | Example |
|---|---|---|
ClientId |
The unique identifier of the client application that subscribed the webhook. | MyApplication |
SubscriptionId |
The identifier of the subscription that should be deleted. |
DELETE /api/v{version:apiVersion}/webhooks/{clientId}/{subscriptionId}
try
{
RestServiceResult result = await this.ServiceClient.Webhooks.DeleteSubscriptionAsync("{ClientId}", "{SubscriptionId}").ConfigureAwait(false);
(...)
}
catch (RestRequestException ex)
{
(...)
}
Retrieves metadata about all the webhooks available.
The webhooks metadata.
[
{
"eventName": "{EventName}",
"eventDescription": "{EventDescription}",
"PayloadDescription": "{PayloadDescription}"
}
]
GET /api/v{version:apiVersion}/webhooks
try
{
RestServiceResult<IList<WebhookMetadata>> result = await this.ServiceClient.Webhooks.GetWebhooksMetadataAsync().ConfigureAwait(false);
IList<WebhookMetadata> metadata = result.Value;
(...)
}
catch (RestRequestException ex)
{
(...)
}
Retrieves a subscription.
| Parameter | Description | Example |
|---|---|---|
ClientId |
The unique identifier of the client application that subscribed the webhook. | MyApplication |
SubscriptionId |
The identifier of the subscription that should be retrieved. |
The subscription information.
{
"clientId": "{ClientId}",
"subscriptionId": "{SubscriptionId}",
"eventNames": ["{EventName1}", "{EventName2}"],
"secret": "{Secret}",
"callbackUrl": "{CallbackUrl}",
"filters": {
"{Filter1}": "{Value1}",
"{Filter2}": "{Value2}"
},
"properties": {
"{Property1}": "{Value1}",
"{Property2}": "{Value2}"
},
"deadLettering": {
"enabled": true,
"configuration": "{Configuration}"
},
"active": true,
"modifiedOn": {ModifiedOn},
"lastRequest": {
(...)
},
"lastResponse": {
(...)
}
}
GET /api/v{version:apiVersion}/webhooks/{clientId}/{subscriptionId}
try
{
RestServiceResult<WebhookSubscription> result = await this.ServiceClient.Webhooks.GetSubscriptionAsync("{ClientId}", "{SubscriptionId}").ConfigureAwait(false);
WebhookSubscription subscription = result.Value;
(...)
}
catch (RestRequestException ex)
{
(...)
}
Retrieves all the subscriptions for a given client.
| Parameter | Description | Example |
|---|---|---|
ClientId |
The unique identifier of the client application that subscribed the webhooks. | MyApplication |
A list containing the subscriptions information (as in Get Subscription).
GET /api/v{version:apiVersion}/webhooks/{clientId}
try
{
RestServiceResult<IList<WebhookSubscription>> result = await this.ServiceClient.Webhooks.GetSubscriptionsAsync("{ClientId}").ConfigureAwait(false);
IList<WebhookSubscription> subscriptions = result.Value;
(...)
}
catch (RestRequestException ex)
{
(...)
}
Deletes all the subscriptions for a given client.
| Parameter | Description | Example |
|---|---|---|
ClientId |
The unique identifier of the client application that subscribed the webhooks. | MyApplication |
DELETE /api/v{version:apiVersion}/webhooks/{clientId}
try
{
RestServiceResult result = await this.ServiceClient.Webhooks.DeleteSubscriptionsAsync("{ClientId}").ConfigureAwait(false);
(...)
}
catch (RestRequestException ex)
{
(...)
}
Pings a subscription.
| Parameter | Description | Example |
|---|---|---|
ClientId |
The unique identifier of the client application that subscribed the webhook. | MyApplication |
SubscriptionId |
The identifier of the subscription that should be invoked. |
POST /api/v{version:apiVersion}/webhooks/{clientId}/{subscriptionId}/ping
try
{
RestServiceResult result = await this.ServiceClient.Webhooks.PingSubscriptionAsync("{ClientId}", "{SubscriptionId}").ConfigureAwait(false);
(...)
}
catch (RestRequestException ex)
{
(...)
}
When a webhook event occurs, the callback URL will be invoked for all active subscriptions.
This callback is a request to the endpoint configured in the subscription, including the webhook payload in the content.
Additionally, the following headers will be sent in the request, allowing the client application to identify the concrete event and authenticate the request.
| Header | Description | Example |
|---|---|---|
X-Webhook-Application |
The identifier of the application sending the callback. | CS |
X-Webhook-Event |
The identifier of the event that triggered the callback. | ElectronicSealParent_Activated |
X-Webhook-Delivery |
A unique identifier of the callback (it will be the same for all retries). | 8f2cad06-73bd-4eb3-98ef-1a78b53506db |
X-Webhook-Signature |
The HMAC SHA256 signature of the payload, computed using the secret provided by the client application when the subscription was created or last updated. | sha256=4C3019F69CD9AA11ECF24EF3D9F10AB97CF3B0F0662F1718291615152E2213C3 |
X-Webhook-Properties |
The properties specified by the client application when the subscription was created or last updated. These properties can be used by the client application to pass state to the callbacks. |
If the webhooks server supports dead-lettering, then it can be enabled when creating or updating webhooks subscriptions.
This feature ensures the availability to the client application of all the events occurred, because, when the server is not able to deliver a webhook (for example, if the client is down), after retrying the configured number of times, it will store the event in the blobs storage account provided by the client configuration. The client can inspect this blob storage and recover all the missed events.
The configuration is provided using the DeadLettering.Configuration setting, when creating/updating a subscription. This should be a config string (a string in the form prop1=value;prop2=value) specifying how the server should connect to the storage account,
using the following properties:
ConnectionString (optional) - a connection string for the storage account.ServiceUri (optional) - the blob storage service URI.TenantId (required if ServiceUri is specified) - the tenant identifier that should be used to authorize against the blob storage service.ClientId (required if ServiceUri is specified) - the client identifier that should be used for authorization.ClientSecret (required if ServiceUri is specified) - the client secret that should be used for authorization.Container (required) - the name of the container that should be used to store the dead-letters.Notice that you can either specify the connection using
ConnectionStringORServiceUri,TenantId,ClientId, andClientSecret.
The values passed in for ConnectionString, ServiceUri, TenantId, ClientId, and ClientSecret need to be escaped, by replacing the following chars:
+ replaced with #2B; replaced with #3B= replaced with #3DEach dead-letter will be a JSON file stored in the blob container and named <EventName>-<Timestamp>-<RandomString>.