FAQ Database Discussion Community


Can't connect to local gae endpoints from Genymotion emulator

java,android,google-app-engine,google-cloud-endpoints,google-cloud-platform
It's a simple helloworld project using endpoints generated from MyBean and MyEndpoint classes which come default with the Endpoints module. The emulator I use is Genymotion which I connect to through the /10.0.2.2 ip. When I access the endpoints server locally "localhost:8080" in my web browser it works just fine...

How to debug Cloudendpoints with GiTkit in the Android Emulator

android,android-emulator,google-cloud-endpoints,google-identity-toolkit
I have set up some Cloud Endpoints in Android Studio and implemented an Authenticator (com.google.api.server.spi.config.Authenticator) which gets invoked with every call to a cloud endpoint. Now I want to use my authenticator to check the login from Android with GiTkit (Google Identity Toolkit). When I debug my endpoints I can...

How to use CachedRowSet in Google App Engine?

java,google-app-engine,jdbc,resultset,google-cloud-endpoints
I am using Google App Engine (Endpoints) to generate a simple API service. I'm currently trying to make my queries to the database faster and more efficient, so I decided to double check where I was calling ResultSet and Connections and closing them. However I want to use CachedRowSet and...

Do we HAVE to generate and use client libraries to use Google App Engine's Endpoints?

ios,swift,rest,google-app-engine,google-cloud-endpoints
I am currently developing an Swift iOS app with GAE Endpoints for the RESTful API. It seems like all the tutorials and documents make you generate and use client libraries if you need to use the API on the client side. I was wondering if it's possible for me to...

How to perform custom queries in google appengine endpoints api using “endpoints-proto-datastore”?

google-app-engine,google-cloud-endpoints,endpoints-proto-datastore
Normally we do queries like this @MyModel.query_method(path='mymodels', name='mymodel.list') def MyModelList(self, query): return query But how can I perform custom queries on Endpoints model and how do I pass custom parameters other than "id, limit, order.." etc For eg : return query.filter(Student.name == somename ) How can I supply "somename" to...

Google cloud endpoints generate Java api HTTP 400 error

java,android,google-app-engine,go,google-cloud-endpoints
Hey im trying to develop a rest API by using this doc go-endpoints I can test my app locally and on the app engine . But i cant create a Java client in order to consume it on android device, for some reason I'm getting an HTTP 400 No JSON...

How to cancel Google Cloud Endpoint Endpoint request

android,google-app-engine,google-cloud-endpoints
I'm using Google Cloud Endpoint Java api backend and connected Android application in android studio. I'm making call to my backend api from the android app to check username availability. username is checked on every text change event. So when the text is updated, I want the previous request to...

endpoints-proto-datastore: return different class then the input class

python,google-app-engine,google-cloud-endpoints,endpoints-proto-datastore
I want to have an endpoint which gets a certain type of object and returns a different type of object , instead of having them the same type. for example: class SomeClass(EndpointsModel): name = ndb.StringProperty() class OtherClass(EndpointsModel): otherName = ndb.StringProperty() @SomeClass.method(path='mymodel', http_method='POST', name='mymodel.insert') def MyModelInsert(self, my_model): my_model.put() otherModel = OtherClass(otherName='someothername')...

Using dart discoveryapis_generator on webapp?

dart,google-cloud-endpoints
Can't use my model file generated with the discoveryapis_generator. It ask for a http.client to be used, but it's from dart:io, and i m trying to use it in a web app static YoupipeApi api = new YoupipeApi(new http.Client()); //cant work on webapp Failed to invoke tokenLoaded callback: Unsupported operation:...

No suitable driver found: jdbc:google:mysql

java,mysql,google-app-engine,jdbc,google-cloud-endpoints
I'm trying to figure out why my App Engine (Endpoints) program will not connect and/or load the jdbc google mysql driver. I have enabled the <use-google-connector-j> tag in appengine-web.xml and set it to TRUE as specified here. appengine-web.xml <?xml version="1.0" encoding="utf-8"?> <appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> <application>...</application> <version>1</version> <threadsafe>true</threadsafe>...

Running the API Explorer for Google Cloud Endpoints on a development server (on localhost) no longer works

python,google-app-engine,ssl,google-cloud-endpoints
I am writing a backend for an Android app in Python using Google Cloud Endpoints. When I try to run Google's API Explorer to test my API on the development server (localhost), it gives me an error about SSL: 403 Forbidden { "error": { "errors": [ { "domain": "global", "reason":...

Data transport optimization with Google cloud endpoints

java,javascript,google-app-engine,serialization,google-cloud-endpoints
I am sending a List<Item> from google app engine(java) to javascript through google cloud endpoints. Item: public class Item implements Serializable { private String item1; private Integer item2; private String item3; //(...) item (4-39) private String item40; //Constructor, Getters, setters, +functions } In javascript I am receiving the data with...

google app engine python: how to extend ndb User class

python,google-app-engine,google-cloud-endpoints,app-engine-ndb,endpoints-proto-datastore
I'm using google cloud endpoints and want to be able to extend the User class so that a call to get_current_user would return an AppUser object with my own extra properties. class AppUser(--?--): # what should i put here gcm = ndb.StringProperty() def send_notification(self): # do something with gcm ......

Is it possible to use Google Cloud Endpoints built in authentication with Google+ Domains API?

google-app-engine,authentication,google-plus,google-cloud-endpoints,google-plus-domains
Google Cloud Endpoints has it's own authentication process in which the backend endpoint method is simply passed a com.google.appengine.api.users.User object. https://cloud.google.com/appengine/docs/java/endpoints/auth The Google+ Domains API specifies its own authentication process in order to get the com.google.api.client.auth.oauth2.Credential object. This allows for the building of the com.google.api.services.plusDomains.PlusDomain object. https://developers.google.com/+/domains/authentication/ How would you...

How do I add both Facebook Login and Email registration to my Google Cloud Endpoints App (Java)?

java,android,facebook,google-app-engine,google-cloud-endpoints
So I have an app which uses Google App Engine and Google Cloud Endpoints as it's backend in Java. I'm currently working on User authentication and here is what I'm trying to do: When user first opens the app, they'll have option to either "Login through Facebook" or signup using...

cloud endpoint not respecting Jackson annotations

java,json,google-app-engine,jackson,google-cloud-endpoints
I have a class Organization with few date fields as follows. public class Organization { private String _id; private String name; @JsonDeserialize(using=JsonDateDeserializer.class) @JsonSerialize(using=JsonDateSerializer.class) private Date createdTime; // getters and setters } To handle the date in simple way on client side I convert date to long and send it to...

Polymer & google cloud endpoints golang backend

google-app-engine,polymer,google-cloud-endpoints
I'm trying to get my google cloud endpoint from polymer 1.0 all is set and working (backend and dispatcher on appengine), but the google-api-loader/google-client-loader (Tried both) refuses to acknowledge my endpoint, with google-api-loader nothing happens ready event never triggers, with google-client-loader it does but tries to get this url: https://content.googleapis.com/discovery/v1/apis/jobs/v1/rest?fields=rootUrl%2CservicePath%2Cresources%2Cparameters%2Cmethods&pp=0...

Using App Engine Cloud Endpoints to access ndb datastore

python,google-app-engine,google-cloud-endpoints,webapp2,google-datastore
I'm sorry if this question is redundant or not well-conceived, but I am new to App Engine, and I'm not sure about the best practices for what I'm attempting to do. I have an iOS app, and I want to use http GET and POST requests to put and query...

How to run/deploy Google AppEngine Managed vms using Gradle

java,google-app-engine,gradle,google-cloud-endpoints,gcloud
I've pushed, run and tested a managed VM with custom runtime as an AppEngine application. Now I want to make it multi-module, with the default module being a Google Cloud Endpoint configured to work with Android. Hence, I'm using Gradle as my build system. Now, I noticed that Google has...

How to set up already consistent data for Google App Engine unit tests?

java,unit-testing,google-app-engine,google-cloud-endpoints
I know that App Engine datastore queries are only eventually consistent. However, for some of my tests, I would like to seed the datastore with already consistent data (i.e. it was saved a long time before the test occurred and is now globally consistent). How can I make sure that...

Cloud Endpoints with Cloud SQL sample code

java,google-app-engine,google-cloud-endpoints,google-cloud-sql
I am looking to use Cloud Endpoints to create an API on the Google App Engine but all the tutorials I see are for how to interact with the Cloud Datastore. I am looking to use Cloud SQL though. Does anyone have a Cloud Endpoints class sample code (in Java)...

Annotating optional param with @Nullable in google app engine Endpoints drops the parameter

google-cloud-endpoints,google-app-engine
@ApiMethod(name = "foo") public void foo(@Nullable @Named("bar") String bar, User auth) throws OAuthRequestException ends up generating an API where the foo method takes NO bar parameter. If I do not annotate with @Nullable, and just pass null from the client, I get an exception at runtime. I'm sure this must...

Data backup by Google Cloud data store Vs google drive Vs other storage service

android,google-app-engine,google-drive-sdk,google-cloud-storage,google-cloud-endpoints
I need some basic understanding of google cloud as a whole.Supposing, I have an android app that will store user's contact,photo etc to cloud,in this case- 1.Which service should I use - google cloud storage or google drive ? if I use google cloud storage, how do I do it?...

Exception on transfering BigDecimal over Google Cloud Endpoints

java,android,google-app-engine,google-cloud-endpoints
I'm trying to transfer Articles data over cloud endpoints and the legacy application ( Android ) uses data structure that requires all the prices be in BigDecimal. Here is my Entity class: import org.hibernate.annotations.GenericGenerator; import java.math.BigDecimal; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name...

How to fix endpointscfg.py to generate discovery doc for Endpoints API? (Missing oauth2client.anyjson)

python,google-app-engine,google-cloud-endpoints
As of this writing, it seems the endpointscfg.py script that comes with Google App Engine is broken. I'm trying to generate an iOS client for my Endpoints API written in Python. According to the instructions, generating a discovery doc with the endpointscfg.py script is required first. But doing so gives...

use aetest.NewContext in place of endpoints.NewContext for testing go-endpoints with strong consistency

unit-testing,google-app-engine,go,google-cloud-endpoints
I have a search method: func (sa *SearchApi) Search(c endpoints.Context, r *SearchQuery) (*SearchResults, error) { .. } as you can see it takes an endpoints.Context e.g: ctx := endpoints.NewContext(req1) however with aetest, i'm using different context: otherCtx, err := aetest.NewContext(&aetest.Options{"", true}) Particularly this context has extra options for strong consistency...

Which is more cost-effective for a mobile backend: Parse or Google Cloud endpoints?

mobile,backend,google-cloud-endpoints
So me and my partner are working on a mobile app. And I'be been wondering which mobile backend is a better solution. The problem I see with Parse is that when there are high amounts of traffic in a short period of time, we would need to manually adjust the...

How to use generated clientid with Google cloud endpoints for authenticating 3rd party users without redeploying app

google-app-engine,authentication,oauth,google-cloud-endpoints
In my case we work with other companies which would consume our APIs along with our internal javascript client. I think we need to create a web client id for javascript client. But when exposing APIs externally, is it correct to generate new web client id per company? If so...

Google AppEngine dev app server won't run on localhost

eclipse,google-app-engine,localhost,google-cloud-endpoints,dev-appserver
I'm using Eclipse Java EE and when I compile and run my Google AppEngine project on localhost:8080 the browser doesn't give any correct output, but when I'm using 127.0.0.1:8080 my program runs on the browser just fine. But when I deploy my app to the google appspot then the localhost:8080...

How to upload an image through appengine endpoints api?

google-app-engine,google-cloud-endpoints,app-engine-ndb,endpoints-proto-datastore
I am using Endpoints Proto Datastore API. Suppose I have code like this : Model : class MyModel(EndpointsModel): _message_fields_schema = ('name', 'image') name = ndb.StringProperty() image = ndb.BlobProperty() API : @endpoints.api(name='myapi', version='v1', description='my api') class MyApi(remote.Service): @MyModel.method(name='mymodel.insert', path='mymodel') def insert_mymodel(self, data): data.put() return data How can I upload image to...

Arguments to Endpoints method change order

android,google-app-engine,google-cloud-endpoints
I am using Google App Engine with Cloud Endpoints for a simple Android application. In the backend I have the following API method, deployed to GAE: @ApiMethod(name = "getGroupInfo", path = "groups") public GroupInfo getGroupInfo(@Named("session") String sessionString, @Named("groupID") String groupID) throws ForbiddenException { Logger.getAnonymousLogger().warning("Session string is: " + sessionString); Logger.getAnonymousLogger().warning("GroupID...

Do I have to pay for Google Endpoints?

servlets,free,google-cloud-endpoints
I'm thinking of using the Google Endpoint service to add some simple features on my Android app. Following a tutorial on Github (https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/HelloWorld) I managed to create a very simple servlet with basic code and that's all I need. But it's not clear if I'll have to pay at some...

What is the lifespan of a private variable in an GAE Endpoint class?

java,google-app-engine,variables,google-cloud-endpoints
I have the following code for an instant messenger style app. public class MyEndpoint { private Integer numberOfConvos=0; ...} then I update it like this: @ApiMethod (name="createGroup") public myModel createGroup(@Named("profile") String profile){ numberOfConvos=numberOfConvos+1; } So everytime I make a new chat, I can make a unique and increasing ID. If...

Cloud enpoints methods visibility

java,android,google-app-engine,google-cloud-endpoints
I'm developing an Android app with Google Cloud Endpoints, I have read a lot of documentation and tutorials about it, but there is still one information missing: How can I choose which backend's methods will be visible for Android client ? Let's say I have a FriendshipEndpoint, FriendshipEndpoint has this...

IllegalArgumentException: expected primitive class, but got: class UUID

android,google-app-engine,google-cloud-endpoints
My app is using GAE endpoints. My model has UUID. And once i try to send it Android app it encounters illegalArgument exception. Anyone has got recommendations how to handle endpoints model with UUID on android app with Google App Engine endpoints? 06-14 23:26:49.560 27462-27488/com.example E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1...

503 Service Unavailable for google endpoints

java,google-app-engine,google-cloud-endpoints,objectify
I am using endpoints to try and create a patient entity for my web application. i keep getting the following error code when i try to run the API. 503 Service Unavailable - Show headers - { "error": { "errors": [ { "domain": "global", "reason": "backendError", "message": "java.lang.IllegalStateException: You have...

Primitive types cloud enpoints

android,google-cloud-endpoints
I am using Google Cloud Endpoints for my Android application, and I have created a Message entity thanks to the datastore. However I saw in many threads that primitive types are a known issue and one of my Message's fields is a int[]. Will it work, or do I have...

Using an enum contained in a Cloud Endpoint model on a Android client

android,google-app-engine,enums,google-cloud-endpoints,google-cloud-datastore
I'm trying to implement an enum in a entity called CargoWrapper. In my android app I'm constructing a CargoWrapper object to send to an endpoint method, and then calling my CargoWrapper setters to set the instance varialbes. One of CargoWrappers instance variables is an enum and it's indexed. The only...

Google Endpoints: How does the IDE (or terminal) authentify to GAE when uploading code?

google-app-engine,google-cloud-endpoints
I am new to Google Endpoints and Datastore. I've followed several tutorials, among which this one for example: https://github.com/GoogleCloudPlatform/endpoints-codelab-android My question is: what is the security mechanism that is used when we deploy the Endpoints backend application to Google App Engine? How does Google App Engine know you are the...

Generate Cloud Endpoints file in IntelliJ IDEA

intellij-idea,cloud,google-cloud-endpoints,endpoints
In Eclipse there's an easy way to generate Endpoints file from a Java class(right click on class -> google -> generate endpoints file), but I cannot find this feature in IntelliJ. How should I do this? Thanks...

Cloud Endpoints is REST or RPC style technology?

google-app-engine,google-cloud-endpoints
In documentation for cloud endpoints i read that: "One of the benefits of being able to easily build your own API is that you can design it any way you want. Cloud Endpoints gives you this flexibility—it allows REST- or RPC-style APIs, or a combination of both.". But of what...

How to send email using sendgrid in google cloud endpoints?

google-app-engine,google-cloud-endpoints,sendgrid
I'm trying to send email using Sendgrid with Google Cloud Endpoints. Here is the reference: https://cloud.google.com/appengine/docs/java/mail/sendgrid However, after copy Sendgrid.java to the src directory of the app, when I try to build the project, the error message says: package com.google.appengine.labs.repackaged.org.json does not exist It seems this package is not available...

How can I generate iOS endpoint libraries from android studio

android-studio,google-cloud-endpoints
I created an Android client / appengine cloud endpoints server project with Android Studio. I would now like to generate the iOS Objective-C sources of the endpoint to use for an iOS port of the Android client. How can I generate the source? I cannot find the endpoints.sh or any...

Objective-C client for Google Cloud Datastore API?

ios,google-app-engine,google-cloud-endpoints,objectify,google-cloud-datastore
In the past I have succeeded in accessing a Google App Engine Datastore from a Google App Engine (GAE) application with Objectify and generating an Objective-C client for this application (including its Objectify Java annotations) with Google Cloud Endpoints. This gave me a client for accessing this datastore from iOS...

Unable to post json using c# to google cloud endpoint

c#,json,rest,google-app-engine,google-cloud-endpoints
I have created an endpoint to an entity and deployed to google cloud app engine. https://alert-streamer-857.appspot.com/_ah/api/error/v1/error If I POST the following JSON using Advanced REST Client in chrome, the item is successfully getting added to datastore. { ipAddress: "123.456.789.098", host: "jbuddha-lap", user: "buddha", message: "testing from c#" } I'm getting...

How can you get the Google+ Profile of the current user when using Google Cloud Endpoint's (Java) built in authentication?

google-app-engine,google-plus,google-cloud-endpoints
My Setup Backend: Google App Engine (Java) w/ Google Cloud Endpoints using Endpoint's built in authentication Frontend: AngularJS web app Problem I need to get the Google+ profile for my users. The keyword "me" can generally be used to get the current user's Google+ profile, however since all the authentication,...

What is the correct flow to upload an image and use getServingUrl() in app engine?

java,google-app-engine,google-cloud-storage,google-cloud-endpoints,blobstore
I have an android app that wants to include image sending in the instant messaging client. I'm terribly confused on the way to do this using the blobstore or google cloud storage. Can someone please outline the steps to achieve this from the backend perspective? My goal is to end...

Batch requests throws 404 not found

google-app-engine,google-cloud-endpoints,google-api-java-client
I'm using the Google Apps Java client library to develop an Android application. I am trying to send a batch request as explained here. This is my request code for the discovery endpoint, which you can see has a batchPath field with "batch" as value: BatchRequest batchRequest = mApi.batch(); mApi.insert(mEntity).queue(batchRequest,...