0

I have a API Gateway that calls a Cloud Function..

I want to create a config file to 3 routes:

  • ..myurl/user
  • ..myurl/client
  • ..myurl/order

My problem is that I would like to use the same Cloud Function wrote in Python to deal with each scenario since it's just a function to get the data and write in BigQuery, in the end my need is just to know if the data is from user, client or order to switch correctly the insert target load.

Today I am using 3 different cloud functions for each path in the API spec.

luisvenezian
  • 441
  • 5
  • 18
  • If I understood right..do you want to have multiple API endpoints for one Google Cloud Function? or you can explain briefly which will be helpful to troubleshoot this issue. – Divyani Yadav Jul 20 '22 at 12:44
  • Yes you're right! Also I would like to get the parameter user, order or client in the Cloud Function according to the route. – luisvenezian Jul 24 '22 at 23:34
  • can you check this [thread](https://stackoverflow.com/q/47155378/15774176) and [article](https://medium.com/google-cloud/use-multiple-paths-in-cloud-functions-python-and-flask-fc6780e560d3) is it helpful? – Divyani Yadav Jul 25 '22 at 11:03

0 Answers0