1. Specify the complete rest admin url or directly access the rest admin using httpsi.e <a href="https://servername/rest/admin/login" target="_blank">https://servername/rest/admin/login</a><a href="https://servername/rest/admin" target="_blank">https://servername/rest/admin</a>2. Use generateToken page to generate a token and programaticaly clear the cache using <a href="https://server/rest/admin/cache/clear?token=" target="_blank">https://server/rest/admin/cache/clear?token=</a><token>&f=pjson