Hi Anney,
Unfortunately we do not offer a REST api or any other similar programmatic method for direct acquisition of MSigDB files.
However, I'll follow up with you privately with the back-end addresses you can use that should be suitable for most purposes.
-Anthony
Anthony S. Castanza, PhD
Curator, Molecular Signatures Database
Mesirov Lab, Department of Medicine
University of California, San Diego