updated Proc for Rest API