Calling Google Endpoint api from a custom Domain - google-app-engine

Is it possible to call, my endpoint api (https://myapi.appspot.com/_ah/api/) from my web app hosted in another domain (i.e. www.mydomain.com)?
Thanks.

You actually can't with cloud endpoint version 1, as stated in the doc. It comes out of the box with version 2 (beta as of March 2017)
Note: version 1 of the Google Cloud Endpoints Frameworks did not support custom domains but version 2 does.
Same question on stackoverflow:
App engine endpoints API - 404 with custom domain
Deploy Google Endpoint in a custom Domain

Yes of course.
You can call your endpoints wherever you are.
You can develop an App engine backend based on Enpoints and call them from Android, IOS or another web app.
It's like Google APIs. The same way to consume them.
https://developers.google.com/appengine/docs/python/endpoints/

Related

Clarification on Google App Engine Standard Environment Service to Service Authentication with Cloud Endpoints

Related questions:
How to do authentication check in Python library from Google Cloud Endpoints on GAE standard
How to check service-to-service authentication in Google Cloud Endpoints?
I have an App Engine Standard (Python) environment (using webapp2) that will be making calls to a Cloud Endpoint (no user authentication required, but the calls must be service-to-service secured) and I would like some clarification on how to do this using the Cloud Endpoint Framework for App Engine Standard.
If I go about the method described in (2) above, does this mean I would have to manual edit the openapi.json file that is generated from lib/endpoints/endpointscfg.py get_openapi_spect with the security definitions? The documentation seemed geared more towards GCE and App Engine Flex environments that are using the Cloud Endpoints for OpenApi so it was confusing whether I had to edit my #endpoints.api configurations.
Or, given that I am making a call from App Engine Standard environment, would I just be able to use urlfetch and AppIdentity: https://cloud.google.com/appengine/docs/standard/python/appidentity/ and assert identity to the endpoint? If so, what would the configurations look like?

Is Google App Engine using Documents List API?

I received notifications from google what is about closed any API services.
http://googleappsupdates.blogspot.jp/2015/03/final-reminder-deprecated-google-apps.html
But I don't know that Google App Engine has target APIs. And I'm using package of 'com.google.appengine.api.files'.
I would like to know this...
Is the 'com.google.appengine.api.files' package closed target?
Is this what you are using?
Google App Engine Java API
That page does state:
This api has been deprecated in favor of the App Engine GCS client.
You need to switch to this:
Interface GcsService
Also see:
Google Cloud Service Client
As far as a "sunset" target date, I couldn't find anything.

Google PubSub: SSL error when subscribing using an AppEngine push endpoint

I created a topic which I subscribe to using a push endpoint. The endpoint is a simple AppEngine web service. The Google PubSub documentation states that endpoints must be secured by HTTPS.
I am not receiving any traffic to the push endpoint. The AppEngine web service shows no requests. I've verified through the Google PubSub dashboard that messages are being published on the topic successfully. The dashboard shows unreachable_ssl_error for push subscriptions. Why is Google PubSub reporting this error?
When I try to access the SSL AppEngine endpoint via a browser I receive an SSL cert error also. Is this normal for AppEngine sites?
As documented at https://cloud.google.com/appengine/kb/general#https , SSL is supported on App Engine, but in a somewhat peculiar way.
Specifically, and I quote...:
Note: After April 2013 Google does not issue SSL certificates for
double-wildcard domains hosted at appspot.com (i.e. *.*.appspot.com).
If you rely on such URLs for HTTPS access to your application, change
any application logic to use "-dot-" instead of ".". For example, to
access version v1 of application myapp use
https://v1-dot-myapp.appspot.com.
Also look at the previous paragraph at this same URL about the need for secure in app.yaml and a link to language-specific instructions on exactly how to configure things, e.g https://cloud.google.com/appengine/docs/python/config/appconfig#Python_app_yaml_Secure_URLs if you're programming in Python.

how can I use google app engine with an application in phonegap

I have been developing a Phonegap client application, I need to create a web service that storage all the data that i will be sending through the app.
I want to use google app engine to create the database and the web service.
I have read a lot, but i don't find a concrete example of how to do it and how to call the web service then from the application with phonegap.
Anyone have an example of how to do this?
You can use Cloud Endpoints with your app:
Google Cloud Endpoints consists of tools, libraries and capabilities
that allow you to generate APIs and client libraries from an App
Engine application, referred to as an API backend, to simplify client
access to data from other applications. Endpoints makes it easier to
create a web backend for web clients and mobile clients such as
Android or Apple's iOS.
For mobile developers, Endpoints provides a simple way to develop a
shared web backend and also provides critical infrastructures, such as
OAuth 2.0 authentication, eliminating a great deal of work that would
otherwise be needed. Furthermore, because the API backend is an App
Engine app, the mobile developer can use all of the services and
features available in App Engine, such as Datastore, Google Cloud
Storage, Mail, Url Fetch, Task Queues, and so forth. And finally, by
using App Engine for the backend, developers are freed from system
admin work, load balancing, scaling, and server maintenance.
It is possible to create mobile clients for App Engine backends
without Endpoints. However, using Endpoints makes this process easier
because it frees you from having to write wrappers to handle
communication with App Engine. The client libraries generated by
Endpoints allow you to simply make direct API calls.
Available in Python | Java
we have done similar thing for our Cordova/ionic based application. Its very simple and straight forward using javascript client of google cloud endpoint.

Google App Engine Backends not associated to any Frontend

I'm developing a Java app in GAE, which offers an API through Google Cloud Endpoints.
Basically it receives requests in the endpoints and uses a number of web services from different providers, stores some data and returns some data through the endpoints...
I understand that my app is conceptually a backend, because it doesn't provide any web page, but only the endpoints, don't you think so?
But there's no way to create only a backend, without being associated to any frontend app, is there? At least Google Plugin for Eclipse only allow you to "Generate App Engine Backend", from an existing app, and moreover this app must be an Android project...
I'm using it as a frontend and there's no problem, but apart from the conceptual issue, I've read that backends are kind of optimized to be backends, with more memory and CPU...
I think you're just confused because the Cloud Endpoints documentation uses the word 'backend' to refer to the entire cloud-hosted server implementation. It doesn't specifically refer to the use of GAE backend instances. Endpoint requests can be served by frontend or backend instances, based on how you set them up and the url being accessed.
From the App Ending docs:
"When an application is called to serve a web request, it must issue a response within 60 seconds"
"App Engine Backends are instances of your application that are exempt from request deadlines and have access to more memory (up to 1GB) and CPU (up to 4.8GHz) than normal instances."
So unless you're requests are doing something crazy, you don't need to use a backend. In the google-plugin-for-eclipse, "generate appengine backend" is talking about creating a backend for your android app... a server for your android app to contact (in this case your android app is the frontend and you're appengine app is the backend). In the example app you can remove the web side (index.html) to the appengine application and you'll have no web frontend. Index.html is using the gapi javascript library to make endpoints calls to your appengine service.

Resources