Select to view content in your preferred language

Login to API then Poll

550
2
10-02-2018 08:27 AM
MattFancher1
Regular Contributor

I want to use the "Poll and External Website for JSON" connector in GeoEvent.  The API I plan to poll requires you to first authenticate. Outside of GeoEvent, I have to first post a JSON with username/password to api/export/login. The API returns raw text "true" as a response when authenticated. Next, I have to post another JSON with search parameters to api/export/export. Any advice how to implement that in GeoEvent? I'm currently running version 10.3.1. Thanks very much in advance.

0 Kudos
2 Replies
DanielCota1
Frequent Contributor

Hi Matt Fancher‌,

On the surface, GeoEvent is capable of passing credentials to authenticate against a certain endpoint. This can either be done through a GET request where the parameters for credentials/token are passed within the URL itself or through a POST where the headers for authentication are specified in one of the input connector's properties. I am unsure if there is a means to send one request, receive the response, and then send another through the connector. 

Do you have a means of accessing the endpoint you need in one fell swoop, to where you can bypass the authentication or somehow include it in a single request?

0 Kudos
MattFancher1
Regular Contributor

Hi Daniel. Sorry for the slow response. Unfortunately no, the API requires me to first authenticate, then post a separate request in order to access data.

0 Kudos