NinjaOne api/v2 trying to get any item error 400 bad request "Missing required header"

Hello, Greetings

I am new here (and with the api topic), now looking for some help if possible.

Trying to connect and query NinjaOne api get error “Missing required header”

Any advise about how to troubleshoot ?

PD: I am using the same credentials with Grafana using oauth 2.0 and can connect correctly to the api.

Thanks in advanced.

Antonio.

Looping in @danny-dainton as suggested in the popup

Hey @ascuotto70 :waving_hand:

Welcome to the Postman Community! :postman:

I’m not familiar with that API, do you have some documentation that you are following that we could take a look at, please?

Are there any mentions of a specific set of request headers that the endpoint requires?

Hey @danny-dainton , Thanks for your quick reply.

I am not sure if this kind of documentation (link below) could be useful? (to me, because I am newbie with api, is not) I was looking for a more guided doc. I will ping them too.

NinjaOne Public API

Thanks again!

Which endpoint were you trying to hit, that was returning the request header issue?

I took one of the examples and added this to Postman:

Were you seeing an output like this one?


I suspect it’s related to me not including any Auth details, the endpoint would need these details to authenticate the user of the API.

I was setting the connection like this (image), and yes same error. I sent same question to NinjaOne Api guys.

just to add about the connection I am using for data source Infinity with Grafana with same (I almost sure are the same parameters) and can get data thru Ninja Api.

SOLVED: I just changed this parameter and now it works fine (actually I don’t know what I did :frowning: )

If you could add something on top of that, would be very welcomed.

THanks a lot for the support.

Antonio.

That’s strange :thinking:

The Request Headers option is the default selection when opening a new request tab and using that Auth helper.

Glad to see you have it all working! :trophy:

1 Like

Thanks a lot @danny-dainton .

Maybe I changed the default value without noticing it.

1 Like