I’m a cloud user and I’m writing code to backup products, developers, developers apps, and developer apps keys, and corresponding code to restore them.
If a developer has been deleted and I restore from backup to the same org, when the code calls the developer app keys create operation (http://docs.apigee.com/management/apis/post/organizations/{org_name}/developers/{developer_email_or_id}/apps/{app_name}/keys/create), I get the following response:
Status: 409
{
"code" : "keymanagement.service.ConsumerKeyAlreadyExists",
"message" : "ConsumerKey already exists",
"contexts" : [ ]
}
Note that the developer has been deleted so that the consumerKey (api_key) definitely no longer exists. (Clearly if the developer has not been deleted then the error also occurs). I’m running the backup and restore tests on a trial instance for testing. It comes with one user (Nikola Tesla) and one app (“weatherapp”).
In experimenting, Edge is remembering the previously used consumerKeys. This means that there is no way to restore a developer with the previously used key. So, upon accidental deletion of a developer or app, or a Cassandra problem (which we’ve had twice), that developer’s app will be off-line until a new api_key can be assigned and distributed to all clients (a significant problem for mobile apps).
Is there some way to assign a consumerKey (api_key) that was previously used to restore a developer/developer app through the Management APIS?