How to get/pass web https session from Activity HTTP Request

web

#1

I am trying to doing some web API testing using Activity HTTP Request. The issue I don’t know how to get/pass the session from the login API. I need to do this because all the coming API test require session from login API.
Would appreciate any hint or suggestion.


#2

Can you please elaborate your question. @chaosseed

What do you mean a ‘Session’?


#3

I’m doing REST API testing and I need to know how to pass the session id generated during Login API call.


#4

Please mention about your API, such as type is POST/GET, session id is param/request body,… @chaosseed


#5

But I give you some sample API call work flow,

Use HTTP Request activity,

Use body property, in the following screen shot I’ve use a json from text file.

Thanks,
Manoj Vijayakumar


#6

Thank you, Manoj. But I’m afraid this does not solve my problem. The thing is I don’t have to specific session ID explicitly. The session ID should be generated once login API call is successfully. The question now is how to extract session ID from login API call and pass it to the following API calls.


#7

Hi @chaosseed,

I think you can use DeserializeJson activity to extract a session ID from your login API response and store it into some other variable.
Then you can pass it to the other API call as a header/param/body, right.

Thanks,
Manoj Vijayakumar