One Star akm
One Star

Session persist in REST Client

Hi I am trying to understand if the tRestClient is capable of storing authentication/authorization info by persisting the HTTP session. For example if REST URL requires Basic Authentication, then the first call would use the Id/Pwd and subsequent calls would use session cookies to authorize with the server until there is a session timeout or some interruption. An example use case is supposing there are 500,000 rows to be copied using REST and the system would allow only 100 or less records in each call then the query needs to be submitted repeatedly in a loop changing the Query strings. It would be very efficient if the client could persist the HTTP session across the REST calls. Does anyone know if this is implemented in the component. 



  • Data Integration
Community Manager

Re: Session persist in REST Client



I've built something similar, it uses context variables (single thread) but you could also use global map for thread safety... as a way of storing the session key.


Just spitballing in terms of job design...

Depending on the logic you might need to add more but you can iterate through the loop and on the error condition where the result is an expired key you could just add the login path and reset the context variable.