Anshul -
You set the communication to https, then the auth to user:password.
See the code for the 'apitest' utility in the source directories of the SDK - it's excellent sample code to get started with.
There's versions of it in Perl, Java, etc ...
You may also want to view the recorded API Programming webinar I did a while back for FastLane.
It can be found at: http://www.fastlaneus.com/webinars
(#4 on the list - Zephyr Application Programming Interface)
I hope this response has been helpful to you.
At your service,
Eugene E. Kashpureff, Sr.
Independent NetApp Consultant http://www.linkedin.com/in/eugenekashpureff
Senior NetApp Instructor, IT Learning Solutions http://sg.itls.asia/netapp
(P.S. I appreciate 'kudos' on any helpful posts.)