Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

API call not working on F5

loveen_355250
Nimbostratus
Nimbostratus

API call not working as per suggested reference neither for virtual-address,pool,node, i tried changing all options but no success , can you let me whats wrong, the auth credentials i am using i am able to login to tmsh and tmos both

 

https://devcentral.f5.com/wiki/iControlREST.APIRef_tm_ltm_virtual-address.ashx

 

import requests import json requests.packages.urllib3.disable_warnings() b = requests.session() b.auth = ('XXXXXX', 'XXXXXXX') b.verify = False b.headers.update({'Content-Type':'application/json'}) print b.get('https://10.242.2.133/mgmt/tm/ltm/virtual-address') print b.get('https://10.242.2.133/mgmt/tm/ltm/pool') print b.get('https://10.242.2.133/mgmt/tm/ltm/node')

 

 

3 REPLIES 3

loveen_355250
Nimbostratus
Nimbostratus

0691T000006AqEAQA0.png

 

i have attached one virtual server address for which i tried api call and that too is unsuccessfull

 

print b.get('https://10.242.2.133/mgmt/tm/ltm/virtual-address/~vip-4ddev.ihs.com')

 

print b.get('https://10.242.2.133/mgmt/tm/ltm/virtual-address/~vip-4ddev.ihs.com~')

 

 

 

tatmotiv
Cirrus
Cirrus

Error 401 means authentication error. Have you tried access using the 'admin' account? Double-checked your password? Which tmos version are you running?

 

Hi I am getting an issue .....one of API hosted on a server is not responding from that server instead it is being redirecting to another server. What could be the issue. How to check .