Hi, I have deployed 2 api to different services in same google cloud 
project.

one is echo api which is default service.
https://echo-api-dot-weneepl-appbuilder.appspot.com/_ah/api/discovery/v1/apis/echo/v1/rest
 

the other is echo2 api with echo2-api service name
https://echo2-api-dot-weneepl-appbuilder.appspot.com/_ah/api/discovery/v1/apis/echo2/v1/rest

and here is my html source to call echo2-api from javascript. See this 
link https://storage.googleapis.com/wnptempstorage/test.html 

<html>
 <head>
   <script src="https://apis.google.com/js/api.js";></script>
   <script>
     function start() {
       // Initializes the client with the API key and the Translate API.
       gapi.client.init({
         'discoveryDocs': 
['https://echo2-api-dot-weneepl-appbuilder.appspot.com/_ah/api/discovery/v1/apis/echo2/v1/rest']
       }).then(function() {
         // Executes an API request, and returns a Promise.
         // The method name `language.translations.list` comes from the API 
discovery.
         console.log(gapi.client);
         gapi.client.echo2.echo('hello world').execute((resp) => {
             console.log(resp);
         });
       });
     };

      // Loads the JavaScript client library and invokes `start` afterwards.
     gapi.load('client', start);
   </script>
 </head>
 <body>
   <div id="results"></div>
 </body>
</html>


Problem is that it requests url without service specified for echo2-api and 
the result is 404 not found.
https://weneepl-appbuilder.appspot.com/_ah/api/echo2/v1/echo?alt=json

Did I make a mistake to call echo2-api from javascript? 


FYI,
echo1
app.yaml : https://storage.googleapis.com/wnptempstorage/echo/app.yaml
echov1openapi.json : 
https://storage.googleapis.com/wnptempstorage/echo/echov1openapi.json

echo2
app.yaml: https://storage.googleapis.com/wnptempstorage/echo2/app.yaml
echo2v1openapi.json : 
https://storage.googleapis.com/wnptempstorage/echo2/echo2v1openapi.json


Thank you in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/48adb6b4-3388-49dd-a4e5-73c1342037e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine]... Ki Sung Bae

Reply via email to