Get html code of an BIG-IP page through curl/code

Hello Folks

Greetings I am looking for info on how i can get/access html content of an BIG-IP page using curl or code. When i tried to access in curl using it shows http code 302 (Redirection error for login). Is there way to pass auth info in the request when trying to access page.

In browser, when i am logged in i can access below page content, but i would to do it through curl or code. In browser, ui session seems to be passing these cookie info (BIGIPAuthCookie=sdfsdfsd; BIGIPAuthUsernameCookie=admin), but not sure how to create this through code.

shell curl -k -u admin:admin https://10.xxx.xxx.xx/sam/admin/vpe2/public/php/supportTable.php

here</p>

Thanks

What is your goal? why do you need the code on a page?

What is your goal? why do you need the code on a page?

Goal is to get/scrape the data (as this data is not exposed through API currently) from this page fully within java code, without manual intervention. Parsed data from this page is used some where else.

Dont have much experience with cookies, even if i capture the login request from BIG-IP UI as curl command in dev tools in chrome, curl command fails in shell.

Goal is to get/scrape the data (as this data is not exposed through API currently) from this page fully within java code, without manual intervention. Parsed data from this page is used some where else.

Dont have much experience with cookies, even if i capture the login request from BIG-IP UI as curl command in dev tools in chrome, curl command fails in shell.

If your goal is to log into the big-ip, your method might be a little more difficult than just using an iControl Token.

 

Take a look here Demystifying iControl REST Part 6: Token-Based Authentication - F5 Technical Articles - DevCentral - An F5 Technical Community

 

You can pass the token generated (as long as you save it) in your curl.

 

What is the goal of collecting the html?

 

Thanks. I haven’t tried this, I doubt rest token will work with BIG-IP UI. I am dev, I need the scrape the html content, to use this information some where else.

i doubt you can create those, the big-ip will send you them after successful auth.

i would look into curl examples where you login to a website first and try to duplicate that for the big-ip. it might be you will have to use a scripting language.