cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
99
Views
0
Helpful
0
Replies

vManage API GET Request Authentication Failures

michaelshirazi
Beginner
Beginner

Hello,

I am having an issue where none of my vManage GET requests are working. 

This is how I am authenticating:

 

curl --location -g -k -i --request POST 'https://{IP}/j_security_check' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'j_username=Myusername' \
--data-urlencode 'j_password=MyPassword'

 

This is the header response I am getting:

 

HTTP/1.1 200 OK
set-cookie: JSESSIONID=r9814df98g18d9wIOHhCbS5Q7y_jU.b501fb51-djfg90-90gdf4; path=/; secure; HttpOnly
x-xss-protection: 1; mode=block
pragma: no-cache
x-frame-options: DENY
date: Wed, 14 Sep 2022 20:12:54 GMT
vary: Accept-Encoding
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
content-length: 0
server: svcproxy

 

Ok so far everything looks good right? Now here is when I try running a GET request:

 

curl --location -g -k --request GET 'https://{ip}/dataservice/template/policy/vedge/devices' --header 'Content-Type: application/json' --header 'Cookie: JSESSIONID=r9814df98g18d9wIOHhCbS5Q7y_jU.b501fb51-djfg90-90gdf4'

 

And finally, here is a small snippet of the failed auth response that I get:

 

                <!-- show the notice message here -->
            </div>
            <div id="error-info-container">
                <div id="error-info">
                    <div id="errorInfoIcon" name="errorInfoIcon" class="errorInfoIcon">
                        <img src="/images/error.svg" alt="Login Error">
                    </div>
                    <div id="errorInfoText">
                  

 

 

As you can see, I'm getting Login Errors, despite having the session ID added to my GET request headers. Anyone know what I'm doing wrong? I've tried ALOT of different iterations of this and can't get anything to work.

Thanks

 

0 Replies 0
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: