Calling fab man api from java query


#1

Hi I have to get equipment data using fabman api from java script /JQuery/Angular.
Can you guys please help me how to call the api and what are headers need to pass,how to pass the auhtentication?
Please help me out…really will be great ful
Searched it in google…did it get any where :cry:


#2

Hi,

Have you read the API documentation?

There are no special headers you need to pass. Every request is simply a HTTP GET (or POST, PUT, DELETE) call to any of the endpoints.

But: You can’t call the Fabman API directly in the browser while on another domain – that’s forbidden by our CORS rules to prevent XSS attacks. (Apart from that, it would expose your credentials like API keys to the visitors of your site.)

In general, you’ll do the API request from your server and serve the result to your users from there.