Update Origin Server Address through API Call
This topic helps to add multiple Origin IP addresses through API call.
There are two steps involved in the process.
Step 1: Authentication
To access this API, customers must authenticate using the Token-Based Authentication method.
Click here to learn about the authentication process through login API.
Step 2: Update Origin Server Addresses
Once authentication is completed successfully, customers can use the below API along with the bearer token in the Authorization header to update the IP addresses for a specific website.
HTTP Method: POST
Endpoint: https://tas.indusface.com/wafportal/rest/settingService/changeRoutingIP
Header Parameters
Content-Type: application/json
Possible Responses:
200- Success
500- Server Error
Sample Request:
{
"websiteId": 747,
"ipWeightageMap": {
"13.126.24.92": 20,
"1.1.1.1": 60,
"1.2.1.1": 20
}
} Add all the IP addresses to the request body (payload) and run the API. Once the IPs are added successfully, you will receive a success response.
Sample Response:
{"successMessage":"Routing IP Changed Successfully."} Make sure the combined weight of all IPs totals exactly 100 and does not exceed it. If the total weight is more than 100, the API will return an error with a 500 response code.
Sample Error Response :
{"errorMessages":["Total weightage of routing IPs should be 100."]}