Cryptlex Forums

Webhook “deleted” event on cascaded deletions

I
innit-anton

I noticed an issue with the consistency of data arriving via the webhook functionality. Normally, when an entity is deleted, it will post the “deleted” event correctly, but I found that it won’t post the “deleted” event in case the delete is brought about by a cascaded operation.

Steps to reproduce:

  1. Set up webhook for license.created, license.deleted, activation.created, activation.deleted
  2. Create License
  3. Activate License
  4. Delete License

As the license is deleted, it appears that activations depending on the license will also be deleted, however silently.

Expected Behaviour
4 webhooks posted. The order between the deleted events is not critical, but the activation.deleted webhook being posted first is ideal.

  1. license.created
  2. activation.created
  3. activation.deleted
  4. license.deleted

Actual Behaviour
3 webhooks posted, with the activation.deleted webhook missing.

  1. license.created
  2. activation.created
  3. license.deleted
A
Adnan KamiliCryptlex team

Hi,

We don’t plan to support cascade webhook events. Sometimes a license may have a hundred thousand activations and triggering so many events is impractical.

I
innit-anton

Hi,

Thank you for the reply, it makes a lot of sense. I will simply do the cascade on my end, then. I presume it’s the same behaviour for all parent-child relationships (users → licenses → activations, etc)?

A
Azan

Yes. The parent-child relationships in our service are as follows:
Product → Licenses, Releases, Release Platforms, Release Channels, Trial Activations, Product Versions, Feature Flags
License → Activations
Release → Release Files

Users and Licenses are considered siblings so deleting one will not delete the other. Let me know if this answers your question.

I
innit-anton

Thank you azan! That’s a big help. So, if I delete a user with licenses, it means the user attribute on the license will be set to null, in case it’s fetched from the API?

A
Azan

Correct. The behavior is the same for Organizations and Resellers.

← Back to all topics · 6 posts · 1280 views · opened 2024-01-31