Hello,
I have a PowerShell script making REST API calls to Content Server (24.3). One process involves a loop that downloads one document at a time, but may go on for a long time. Our CS setting for session expiry is 12 hours and this affects my PS script too, resulting in {"error":"SessionExpired"}.
What would be the best way to handle this limit in my PS script without changing the CS setting? Is there a way to check the expiration time left after each download? And then an easy way to refresh the token? or else redo the auth command? Or alternatively use try/catch to check if the session has expired and if so then redo the auth? or is there something else that can be used to satisfy this requirement?
Thanks,
Pascal