Intermittent 409 CONFLICT for ApigeeX management apis

Hi,

I am trying to creating app with custom key and secret using below management apis calling in sequence.

1. First creating an app 

https://apigee.googleapis.com/v1/organizations/*/developers/*/apps

2. Then deleting the existing  credentials 

https://apigee.googleapis.com/v1/{name=organizations/*/developers/*/apps/*/keys/*}

3. Updating the app with custom credentials

https://apigee.googleapis.com/v1/{name=organizations/*/developers/*/apps/*/keys/*}

Above apis called consequently mostly throws 409 conflict errors. Even keeping timeout between each api call example 5-10 sec but the 409 issue still persists.

1 4 429
4 REPLIES 4

@dino Can you provide some insights on this as we are facing the same issue?

I don't have any particular insight into why it might be failing for you.  It works for me. Here's what I tried.

create a new app ...
curl -X POST -H Content-type:application/json https://apigee.googleapis.com/v1/organizations/infinite-chain-292422/developers/therealdinochiesa@gmail.com/apps -d {
  "attributes" : [ {
     "name" : "creator",
     "value" : "provisioning script ./create-app-change-creds.sh"
    } ],
  "apiProducts": [ "AuthCode-Example-Product" ],
  "callbackUrl" : "thisisnotused://www.apigee.com",
  "name" : "create-app-change-creds-yL8vx3faBt",
  "keyExpiresIn" : "100000000"
}
==> 201

get the keys for that app...
curl -X GET https://apigee.googleapis.com/v1/organizations/infinite-chain-292422/developers/therealdinochiesa@gmail.com/apps/create-app-change-creds-yL8vx3faBt
==> 200

  consumer key: SHagKM9xmLlq7yLQVIJIvXqzuaerdUnFuLJXkGcyRifyqUgR
  consumer secret: bLZWF4aZzGUBhDbfMwSdHT3Jw1pdcPsGVSy8uVJvVdQxDX1tNR7kxlqgDAgqUzC3

delete the credential for that app...
curl -X DELETE https://apigee.googleapis.com/v1/organizations/infinite-chain-292422/developers/therealdinochiesa@gmail.com/apps/create-app-change-creds-yL8vx3faBt/keys/SHagKM9xmLlq7yLQVIJIvXqzuaerdUnFuLJXkGcyRifyqUgR
==> 200

add new credential for that app...
curl -X POST -H Content-type:application/json https://apigee.googleapis.com/v1/organizations/infinite-chain-292422/developers/therealdinochiesa@gmail.com/apps/create-app-change-creds-yL8vx3faBt/keys -d {
  "attributes" : [ {
     "name" : "creator",
     "value" : "provisioning script ./create-app-change-creds.sh"
    } ],
  "expiresInSeconds": 15552000,
  "apiProducts": [ "AuthCode-Example-Product" ],
  "consumerKey" : "BP4Myko0R2-F5OBTugHK9-Cy96JLQmT6-xb3VODZOL8",
  "consumerSecret" : "Lr4Xlb5L1f-ajvK9BaEAC-nlZzC8FoSu-7UnZlOK8jA"
}
==> 201

get the keys for that app...
curl -X GET https://apigee.googleapis.com/v1/organizations/infinite-chain-292422/developers/therealdinochiesa@gmail.com/apps/create-app-change-creds-yL8vx3faBt
==> 200
  consumer key: BP4Myko0R2-F5OBTugHK9-Cy96JLQmT6-xb3VODZOL8
  consumer secret: Lr4Xlb5L1f-ajvK9BaEAC-nlZzC8FoSu-7UnZlOK8jA

Are you using those API calls? If so, and if it still fails for you, then I suggest that you open a support case, and give the support engineer a simple script that you can use to reproduce the problem. 

I've attached the script I used to test this, here. 

seems like it is issue or limits with Apigee x eval account, as it worked fine with same script on paid one.

Ah, that is a possibility.    I don't have an evaluation account to try this out. 

Are you seeing the same 409 error on the eval account, using the script I just sent