Question

Using HTTPCaller on API but connections persist after translation is complete

  • 23 February 2021
  • 4 replies
  • 10 views

Badge +1

I am using the HTTPCaller to GET information about a record in a CMMS. I then update values using data from GIS and use another HTTPCaller to SYNC the data back to the CMMS. The GET connection successfully closes. The SYNC connection successfully updates the data in the CMMS but the connection to do so is persisting for hours. I am not sure if this is an issue with the way I configured the HTTPCaller or with the CMMS API.

I see in the documentation for the HTTPCaller transformer that there is a way to save cookies and use that to terminate a session. I am not sure how to do that. Any help would be much appreciated.

Is there a way to see examples of the below workflow described in the documentation?

  1. An HTTPCaller transformer is used to log in to the web service and a session cookie is saved.
  2. A second HTTPCaller transformer is used to access the web service, utilizing the saved session cookie.
  3. A third HTTPCaller is used to log out of the web service, which invalidates the saved cookie.

 

How do I "log out" of a web service?


4 replies

Userlevel 4
Badge +30

Hi @lopes8​ 

Could you share us the Workspace?

 

Thanks in Advance,

 

Danilo

 

 

 

Badge +1

Hi @lopes8​ 

Could you share us the Workspace?

 

Thanks in Advance,

 

Danilo

 

 

 

Thank you for the response @danilo_fme​ 

I am afraid I cannot share the workspace itself because of security.

I use one HTTPCaller to get information about an asset, another to POST sync xml and that is it. I am thinking what is needed is a third HTTPCaller to close the session but I am not sure how to do that.

 

Userlevel 5
Badge +29

To me, what you're describing is the POST call remaining open until either the server or client reaches its timeout limit and then forcibly closes. This problem isn't to do with logging into a service. This suggests that either the upload payload is invalid/incorrect/incomplete or the API is not handling requests properly.

 

Have you tried the same workflow in Postman?

 

Can you share the name of the CMMS you're using (or a link to the API documentation) and the name of the end point you're hitting?

Userlevel 3
Badge +18

I think the process is like this:

Login to get cookie or authentication, Do an API request, Do a logout request.

 

An API I am working with requires a DELETE request on the \\project\\1\\lock url to delete the lock on the project so others can access the data. This is to prevent multiple users changing the same data.

 

As long as all your HTTP requests are in one workbench and all the HTTPCallers have the 'save cookie' parameter to true, all HTTPCallers should use the same cookie and be able to talk to the API endpoint. If you restart the workbench all cookies are thrown away.

Reply