How can I delete API key when Monetization is enabled?

Not applicable

Hi,

I am trying to migrate some already existing API keys to Apigee Edge. I have been using Management API described here: http://docs.apigee.com/management/apis/post/organizations/%7Borg_name%7D/developers/%7Bdeveloper_ema... to create new API key and it works correctly. (later I just need to assign correct product to new API key and it works).

However I encountered some problems when trying to delete API key generated by Edge when application was created using API described: http://docs.apigee.com/management/apis/delete/organizations/%7Borg_name%7D/developers/%7Bdeveloper_e....

I received an error:

{
  "code": "mint.resourceDoesNotExist",
  "message": "Product with id [null] does not exist",
  "contexts": []
}

It seems like this API key is somehow connected to Monetization features, products connected with automatically generated API key can be seen also using Monetization API

http://{edge_url}/v1/mint/organizations/{org_name}/developers/{developer}/applications/{application_...

Even if I leave automatically generated API key without any products connected to application (along with the one I created), then any newly added to this application product will be assigned to generated API key which I do not want.

Is there some possibility that I can remove this not needed automatically generated API key?

Solved Solved
1 6 358
1 ACCEPTED SOLUTION

Sorry to tell you this is a bug, that has been fixed in OPDK 4.16.09.

Thanks

View solution in original post

6 REPLIES 6

What version of edge are you running?

Have you tried to remove API key via UI?

I see on UI it says "At least one product is required." when you create a Developer App. Have you tried to give some dummy product?

When I try to remove API key via UI, only product is removed from that API key and the key still exists inside application. Then if I add another product it will still use the first API key, which I do not want.

I added some product to the API key, which I created and it worked, but when I try to add another product via Edge UI, they are added to first generated API key. In that case if developer edits his application via devportal (for example by adding products), new products will use generated API key (but only the one I created will be visible on portal).

That is why I would like to remove this generated key completely. Also when I use Mint API call mentioned before I get a list of products assigned to only first generated API key, but I cannot change this display to use my created API key.

I forgot to mention this before, I am running Edge on premise. Version 4.16.05.02.

Contacted you directly to get exact steps and setup.

Sorry to tell you this is a bug, that has been fixed in OPDK 4.16.09.

Thanks

Thank you very much for quick answer,

I will try to somehow get around using these workarounds.

Still it looks like the best solution would be to update Apigee to version 4.16.09, which I will discuss internally in my team.

Thanks