Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Unable to delete the apigee organization using the api

del
Bronze 1
Bronze 1

Unable to delete the apigee organization using the api: *I do have all the permissions and was able to do this before*

DELETE: 

https://us-apigee.googleapis.com/v1/organizations/sandbox-corp-igtwy-gpoc-70ae?retention=MINIMUM

Response:

{

"error": {

"code": 403,

"message": "Permission denied on resource 

\"organizations/sandbox-corp-igtwy-gpoc-70ae\" (or it may not exist)",

 

"status": "PERMISSION_DENIED"

}

 

}

 

 

I am also unable to get the organization, nor see the apigee UI in the 

project :

GET 

https://us-apigee.googleapis.com/v1/organizations/sandbox-corp-igtwy-gpoc-70ae

 

 

{

 

"error": {

 

"code": 403,

 

"message": "Permission denied on resource 

\"organizations/sandbox-corp-igtwy-gpoc-70ae\" (or it may not exist)",

 

"status": "PERMISSION_DENIED"

 

}

 

}

 

0 2 150
2 REPLIES 2

Hello @del 

To delete an Apigee organization using the API, follow these steps:

Step 1: Verify Permissions

Ensure that you have the necessary permissions to delete an organization. Typically, you need to be an administrator or have equivalent permissions.

Step 2: Authenticate

Authenticate with the Apigee API using OAuth 2.0. You need a valid access token to make API requests.

  • Use a tool like curl or Postman to obtain an access token.
  • Ensure your credentials (client ID, client secret) are correct.

Step 3: Send Delete Request

Make a DELETE request to the Apigee API endpoint for deleting an organization. The endpoint typically looks like this:

DELETE https://apigee.googleapis.com/v1/organizations/{org_name}

Replace {org_name} with the name of the organization you want to delete.

Step 4: Handle Response

Check the response from the API:

  • Success: If the organization is deleted successfully, you should receive a confirmation response.
  • Error: If there is an error, check the error message for details. Common issues include insufficient permissions or incorrect organization name.

Step 5: Verify Deletion

After receiving a successful response, verify that the organization has been deleted by attempting to list organizations or accessing the organization directly.

 

Hi @del, thanks for bringing your question to the Apigee forum! And @learn2skills, thank you for the well-structured reply.

@del, if the reply provided solves your issue, please mark it as accepted to help others easily identify it in the future. We look forward to seeing you both in future forum discussions, and don't forget to check out the upcoming Apigee articles 😊