Multi-requests HTTP Synthetic monitor with authentication

We need to monitor an API with a following workflow-

1. Login - POST with body containing credentials and other auth data

2. API method call - GET

3. Logout - POST without a body

I can create chained HTTP requests but API uses cookie authentication and I cannot find a way to set a cookie header to consequent requests after successful login.

Is it possible at all to implement this scenario ?

Any hints appreciated,

Thanks

@olegus, You should be able to do it with Javascript. Some examples for insipration :wink:

https://community.dynatrace.com/t5/Troubleshooting/Sample-Post-Execution-script-JavaScript-Code-to-retrieve-the-Set/ta-p/209465

https://community.dynatrace.com/t5/Synthetic-Monitoring/Capture-cookie-value-in-synthetic-script-step-to-set-in/m-p/169904