API for SGI on ruby on rails