Jump to content
Updated Privacy Statement

We only support requests in JSON format - Next-Gen API


Go to solution Solved by Chad Buser,

Recommended Posts

 

I have the API installed and it shows as running however, I keep getting these warnings when trying to authenticate,

 

POST  https://mgmt-ip/mgmt/api/nextgen/v1/login

{
  "login": {
    "username": "nsroot",
    "password": "PASSWORD"
  }
}

Warning: Unable to verify the first certificate

{"errorcode":1500,"errormessage":"We only support requests in JSON format","details":[]}

 

Has anyone played with this yet?

 

Chad

Link to comment
Share on other sites

  • Solution

For me it was two things - I was not sending the request in JSON format. It was in plain text.

And I was sending the creds in the JSON body and I still had Basic Auth selected on the Auth Tab - I set this to No Auth.

'Unable to verify the first cert' is just a warning since 'SSL Cert Verification' is off in the settings.

auth.PNG

json1.PNG

Link to comment
Share on other sites

 

{
  "login": {
    "username": "nsroot",
    "password": "password",
 
    "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json"
  }
}
}
 
200 OK
NO AUTH
Link to comment
Share on other sites

17 minutes ago, Chad Buser said:

 

{
  "login": {
    "username": "nsroot",
    "password": "password",
 
    "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json"
  }
}
}
 
200 OK
NO AUTH

It did not work for me when specifying the CT and Accept headers only in the json body. 


sxYlqpHvtcK1ezxrAhQiM1vHWmNcJsbo_gUZiJry6gQGC82ZaOi-P1a52bq1dsGJahpDN6Q9ywcK67949Tl1u6XDgsBBu4HQSLdr6aa60sXufRK4VIdGOZdhjYDSR1dkmAzlV2WpOcr3-XIThtQSEN4


sN1XrLNw3j4WSzYU6adLGQg2Dr3StK40-wF9DVwKQh8-9q5_KILZNaRyZOJ1INMg-kAdvNBglnbJYFdJr8WrVJkAtXPRMg48tXvRHHkyEjO_Mpm-ImI0r0GizyPV7mvzJ1kVVQQiSEDmolGvOx4BGfQ

 

"We only support requests in JSON format" Error code 1500 = missing Content-Type: application/json

"We only support sending responses in JSON format" Error code 1300 = missing Accept: application/json

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...