google-cloud-endpoints

Google App Engine/Managed VM Cloud Endpoints

送分小仙女□ 提交于 2019-12-13 08:42:20
问题 We're currently running on App Engine (Java) and want to test the new managed VMs that Google are beta testing. Everything builds, but I can't get any of the endpoints to work. When I build, the error that comes back is: SEVERE: Endpoints configuration not updated. The app returned an error when the Google Cloud Endpoints server attempted to communicate with it. In the admin logs I can see that it has attempted, but the error comes back: API configuration update failed The discovery docs get

cloud endpoints csrf protection

旧巷老猫 提交于 2019-12-13 06:24:48
问题 I'd like to send an csrf protection token with every cloud endpoints request, but I don't want to have to specify this every time I call one of my services. How would I implement a sort of proxy, that inserts this token into any call my application makes? 来源: https://stackoverflow.com/questions/16688489/cloud-endpoints-csrf-protection

The string property has a value that is too long. It cannot exceed 500 characters

有些话、适合烂在心里 提交于 2019-12-13 05:16:25
问题 I just tried to send a long String param to the endpoint method. One of the params is List<String> , that contains a large number of values, which look like this: 105969550886996847196,109334384788152421649,109172191656045871108,... and more The method itself is very simple: @ApiMethod(name = "getFullObjects") public MyObject getFullObjects(List<String> ids) { //body not relevant } It throws this: Error Code: 400 Reason: badRequest Message: java.lang.IllegalArgumentException: The string

Google Cloud Endpoints User#getUserId different than profile id on Google+

妖精的绣舞 提交于 2019-12-13 04:34:04
问题 I've been writing application for appengine, using GWT and Cloud Endpoints. For Cloud Endpoints I use authorization as shown here: Using Auth with Endpoints. With scope https://www.googleapis.com/auth/userinfo.email . Because I need different roles for users, I've tried to use User#getUserId and I thought this will be the id of Google+ profile. Although that's not true and this is completely different (well, it has the same length). The problem is, I can't find out, how to find this id a

Cannot Generate Cloud Endpoint Client Library - “Not an App Engine project”

大憨熊 提交于 2019-12-13 04:24:35
问题 When I attempt to generate an endpoint client library in Eclipse (GPE 3.5.1, GAE SDK 1.9.4) I get this error: "Not an App Engine project". The project is an App Engine project (and is deployed). The project is configured as an EAR project with backend and frontend modules. I don't get any errors in the Error Log. GAE SDK 1.9.3 gives me the same error. I've also tried the command line but simply get 'Error'. 回答1: If you created your your cloud-endpoints projects using WTP, then Right click on

AppEngine NDB property validations

本小妞迷上赌 提交于 2019-12-13 03:07:19
问题 I wonder what the best approach is for validating NDB entity properties likes: a date must be in the future a grade (integer property) must be between 1 and 10 a reference to another entity must have certain property values (e.g. book.category.active must be True) I'm also using WTForms to validate submitted requests, but I want to enforce validations also on a lower level like the datastore entities itself. So basically what I'm looking for is to call a validate on a datastore entity to see

Cloud Endpoints support for text fields with more than 500 characters

為{幸葍}努か 提交于 2019-12-13 00:36:43
问题 I need to store a field that is usually over 500 characters. When using the String data type, App Engine fails and suggests to use the com.google.appengine.api.datastore.Text datatype in this case. When doing so, the Android client fails with the following: AndroidRuntime tag: Caused by: java.lang.IllegalArgumentException: expected primitive class, but got: class com.sample.sampleproj.sampleendpoint.model.Text at com.google.api.client.util.Data.parsePrimitiveValue(Data.java:4 53) How can

Error deploying endpoint containing parameter of type “file”

浪尽此生 提交于 2019-12-12 23:08:32
问题 I'm trying to deploy a simple endpoint which contains a parameter of type file . I'm using the gcloud service-management deploy command with the following openapi compliant yaml: swagger: "2.0" info: description: "Image API" title: "Image API" version: "v1" host: "image-api.endpoints.myproject.cloud.goog" basePath: "/v1" schemes: - "https" paths: "/images": post: description: "Adds an image" operationId: "add" consumes: - "multipart/form-data" produces: - "application/json" responses: 201:

Owned entity causing json serialization error in Google javascript api client

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 22:13:21
问题 Getting error: java.lang.IllegalArgumentException: Can not deserialize instance of java.lang.String out of START_OBJECT token at [Source: N/A; line: -1, column: -1] and Caused by: com.google.appengine.repackaged.org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token at [Source: N/A; line: -1, column: -1] Samples of my entities: @PersistenceCapable public class User { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy

GAE Cloud Endpoints API Explorer stopped working

帅比萌擦擦* 提交于 2019-12-12 18:47:49
问题 Out of the blue, the API explorer (localhost:8080/_ah/api/explorer) stopped working. This is the message 'goapp serve' gives: WARNING 2015-12-15 17:54:24,744 dispatcher.py:762] Skipping dispatch.yaml rules because /_ah/spi/BackendService.getApiConfigs is not a dispatchable path. 2015/12/15 17:54:24 DEBUG: SPI request body: {} INFO 2015-12-15 17:54:24,746 module.py:787] default: "POST /_ah/spi/BackendService.getApiConfigs HTTP/1.1" 200 2619 ERROR 2015-12-15 17:54:25,706 discovery_api_proxy.py