Skip to content

Add notification_url and batch_id to asset management params - #452

Merged
const-cloudinary merged 1 commit into
masterfrom
feat/align-notification-params
Aug 27, 2026
Merged

Add notification_url and batch_id to asset management params#452
const-cloudinary merged 1 commit into
masterfrom
feat/align-notification-params

Conversation

@const-cloudinary

@const-cloudinary const-cloudinary commented Aug 27, 2026

Copy link
Copy Markdown
Member

Aligns notification parameter support across the asset management endpoints, so
notification_url and batch_id can be used consistently for completion
notifications and polling.

Changes

Upload API (cloudinary/uploader.py)

  • destroy, rename, update_metadata, call_tags_api, call_context_api now
    accept and send notification_url and batch_id.
  • explode now forwards type.
  • batch_id added to _SLIDESHOW_PARAMS.

Admin API (cloudinary/api.py)

  • update accepts batch_id; delete-resource params accept notification_url.

Signing (cloudinary/utils.py)

  • sign_request gained options["non_signable"]: listed keys are still sent but
    excluded from the signature. The tags, context and metadata endpoints accept the
    notification params but omit them from the signature, so they are registered via
    _NON_SIGNABLE_NOTIFICATION_PARAMS. destroy signs them as usual.

public_id for multi/sprite (cloudinary/utils.py)

  • build_multi_and_sprite_params now forwards public_id, so multi and
    generate_sprite can name the generated asset instead of deriving it from the tag.

Tests

  • test_notification_params_signing covers all four endpoints, asserting the params
    are sent and that the signature excludes them where expected.
  • Existing rename/explode/slideshow/delete tests extended with the new params.

🤖 Generated with Claude Code

Add both params to `destroy`, `rename`, `update_metadata`, `add_tag`,
`remove_tag`, `replace_tag`, `remove_all_tags`, `add_context`,
`remove_all_context`, `create_slideshow`, `api.update` and the
`delete_resources` methods, so poll-based notifications can be correlated to the
call that produced them.

Add `type` to `explode` and `public_id` to `multi` and `generate_sprite`.

The `tags`, `context` and `metadata` endpoints accept `notification_url` and
`batch_id` but exclude them from their signed parameter sets, so
`utils.sign_request` now honors an `options["non_signable"]` list of keys to send
outside the signature.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@const-cloudinary
const-cloudinary merged commit 99b725f into master Aug 27, 2026
16 checks passed
@const-cloudinary
const-cloudinary deleted the feat/align-notification-params branch August 27, 2026 15:03
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.

1 participant