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

Get all Cache List and delete cache from url in Apigee Edge

We are generating cache using Populate cache and LookUp cache only with particular timeout.
Now we need list of cache and  delete cache hit in the environment without using any policy/Invalidate cache in the proxy.
I got some details to fetch cache details using URL provided by Apigee:

Reference - 

https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.caches...

https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.caches...

GET Call
https://apigee.googleapis.com/v1/{parent=organizations/*/environments/*}/caches

organizations/{organizationId}/environments/{environmentId}

DELETE Call
https://apigee.googleapis.com/v1/{name=organizations/*/environments/*/caches/*}

To access above urls first we have to call auth api provided in the document. But i am not getting token. How can we get token to call API?

Garima96_0-1738217235891.png


And for calling the url
organizations/{organizationId}/environments/{environmentId}
We need organizationId & environmentId . How can i get these values in the apigee edge?

And we don't use any cache key so below is not working also from UI.

In the Admin > Environments > Cache

Our requirement to get all cache list and needs to delete cache when we require , but we don't want to delete cache from any policy or code.

https://apidocs.apigee.com/docs/caches/1/routes/organizations/%7Borg_name%7D/environments/%7Benv_nam...

0 3 255
3 REPLIES 3

Hi @Garima96, just wanted to acknowledge your question—still no responses yet, but we’ll make sure it gets noticed and invite others to help out.

Thanks for contributing to the community!

Hello,

A couple of items on the above:

1. As you are utilizing Apigee Edge, the proper API set is documented here: https://apidocs.apigee.com/docs/caches/1/overview - the documentation you linked is pointing to Apigee X, which is an updated version of the Apigee instance/runtime

2. API authentication/authorization (as you can see from the try it functionality linked above) can either be a base64 encoded string of your username/password (not recommended), an OAuth token, or some sort of SAML/LDAP credential set, which is documented and can be followed along here: https://docs.apigee.com/api-platform/system-administration/management-api-overview

3. You can find out more as per where organization/environment information can be found in the documentation here: https://docs.apigee.com/api-platform/fundamentals/apigee-edge-organization-structure - as your organization name is in your Apigee UI URL, and your environment will either be test or prod

Thanks!

Hey @Garima96, just checking in! I see you got a response—hope it helps! Let us know if you need any further clarification 🙂

And big thanks to @hartmann for jumping in and sharing insights!

Looking forward to your update!