I see below error message when i try to delete API Product in Apigee Edge,
{ "code" : "keymanagement.service.apiproduct_deletion_failed_apps_associated", "message" : "Unable to delete ApiProduct as there are one or more apps associated with it.", "contexts" : [ ] }
Although there are no apps at all associated with the products.
Solved! Go to Solution.
Issue might be happening due to some residue apps still refereeing to products.
First run rebuild index and see if that fix the issue.
—> curl -v https://api.enterprise.apigee.com/v1/o/{org_name}/rebuildindex -u {username} -H "Content-Type: application/x-www-form-urlencoded" -d "entity=DEVELOPER_APPS"
This will the orphan records associate with the product
—> POST /o/demo24/rebuildindex “entity=API_PRODUCT_APPS_LIST&id={Api_product name}”
If still not able to delete the product than we need to delete it from cassandra. “Since this is direct C* delete you need to be extra careful”.
Login to cassandra box for the org
Get the keys for the products
—> cqlsh:kms> select * from app_credentials where organization_name=‘org_name’;
Delete the row for the app_credentials
—> select * from app_credentials where key=‘key_credential’ limit 1;
use “cassandra-cli” for deletion.
—>del app_credentials['app_credentials'];
First we will delete the app_credentialall product using the above steps and delete them from C* and then we can delete the api_products either from UI or Api call.
Issue might be happening due to some residue apps still refereeing to products.
First run rebuild index and see if that fix the issue.
—> curl -v https://api.enterprise.apigee.com/v1/o/{org_name}/rebuildindex -u {username} -H "Content-Type: application/x-www-form-urlencoded" -d "entity=DEVELOPER_APPS"
This will the orphan records associate with the product
—> POST /o/demo24/rebuildindex “entity=API_PRODUCT_APPS_LIST&id={Api_product name}”
If still not able to delete the product than we need to delete it from cassandra. “Since this is direct C* delete you need to be extra careful”.
Login to cassandra box for the org
Get the keys for the products
—> cqlsh:kms> select * from app_credentials where organization_name=‘org_name’;
Delete the row for the app_credentials
—> select * from app_credentials where key=‘key_credential’ limit 1;
use “cassandra-cli” for deletion.
—>del app_credentials['app_credentials'];
First we will delete the app_credentialall product using the above steps and delete them from C* and then we can delete the api_products either from UI or Api call.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |