Mashery V3 API call to expire cache

Mashery V3 API call to expire cache

book

Article ID: KB0074606

calendar_today

Updated On:

Products Versions
TIBCO Cloud API Management -

Description

Below call can be used to expire cache in Mashery. 
 

curl -k -H 'Host: api3.mashery.com' -H 'Content-Type: application/json' -d '{ "method": "service.expireCacheObject", "params": ["<Service Key>", "http:\/\/test.api.mashery.com\/test?api_key=<API KEY>",["GET"]], "id": 1 }' 'https://test.api.mashery.com/v3/json-rpc/areaid?apikey=<API Key for Mashery V3>sig='$(php -r 'echo md5("<API Key for Mashery V3>"."<API Secret for Mashery V3>".time());')

The host header api3.mashery.com needs to remain the same. The API key and secret are the ones generated for Mashery APIs. The payload should consist of the URL that needs to be expired. In the above example modify the payload accordingly.

Issue/Introduction

This article provides the Mashery API call that can be used to expire cache.