Managing Multiple Keys Under a Product — Add/Remove API Products in a Single Call Without Changing Keys

Context:

I’m building a custom developer portal that integrates with Apigee Management APIs.
In my use case, each developer app can have multiple API keys, and during an edit operation, I need to add or remove API products for those keys — ideally in a single API call, similar to how the integrated Apigee Developer Portal handles this.

Challenge:

From the Apigee Management API documentation, it seems that there’s no single API endpoint that allows both adding and removing API products for a key in one operation.

Questions:

  1. Is there a recommended or supported way to update the API product list (add/remove) for a key in one atomic call, similar to the integrated developer portal behavior?

  2. How does the Apigee integrated portal internally handle this — does it use multiple API calls behind the scenes, or is there a private/internal API for combined updates?

  3. If multiple calls are indeed required, what’s the best practice for maintaining consistency across multiple keys (e.g., ensuring rollback if one update fails)?

Hello @Prateek_14 I hope you had a nice weekend! As per the above:
Questions:

  1. Is there a recommended or supported way to update the API product list (add/remove) for a key in one atomic call, similar to the integrated developer portal behavior?

There is not, each API call can update one key/product pairing at any specific point in time

  1. How does the Apigee integrated portal internally handle this — does it use multiple API calls behind the scenes, or is there a private/internal API for combined updates?

I can verify, but my educated guess is they verify the current state of the product/key pairing and loop through each key that needs to be updated/re-referenced. More likely then not it is 1-N API calls associated with a single transaction given the above

  1. If multiple calls are indeed required, what’s the best practice for maintaining consistency across multiple keys (e.g., ensuring rollback if one update fails)?

See above, your underlying portal logic should maintain the previous state and loop through each key. If one operation/check fails for any reason you should be able to rollback seamlessly via the same API call

Hope this helps!

1 Like

Thank you for the detailed response

1 Like