How can we change developer for developer app ?

We used to enroll all developer apps with a single developer account. But we have now migrated to a setup where developers can register themselves in edge the way it was intended. However, we still have these early enrollment partners all under 1 developer account. The edit option for developer app does not allow us to modify the developer.

So, how can we change the developer for these developer apps without invalidating their existing keys and secrets - cq. without interrupting the link between the apps and api products/proxies?

Solved Solved
3 9 4,519
1 ACCEPTED SOLUTION

Let’s us assume we have a developer app “TestApp_Current” with the following info:

  • developer - abc@company.com
  • consumer key - K1
  • consumer secret - S1
  • API Products - P1, P2

The requirement is to change the developer for the “TestApp_Current” to xyz@company.com but retain all the other info as is. Here is the detailed procedure to do this:

  1. Create a new developer app “TestApp_New” with some random API Product. This will auto-generate a new consumer key/secret (let's say K2/S2)
  2. Obtain the consumer key and secret from the “TestApp_Current” either from UI or using the following API
curl -v -u email:password -X GET https://api.enterprise.apigee.com/v1/o/{org-name}/developers/abc@company.com/apps/TestApp_Current 

3. Delete the developer app “TestApp_Current”

(This step is required because we are trying to migrate the consumer key/secret from one developer app to another within the same org. See this article for more details)

4. Create the consumer key/secret “K1/S1” in “TestApp_New” using the following API

curl -v -H 'Content-type:application/json' -u email:password https://api.enterprise.apigee.com/v1/o/{org-name}/developers/{developer_email_or_id}/apps/{app_name}... -X POST -d \'{ 
  "consumerKey": "K1", 
  "consumerSecret": "S1"
}'

5. Associate API Products (P1, P2) to the consumer key/secret “K1/S1" in “TestApp_New" using the following API

curl -v -H 'Content-type:application/json' -u email:password https://api.enterprise.apigee.com/v1/o/{org-name}/developers/{developer_email_or_id}/apps/{app_name}... -X POST -d \'{ "apiProducts": ["P1", "P2"]}'

6. Delete the auto generated consumer key and secret (K2/S2) in TestApp_New using the API

curl -X DELETE  "https://api.enterprise.apigee.com/v1/o/{org-name}/developers/{developer_email_or_id}/apps/{app_name}/keys/{key}"

With the above steps you should now have the developer app “TestApp_New” with the following contents:

  • developer - xyz@company.com
  • consumer key - K1
  • consumer secret - S1
  • API Products - P1, P2

Essentially we have modified the developer from abc@company.com to xyz@company.com

Note: We can also run the above APIs using Smart Docs at http://apigee.com/docs/developer-services/content/import-existing-consumer-keys-and-secrets

View solution in original post

9 REPLIES 9

You can "import" keys into an existing developer app. The process is described here.

So what you would need to do is,

  • query the existing keys,
  • create new developers, and new apps for those developers
  • then import the existing keys into the new apps using the information in the referenced article.

This doesn't "change the developer" on an existing app, but it does migrate the keys and secrets from one app to another, which accomplishes your goal, I think.

@Dino,

Thanks for your suggestion. I will try it out and update you if it works or not.

Does the same apply if you are trying to edit the 'Name' field of a developer app? It appears that in the analytics portion of Apigee Edge, it takes the Name field when looking at reports instead of the Display Name field.

Let’s us assume we have a developer app “TestApp_Current” with the following info:

  • developer - abc@company.com
  • consumer key - K1
  • consumer secret - S1
  • API Products - P1, P2

The requirement is to change the developer for the “TestApp_Current” to xyz@company.com but retain all the other info as is. Here is the detailed procedure to do this:

  1. Create a new developer app “TestApp_New” with some random API Product. This will auto-generate a new consumer key/secret (let's say K2/S2)
  2. Obtain the consumer key and secret from the “TestApp_Current” either from UI or using the following API
curl -v -u email:password -X GET https://api.enterprise.apigee.com/v1/o/{org-name}/developers/abc@company.com/apps/TestApp_Current 

3. Delete the developer app “TestApp_Current”

(This step is required because we are trying to migrate the consumer key/secret from one developer app to another within the same org. See this article for more details)

4. Create the consumer key/secret “K1/S1” in “TestApp_New” using the following API

curl -v -H 'Content-type:application/json' -u email:password https://api.enterprise.apigee.com/v1/o/{org-name}/developers/{developer_email_or_id}/apps/{app_name}... -X POST -d \'{ 
  "consumerKey": "K1", 
  "consumerSecret": "S1"
}'

5. Associate API Products (P1, P2) to the consumer key/secret “K1/S1" in “TestApp_New" using the following API

curl -v -H 'Content-type:application/json' -u email:password https://api.enterprise.apigee.com/v1/o/{org-name}/developers/{developer_email_or_id}/apps/{app_name}... -X POST -d \'{ "apiProducts": ["P1", "P2"]}'

6. Delete the auto generated consumer key and secret (K2/S2) in TestApp_New using the API

curl -X DELETE  "https://api.enterprise.apigee.com/v1/o/{org-name}/developers/{developer_email_or_id}/apps/{app_name}/keys/{key}"

With the above steps you should now have the developer app “TestApp_New” with the following contents:

  • developer - xyz@company.com
  • consumer key - K1
  • consumer secret - S1
  • API Products - P1, P2

Essentially we have modified the developer from abc@company.com to xyz@company.com

Note: We can also run the above APIs using Smart Docs at http://apigee.com/docs/developer-services/content/import-existing-consumer-keys-and-secrets

Please note: Between step 3 (Delete TestApp_Current) and step 4 (Add K1/S1 into the TestApp_New) there is a window during which the API Key and Secret will be invalid, from the point of view of Edge.

Why is there not a way in the UI to change the developer? Why not just a drop down that allows you to change the developer? In a company a developer may request access for a team, but may not always be on the team and then someone else needs the key and secret. As mentioned in Dino's comment between steps 3 and 4 the key and secret will be invalid. If one is not careful they could cause an outage in their production environment.

Shouldn't this be a native functionality within the Apigee UI? I'm confused why we'd need to go through the API route to achieve this.

5 years later and this still isn't a feature accessible through Apigee Edge?

@Jordan Greisinger,

The Display Name field is only used for displaying the developer app in the UI. But all other transactions such as making updates to a developer app, deleting a developer app, analytics etc will all require/use the "Name" of the developer app. Once you've created a developer app, you can't change/edit its "Name". If you want to change the "Name" of the developer app, but want to retain the consumer key and secret, then you can use the above instructions.

Regards,

Amar