Skip to content

feat(admin): add Triggers API for webhook notification management#130

Open
NitriKx wants to merge 1 commit into
cloudinary:mainfrom
NitriKx:bsa/add-triggers-webhook-api
Open

feat(admin): add Triggers API for webhook notification management#130
NitriKx wants to merge 1 commit into
cloudinary:mainfrom
NitriKx:bsa/add-triggers-webhook-api

Conversation

@NitriKx
Copy link
Copy Markdown
Contributor

@NitriKx NitriKx commented May 20, 2026

Adds full CRUD operations for the Cloudinary webhook notification triggers endpoint (/v1_1/{cloud}/triggers)

Tested against the live Cloudinary API via a Terraform provider integration (create + update + delete round-trip).

@const-cloudinary
Copy link
Copy Markdown
Member

@NitriKx great PR!

Would you mind adding a few specs for the newly added APIs?

@NitriKx NitriKx force-pushed the bsa/add-triggers-webhook-api branch from 1579cd8 to abbd800 Compare May 20, 2026 10:45
Adds typed bindings for the Cloudinary /triggers endpoint:
ListTriggers, GetTrigger, CreateTrigger, UpdateTrigger, DeleteTrigger.
Supports filter (JSONLogic), payload_template (Mustache), auth_scheme,
and additive flag.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@NitriKx NitriKx force-pushed the bsa/add-triggers-webhook-api branch from abbd800 to 06db2ef Compare May 20, 2026 10:52
@NitriKx NitriKx marked this pull request as ready for review May 20, 2026 11:02
@NitriKx
Copy link
Copy Markdown
Contributor Author

NitriKx commented May 21, 2026

Hello @const-cloudinary 👋 I've added few tests (inspired from what has been done for the folders)

@NitriKx
Copy link
Copy Markdown
Contributor Author

NitriKx commented May 22, 2026

Heey 👋 Can we merge this?

Copy link
Copy Markdown
Member

@const-cloudinary const-cloudinary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NitriKx Great PR overall!

Please drop GetTrigger (see comment) and we are good to merge and release it.

Comment thread api/admin/triggers.go
// GetTrigger retrieves a single webhook notification trigger by its ID.
// Cloudinary does not expose a single-resource GET endpoint, so this is
// implemented as ListTriggers filtered to the matching ID.
func (a *API) GetTrigger(ctx context.Context, params GetTriggerParams) (*GetTriggerResult, error) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's drop this one. The API itself doesn't support it.

Current implementation is trivial, anyone can implement it in their code.

The real reason for dropping it, is if/when it will be implemented in the API side, it might have different structure and it will introduce a breaking change, which we would like to avoid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants