Regenerate consumer app api

Not applicable

Hi,

I'm trying to call the “regenerate consumer app” service.

The UTL of the service looks like this:

https://api.enterprise.apigee.com/v1/organizations/spark/developers/developer/apps/appName

And the body looks like this:

{

"name" : "{my_appname}",

"access_type" : "{access_type}",

"apiProducts": [ "{apiproduct1}", "{apiproduct2}", ...]

}

I have a few questions.

1. I’m trying to figure out why I need to pass the application name in the URL and also in the body? isn’t it the same name?

2. isn’t there supposed to be only one active consumer key for an app?

3. When I call regenerate through the REST API it doesn’t regenerate the key, it only creates another key.

So am I doing something wrong? What am I missing?

Thanks, Michael

Solved Solved
0 9 521
1 ACCEPTED SOLUTION

Not applicable

#1 is as per REST compliance

#2 Yes and no, you could have 1 consumer key for app to APIProduct(s) or 1 consumer key for each app/APIProduct (say for example you have app1 with product1, product2, product 3 then you can have key1 for app1/product1, key 2 for app1/product2 & key3 for app1/product3)

#3 Purpose is to generate an other key as regenerating the same key is of no use right?

You already have the key, why refresh the same key?

You would go re-generate the key as in the cases like key compromised, in this case you want new key no point refresh the same compromised key. Hope this helps, also please see the API doc page for this key generate API: http://apigee.com/docs/ja/management/apis/post/org...

We are going to run it by our UX group to review and improve the "Regenerate Key" label on EDGE UI and the documentation page.

View solution in original post

9 REPLIES 9

Not applicable

This question has been forwarded internally. I'll post a reply as soon as I hear back.

Not applicable

#1 is as per REST compliance

#2 Yes and no, you could have 1 consumer key for app to APIProduct(s) or 1 consumer key for each app/APIProduct (say for example you have app1 with product1, product2, product 3 then you can have key1 for app1/product1, key 2 for app1/product2 & key3 for app1/product3)

#3 Purpose is to generate an other key as regenerating the same key is of no use right?

You already have the key, why refresh the same key?

You would go re-generate the key as in the cases like key compromised, in this case you want new key no point refresh the same compromised key. Hope this helps, also please see the API doc page for this key generate API: http://apigee.com/docs/ja/management/apis/post/org...

We are going to run it by our UX group to review and improve the "Regenerate Key" label on EDGE UI and the documentation page.

Hi Srini,

thanks for your answers.

I didn't understand the answer to question one.

Also for the third question -

I understand that I don't want to refresh the key.

I assume that regenerate a key should delete the old key, and create a new one.

Instead, when I call it via the REST api, it creates a new key, but it is not deleteing the old one, so I end up with multiple keys for one product. it looks like a bug, or am I missing something?

Hi Michael,

Regarding the regenerate key. When you use API, you are generating a new key. Have to call DELETE on old key to completely get rid of the old key. In the EDGE UI this experience is offered as you click on "Regenerate Key" UI end up calling DELETE API on the old key and POST API to generate new key.

I am working with documentation team to update the API documentation page to avoid this confusion.

Hope that helps. Let me get back to you on the REST convention that we are following that mandate users to provide the name even though this is same thing as the one in URI.

Thank you,

Srini

Hi Michael Rozman,

Regarding #1, please look at this -

http://en.wikipedia.org/wiki/Representational_stat...

When we perform action on a particular item, we refer to the item directly in the URI. That's why we have the name in URI. In payload, the name appears again, because we would like to keep the payload same for both CREATE & UPDATE actions. And you're right, both the values are same.

This helps me in a similar situation, we want to regenerate keys on a periodic basis to ensure keys have not been disseminated/compromised and we dont want to have any App downtime.

So we would generate a new key and give the App Developer a time period in which to update the App. After that we would delete the old key.

So, having the ability to have multiple keys active is essential. @Srini Chebrolu @michael.rozman @Michael Malloy

I was able to regenerate consumer ky and secret via apigee gui in developer app screen. Now I am not seeing the Regenerate Key button. Please let me know is their a way to Regenerate Keyin GUI ?

@kumarsathe , Answers are strictly for answers. Please post as a new question instead of posting same in other threads.

@kumarsathe , See similar question asked here related to re-generate API key option in Edge UI.