google-cloud-endpoints

How do I fix OpenAPI document generation on Google Cloud Endpoints?

笑着哭i 提交于 2019-12-11 19:47:34
问题 I am working through the tutorial: 'Getting Started with Cloud Endpoints Frameworks on App Engine Standard'. https://cloud.google.com/endpoints/docs/frameworks/python/get-started-frameworks-python On step two of the 'Generating the OpenAPI document' section when running the command after having replaced 'MY_PROJECT_ID' with my project ID: python lib/endpoints/endpointscfg.py get_openapi_spec main.EchoApi --hostname [MY_PROJECT_ID].appspot.com I get the following error: Traceback (most recent

storing static images in the blobstore

主宰稳场 提交于 2019-12-11 17:57:56
问题 Normally to host a website on app-engine, I can put all my image files in a static directory, say img , and then in the yaml file have url: /img static_dir: img Such a usage makes sense when the images are for displaying in my website itself. But now I have an endpoint api. For my case, I need to store some images in my backend for my users to access. Instead of putting them in static directory, I want to put them in the blobstore and use blob serving url to serve them. Is there a way to

ImportError: No module named endpoints

本秂侑毒 提交于 2019-12-11 17:38:49
问题 Was working while setup in a samples dir downloaded from github, but now that I've built my own API, the dev server starts but throws this error when hitting it with CURL: $ dev_appserver.py ./app.yaml INFO 2019-03-31 21:48:38,215 api_server.py:275] Starting API server at: http://localhost:54462 INFO 2019-03-31 21:48:38,225 api_server.py:265] Starting gRPC API server at: http://localhost:54464 WARNING 2019-03-31 21:48:38,227 dispatcher.py:338] Your python27 micro version is below 2.7.12, our

Cloud endpoint management leaking memory?

不问归期 提交于 2019-12-11 17:27:21
问题 I have a strange problem with GAE Java. There are two instances with basic scaling for the version I am using, with one being used and the other idling, from what I can see in the log. Response times are fine. I can see that my idle instance did not receive any requests for the last hour. Strangely, on the idle instance the memory usage goes up constantly at around a 2MB/minute. For the last hour. In production (total of both instances) this leads to a sawtooth type memory usage graph, where

Can I use Endpoints Frameworks with GAE if it supports only Python 2.7.x. It doesn't support Python 3.x?

冷暖自知 提交于 2019-12-11 17:13:27
问题 I am setting up a new API and Google Cloud Endpoints Frameworks looks like a good candidate to use with an AppEngine standard handler. The API handler is to accesses BigQuery in the backend - This seems to prefer newer cloud-api-client libraries. Python 2.7 is deprecated at the start of 2020. I can't find any guidance on whether Google is going to update endpoints to support GAE on Python3.x or removed (replaced with some other product perhaps?) App Engine now supports Python 3.x. Should I be

How to use google cloud endpoint jar lib in android project

半城伤御伤魂 提交于 2019-12-11 12:37:56
问题 I made a android project and a created a google cloud endpoint module in the same project. Now I want to separate the android project and the backend project. So I changed this line inside app.gradle from: compile project(path: ':backend', configuration: 'android-endpoints') to compile files('libs/backend-android-endpoints.jar') I copied backend-android-endpoints.jar from backend/build/libs to app/libs Now when I compile the project, it doesn't compile and gives an error related to Realm , a

Safe embedded entity with objectify

别说谁变了你拦得住时间么 提交于 2019-12-11 10:37:31
问题 I have two entities. @Entity public class Recipe { @Id private Long id; private List<Step> steps; } @Entity public class Step { @Id private Long id; private String instruction; } And the following Clound Endpoint @ApiMethod( name = "insert", path = "recipe", httpMethod = ApiMethod.HttpMethod.POST) public Recipe insert(Recipe recipe) { ofy().save().entities(recipe.getSteps()).now(); //superfluous? ofy().save().entity(recipe).now(); logger.info("Created Recipe with ID: " + recipe.getId());

GAE Endpoints error: Expected FooBar Instance, got FooBar()

て烟熏妆下的殇ゞ 提交于 2019-12-11 10:05:59
问题 I'm managing an API with using Google Cloud Endpoints and am struggling with a strange, randomly happening, error. The error happens in production only, the unit tests pass property. I have the following model: class UserFacebookData(ndb.Model): facebook_id = ndb.StringProperty(required=True, indexed=True) facebook_token = ndb.StringProperty(required=True, indexed=True) class User(ndb.Model, Entity): created = ndb.DateTimeProperty(auto_now_add=True, indexed=True) username = ndb.StringProperty

Google Cloud Endpoint package myApi does not exist - Android Studio

一个人想着一个人 提交于 2019-12-11 09:59:16
问题 I'm trying to add a Google Cloud Endpoint to my Android Application. In my EndpointAsyncTask class I use MyApi importing it like so: import com.example.adamzarn.myapplication.backend.myApi.MyApi; When I run my project I get this error: Error:(8, 56) error: package com.example.adamzarn.myapplication.backend.myApi does not exist However, it does exist: Why am I getting this error? 回答1: Check the build.gradle file in the module where your EndpointAsyncTask class is located. Make sure the

Batch requests throws 404 not found

一曲冷凌霜 提交于 2019-12-11 09:28:31
问题 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, callback); batchRequest.execute(); However I keep getting a 404 error . I have already deployed my rebuilt project and double checked the API url. Why is my