Campus Switching and Routing

Reply
New Contributor

2930M 16.04 - Unable to Login via REST API

I'm beginning to work with the REST API on the 2930M switch, and while I've been able to successfully run GET requests against the switch (provided no operator account is created), I'm not having any luck posting a login request in order to receive a cookie for further POST commands.

 

I've attempted to log into a lab switch via Postman and cURL directly from my desktop, but I keep receiving an "Invalid Request" response when I attempt to log in using local manager credentials that I've set up. I'm trying to follow along with the following tutorial video - "Python and REST APIs 3 - POST Data" .

 

Has anyone else run into this issue? Any suggestions on what I need to be changing to allow this to work? I've already confirmed that aaa authentication is enabled and set to local for web login and enable access. Below is an example of the request I'm making in Postman

postman.PNG

New Contributor

Re: 2930M 16.04 - Unable to Login via REST API

From the screenshot I see " missing after userName?

{"userName" : "restapi","password" : "test"}

 

 

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: