The Applications service is responsible for managing applications and technical configurations for Cegid products. This service belongs to the Juice family of services.
| Event | Description | Payload | Payload Description | Remarks |
|---|---|---|---|---|
Aclentries_Created |
Triggered after an ACL entries is created. | ACLEntries |
The created ACL Entries. | |
Aclentries_Deleted |
Triggered after an ACL entries is deleted. | ACLEntries |
The deleted ACL Entries. | |
Aclentries_Updated |
Triggered after an ACL entries is updated. | ACLEntries |
The updated ACL Entries. | |
Appdefinition_Created |
Triggered after an application definition is created. | AppDefinition |
The created application definition. | |
Appdefinition_Deleted |
Triggered after an application definition is deleted. | EntityDeletedPayload |
The deleted application definition. | |
Appdefinition_Updated |
Triggered after an application definition is updated. | AppDefinitionChanges |
The original and the current application definition values. | |
AppDefinitionApiRequiredScopes_Updated |
Triggered when the required scopes of an AppDefinition are modified. | AppDefinitionApiRequiredScopesChanges |
The original and current required scopes values. | |
AppDefinitionDependencies_Updated |
Triggered when the dependencies of an AppDefinition are modified. | AppDefinitionDependenciesChanges |
The original and current dependencies values. | |
AppDefinitionFeatures_Updated |
Triggered when the features of an AppDefinition are modified. | AppDefinitionFeaturesChanges |
The original and current features values. | |
AppDefinitionResources_Updated |
Triggered when the resources of an AppDefinition are modified. | AppDefinitionResourcesChanges |
The original and current resources values. | |
AppDefinitionRoles_Updated |
Triggered when the roles of an AppDefinition are modified. | AppDefinitionRolesChanges |
The original and current roles values. | |
AppInstance_Activated |
Triggered after an application instance was activated. | AppInstanceStateChangedPayload |
An entity that identifies the application instance by its key and aditional information about the state change. | |
AppInstance_Closed |
Triggered after an application instance was closed. | AppInstanceStateChangedPayload |
An entity that identifies the application instance by its key and aditional information about the state change. | |
Appinstance_Created |
Triggered after an application instance is created. | AppInstance |
The created application instance. | |
Appinstance_Deleted |
Triggered after an application instance is deleted. | EntityDeletedPayload |
The deleted application instance. | |
AppInstance_Failed |
Triggered after an application instance provisioning has failed. | AppInstanceStateChangedPayload |
An entity that identifies the application instance by its key and aditional information about the state change. | |
AppInstance_Suspended |
Triggered after an application instance was suspended. | AppInstanceStateChangedPayload |
An entity that identifies the application instance by its key and aditional information about the state change. | |
Appinstance_Updated |
Triggered after an application instance is created. | AppInstance |
The updated application instance. | |
AppInstanceCompany_Created |
Triggered after an application instance company association is created. | AppInstanceCompany |
The created association data. | |
AppInstanceCompany_Deleted |
Triggered after an application instance company association is deleted. | AppInstanceCompany |
The deleted association data. | |
AppInstanceCompany_Updated |
Triggered after an application instance company association is updated. | AppInstanceCompany |
The updated association data. | |
Organization_Created |
Triggered after an organization is created. | Organization |
The created organization. | |
Organization_Deleted |
Triggered after an organization is deleted. | EntityDeletedPayload |
The deleted organization. | |
Organization_Updated |
Triggered after an organization is updated. | Organization |
The updated organization. | |
Rolesassignments_Created |
Triggered after a roles are created. | RolesAssignments |
The created roles. | |
Rolesassignments_Deleted |
Triggered after a roles are deleted. | RolesAssignments |
The deleted roles. | |
Workspace_Created |
Triggered after a workspace is created. | Workspace |
The created workspace. | |
Workspace_Deleted |
Triggered after a workspace is deleted. | EntityDeletedPayload |
The deleted workspace. | |
Workspace_Updated |
Triggered after a workspace is updated. | Workspace |
The updated workspace. |
ACLEntriesDescribes an acl entries.
| Property | Description |
|---|---|
Entries |
Gets or sets the ACL entries. |
AppDefinitionDefines an application definition.
| Property | Description |
|---|---|
Resources |
The collection of application definition resources. |
Features |
The application definition features. |
Roles |
Gets or sets the roles. |
Dependencies |
Gets or sets the dependencies. |
DescriptionTranslations |
Gets or sets the description translations. |
AppDefinitionApiRequiredScopesChangesDescribes an app definition API required scopes changes.
| Property | Description |
|---|---|
OriginalValues |
Gets or sets the original values. |
CurrentValues |
Gets or sets the current values. |
AppDefinitionChangesDescribes an app definition changes.
| Property | Description |
|---|---|
OriginalValues |
Gets or sets the original values. |
CurrentValues |
Gets or sets the current values. |
AppDefinitionDependenciesChangesDescribes an app definition dependencies changes.
| Property | Description |
|---|---|
OriginalValues |
Gets or sets the original values. |
CurrentValues |
Gets or sets the current values. |
AppDefinitionFeaturesChangesDescribes an app definition features changes.
| Property | Description |
|---|---|
OriginalValues |
Gets or sets the original values. |
CurrentValues |
Gets or sets the current values. |
AppDefinitionResourcesChangesDescribes an app definition resources changes.
| Property | Description |
|---|---|
OriginalValues |
Gets or sets the original values. |
CurrentValues |
Gets or sets the current values. |
AppDefinitionRolesChangesDescribes an app definition roles changes.
| Property | Description |
|---|---|
OriginalValues |
Gets or sets the original values. |
CurrentValues |
Gets or sets the current values. |
AppInstanceDefines an application instance.
| Property | Description |
|---|---|
BaseKey |
The application instance base key. |
SharedKey |
The application instance shared key. |
TrackingId |
The application instance tracking identifier. Provides full tracking throughout the infrastructure stack. |
Description |
The application instance description. |
Name |
The application instance name. |
AppDefinitionKey |
The key of the application definition associated to the application instance. |
Group |
The application definition group that the application instance belongs to. |
WorkspaceKey |
Gets or sets the workspace key. |
OrganizationKey |
The key of the organization associated with the app instance. |
Version |
The application version used by the application instance. |
StartDate |
The application instance start date. |
EndDate |
The application instance end date. |
State |
The application instance current state. |
StateReason |
The application instance state reason. Contains the metadata associated with the current state. |
Resources |
The application instance resources. |
Features |
The application instance features. |
AccessTags |
The application instance access tags. |
AppInstanceCompanyDescribes an app instance company.
| Property | Description |
|---|---|
AssociationKey |
Gets or sets the association key. |
AppInstance |
Gets or sets the app instance. |
Company |
Gets or sets the company. |
AppInstanceStateChangedPayloadDescribes an app instance state changed payload.
| Property | Description |
|---|---|
Key |
Gets or sets the key. |
PreviousState |
Gets or sets the previous state. |
PreviousStateReason |
Gets or sets the previous state reason. |
NewStateReason |
Gets or sets the new state reason. |
ChangedAt |
Gets or sets the changed at. |
WorkspaceKey |
Gets or sets the workspace key. |
OrganizationKey |
Gets or sets the organization key. |
AppDefinitionKey |
Gets or sets the app definition key. |
Group |
Gets or sets the group. |
EntityDeletedPayloadThe payload to send on a entity deleted event.
| Property | Description |
|---|---|
Key |
The deleted entity key. |
OrganizationDefines an organization.
| Property | Description |
|---|---|
BaseKey |
The organization base key. |
TrackingId |
The organization tracking identifier. |
Name |
The organization name. |
WorkspaceKey |
The key of the workspace associated to the organization. |
State |
The organization current state. |
StateReason |
The organization state reason. Contains the metadata associated with the current state. |
RolesAssignmentsDescribes a roles assignments.
| Property | Description |
|---|---|
Assignments |
Gets or sets the assignments. |
WorkspaceDefines a workspace.
| Property | Description |
|---|---|
BaseKey |
The workspace base key. |
TrackingId |
The workspace tracking identifier. |
Description |
The workspaces description. |
Name |
The workspace name. |
State |
The workspace current state. |
StateReason |
The workspace state reason. Contains the metadata associated with the current 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. | [Appdefinition_Created] |
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. | [Appdefinition_Created] |
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. | APPS |
X-Webhook-Event |
The identifier of the event that triggered the callback. | Appdefinition_Created |
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>.