Table of Contents

API Request to Purge CDN Data

Rama Sadhu Updated by Rama Sadhu

The following document will give the API details of the CDN purge request. 

Purpose 

The purge API helps the users automatically delete the obsolete/cached data which is present in the CDN. 

API Details 

  1. Authorization Request 
  • API authorization is done by OAuth 2.0. 
  • Get the API ID and Key values from the AppTrana portal.

  • For authentication, enter the API ID in the Client ID and Key in the Client Secret fields. 
  • After the successful authentication, an access token will be generated by the server and is valid for 24 hours. The user must use the same token for all subsequent requests. 
In a website, with one API ID and Key, only one authentication token will be generated and the token is valid for 24 hours. All the users of the website can use the same authentication token to access the Purge API.
To know more details about token generation and authorization, follow the link: https://docs.indusface.com/product-user-guide-apptrana/connect-your-siem-to-app-trana#authorization_code
  1. Purge Request 

Method 

POST 

Endpoint 

https://stagingtas.indusface.com/wafportal/rest/siem/v1/cdn/requestPurge 

Request Headers 

“Content-Type”:” application/json” 

Parameters: 

PurgeUrl  

A Url/endpoint for which purge is required 

websiteName 

Name of the website 

Example Request and Response: 

Purge All: To purge all the endpoints of a website, use ‘*’ symbol after the top-level domain. 

(or)

Purge All: To purge all the endpoints of a website, use “ALL” for purgeUrl field in the request body. (“purgeUrl”: “ALL”) 

Check Purge Status

Method 

POST 

Endpoint 

https://stagingtas.indusface.com/wafportal/rest/siem/v1/cdn/getPurgeStatus 

Request Headers 

“Content-Type”:” application/json” 

Parameters: 

purgeID 

An ID which is created after successful request purge operation. 

websiteName 

Name of the website 

Possible Responses
  • 200 - Success 
  • 401 - Unauthorized request 

How did we do?

API Discovery Feature

API Scan Coverage for OWASP Top 10

Contact

This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply.