REST Call to login to OpenClinica

I am using curl to run some tests to Login and do some test automation on studies, i am not able to login and get exact header, url and body that i need to use. can someone give me a sample of how i can login. I looked at documentation but i am not able to figure out from that.

Comments

you need two requests to perform RESTfull URL call to OC. First is the post request in order to trigger login mechanism of spring security, which will open a session (with cookie) for you. And the second is get request to specific RESTfull endpoint. The second request need to reuse the session that was created by first request. With curl you simple store cookie in extra file and reuse it during second request. Here is an example: