Using App Engine to Create Endpoints for Google Cloud SQL (MySQL) Database

187 views
Skip to first unread message

Syed Ali Naqi

unread,
Jul 23, 2018, 9:00:31 AM7/23/18
to Google App Engine
Hi!
I have a Google Cloud SQL MySQL Instance. In it I have a Database. I want to use that Database and create necessary (GET, POST, DELETE, UPDATE) API or Endpoints for Every Table in that Database and Deploy it on the App Engine. I do have IntelliJ IDEA And I Installed the Google Cloud SDK and Tools (for Intellij) as Well. I have read all the Documentation on Cloud App Engine and Deployed the echos-v8 sample on the AppEngine. But It didn't Work as I expected. Please If there is any one Who can guide me to what I am suppose to do To have a working API for Every table in my GC MySQL Databse, I would be very thankful to him. I am familiar with Java and Node.js but, still I am unable to do it.. I would Really Appreciate it if anyone Can Help me solve this issue. Thanks!..

Jordan (Cloud Platform Support)

unread,
Jul 23, 2018, 7:58:40 PM7/23/18
to Google App Engine
In general you would create your own App Engine endpoint APIs via Google Cloud Endpoints. Your API can have individual URL endpoints for each of your tables (or a single URL endpoint that can accept a table name; however you decide to design it). Your clients would call your APIs via URL HTTP requests, and it will run your App Engine code accordingly (passing your App Engine application whatever request body and query parameter values the client sends in their HTTP request). 

In your App Engine code you would create different functions for each endpoint (or a single function for only a single endpoint) that would use the java.sql.DriverManager to connect to your Cloud SQL instance (as shown in the documented example). You can then modify your Cloud SQL instance's tables and data directly from App Engine based on the endpoint API your client requested and the values they passed to the endpoint.

- Note that Google Groups is reserved for general product discussions. For technical support on implementing the above, it is recommended to post detailed questions to Stack Exchange using the supported Cloud tags. 

 
Reply all
Reply to author
Forward
0 new messages