Google doc as rest api using Apps Script : xml

Summarized steps

  • create google doc
  • add content as xml
  • add an app script from tools
  • copy and paste my code
  • deploy

Create google doc

  • header with value : Welcome
  • footer with value: made by JRichard

Add an app script

Deploy

  • Save the script
  • Scrip needs authorizations. To prompt them, click on “run” option and select testDoGetFindAll function. Accept the requested permissions.
  • Go to view >> logs and review the success response
  • If there is another response with error. Review the previous steps. If response is success, continue the steps!
  • Click “Publish” in the Google Apps Script Menu
  • Select “Deploy as web app”
  • In Project version, select new
  • In Who has access to the app select Anyone, even anonymous.
  • Click on deploy or update
  • An url will prompt you something like:
  • Save it, this is the url of you new rest api!!

FindAll Test

  • token = miaouhhh
  • operation = findAll

FindById Test

  • token = miaouhhh
  • operation = findById
  • id = header

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
JRichardsz.java

JRichardsz.java

Programmer born in vulcan who searches without fatigue for his internal properties file to perform an overclock in his brain and body. https://stackoverflow.com