Changes to allow RestAPI calls to Ajax code

Changes to allow RestAPI calls to Ajax code