Forum Discussion

Maneesh_72711's avatar
Maneesh_72711
Icon for Cirrostratus rankCirrostratus
Oct 04, 2018

Issue in making API calls to F5 LTM/GTM.

I am having issues in making API calls to F5 running ver12.1.2. Attached is the screenshot of the Authorization Failed error.

 

Can someone help, there are other F5's running same version 12.1.2 which can Authorize fine.

 

6 Replies

  • I can't see any attachment, please could you describe the error you are experiencing.

     

  • How are you providing authorisation?

    Can you try the following (replace admin admin with your credentials)

    curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
        "username":"admin",
        "password":"admin",
        "loginProviderName": "tmos"
    }' "https://your-bigip.com/mgmt/shared/authn/login"
    
  •  

    Making this api call..

     

    and access is controlled via cyberark for which a user has been already provisioned via AD.

     

  • If you haven't already authorised, you'll need to obtain the auth token and use the token in the X-F5-Auth-Token header in all subsequent requests. You could also use HTTP Basic auth an include the username and password in each requsts, but this isn't recommented

    cURL example using X-F5-Auth-Token

    curl -X GET -H "Content-Type: application/json" -H "X-F5-Auth-Token: QWERTYUIOPASDFGHJKL" -H "Cache-Control: no-cache" "https://f5-ip-address/mgmt/tm/sys/connection?options=all-properties&ver=13.1.0.4"