Table of Contents

Update Origin Server Address

Rama Sadhu Updated by Rama Sadhu

This topic helps to add multiple Origin IP addresses through API call.  

There are two steps involved in the process. 

Step 1: Authentication 

To use Update Server Address API, customers have to complete the authentication through Login API method. 

HTTP Method: Post 

Endpoint: https://tas.apptrana.com/wafportal/rest/loginService/login 

Headers 

Content-Type: application/json 

Possible Responses:

200- Success 

Sample Request:

{
"userId": "Customer user ID",
"password": "Customer password"
}

Sample Response:

{
"eulaAccepted": true,
"pciUser": false,
"performanceTabEnabled": false,
"customerWebsitesMap": {
"9360": "portal.apptrana.com",
"9361": "monior.indusface.com",
"11105": "tas.indusface.com",
"13778": "alpha.apptrana.com",
"9362": "was.indusface.com",
"14930": "consultancy.was.indusface.com",
"14116": "siem.apptrana.com",
"16759": "csp-report.apptrana.com",
"13498": "tas.apptrana.com",
"12": "www.indusface.com",
"9662": "docs.indusface.com",
"16063": "saas-tata-cdn.apptrana.com"
},
"customerGroupsMap": {
"16": "Public Sites",
"17": "Portal sites",
"274": "group",
"51": "Testing Group",
"275": "Group A",
"153": "test 1"
},
"logLevelMap": {
"5": "Priority - All",
"4": "Priority - Low",
"3": "Priority - Medium",
"2": "Priority - High",
"1": "Priority - Critical"
},
"csrfToken": "D0$Matluo2m4b874PSsTan2UY4I7yFup",
"restrictedAdmin": false,
"superUser": false,
"loggedInUser": {
"id": 22521,
"customerId": 2,
"longCustomerId": "p1jmuscbm35eml110jkn0ecq4o",
"displayName": "Rama",
"lastLogin": "Dec 10, 9:49 PM +0530",
"timeZone": "IST",
"customers": [
{
"name": "indusface",
"id": "2",
"longId": "p1jmuscbm35eml110jkn0ecq4o"
}
],
"superUser": false,
"apptrana": true,
"multipleCustomer": false,
"loginId": "ramadevi",
"bitmapFlag": 0,
"onboardingWizardFlag": false
},
"showCaptcha": false,
"halfHourTzOffset": 11,
"expiryStatusShow": false,
"customerAdmin": true,
"internalUser": true
}

From the response, locate the website ID corresponding to the website for which you wish to update the origin server address.

Step 2:  Update Origin Server Addresses

Once authentication is completed successfully, customers can use this API to update the IP addresses for a specific website. 

HTTP Method: POST 

Endpoint: https://tas.apptrana.com/wafportal/rest/settingService/changeRoutingIP

Header Parameters 

Content-Type: application/json  

Possible Responses: 

200- Success 

500- Server Error

Sample Request:

{ 

"websiteId": 7417,

"ipWeightageMap": {

"13.126.24.92": 20,

"1.1.1.1": 60,

"1.2.1.1": 20

}

}

Add all the list of IPs in the pay load/ body field and run the APIs. Once the APIs are added, success response will be coming.

Sample Response: 

{"successMessage":"Routing IP Changed Successfully."} 

Make sure the combined weightage of all IPs equals 100 and does not exceed this value. If the total weightage exceeds 100, an error will be returned with response code 500.

Sample Error Response :

{"errorMessages":["Total weightage of routing IPs should be 100."]}

How did we do?

SwyftComply for API Scan

WAF Automated Bypass and Unbypass

Contact

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