I am using Java + GPE.
I have an application with 4 end point APIs. I added one more and tested in my development environment. My new api was detected by API explorer in dev environment. I then deployed to GAE but my new API doesn't show up in API explorer.
I can confirm the api classes have been deployed in GAE as I am able to access the functionality through a servlet.
Can someone please help me out ?
Regards,
Sathya
Try to copy the two JAR files of your directory src>enpoint-libs>libreDefEndpoint-v1>yourclassEnpoint in the war>WEB-INF>lib. (Then deploy)
Related
I have a website that is currently running under GAE... unfortunately, I, nor anyone on the team, does not have access the local environment that it was created from.... Is it possible to create a local environment or at least get a copy of the application files and database from an existing GAE installation?
What you need is the application source code, not the "local environment".
Ideally this source code would be on a version control system (ie GIT,SVN), Google cloud platform provides free GIT repositories for your projects so you might try looking there first. There's also a tool for both Java and python that allow you to download the source of a deployed version, provided you are authenticated as either the dev who uploaded it or a project owner. EDIT: as stated by Dan Cornilescu this feature can be disabled.
As for the database info there's plenty of tools available to "export" your GAE datastore info, just consider for your project that it might be easier to do the queries manually than actually implementing this tools.
Thanks for help... But unfortunately, this code is not in GIT. Furthermore,
being new to Google hosting, I wasn't clear on my setup... My web instance is actually running within Compute Engine not Application Engine. Be that as it may, with some additional search, I was first able to find out how to browse my filesystem by accessing the VM Instances menu option under the Compute Engine section of the Google Cloud Platform interface. On the VM Instances page, it will show your instance and an option to the left side of the instance to connect with a drop down box that will allow you to open a browser window that shows the instance's file system. In addition to this, I found this link https://www.youtube.com/watch?v=9ssfE6ODpak that shows how to configure Filezila FTP client to access your server instance - very helpful. From there, I was able to download all of my site files from the var/www directory. Now, onto extracting my data... Thanks again!
I'm working on my first android app that uses a Google DataStore for the back end data storage. I've created a backend store and tested it uses the APIs Explorer and on localhost. I then created a project and deployed the backend to the cloud.
What I was expecting was to use the APIs Explorer to add some global configuration information and test the APIs. I typed in:
https://[projectID].appspot.com/_ah/api/explorer
which brings me to the explorer page but none of the services/endpoints show up.
I currently don't have any security defined for the project.
Can I use the API Explorer on a deployed backend? If so, I'm assuming I missed something in the project setup. Any ideas as to what I may have missed?
Thanks for your insights and answers.
You need to use endpoints.API_EXPLORER_CLIENT_ID in your api class decorator in case you need to view api in your deployed version.
Here's the example
#endpoints.api(name = '<api name>',
version = 'v1',
description = '<description>',
allowed_client_ids = [WEB_CLIENT_ID, ANDROID_CLIENT_ID,
IOS_CLIENT_ID, endpoints.API_EXPLORER_CLIENT_ID],
audiences=[ANDROID_AUDIENCE],
scopes=[endpoints.EMAIL_SCOPE])
Hope this helps you.!
I am developing a linkedin enabled Silverlight application. LinkedIn API calls are made through Oauth2 over REST platform. I am able to fetch authorization code,access token and make API calls while running the application as "localhost" or in local IIS. However, when I try to access the deployed application outside the environment with Public IP, I am unable to make LinkedIn API calls. While debugging with Fiddler, the trace shows that "crossdomain.xml and clientaccesspolicy.xml" not found in http://www.linkedin.com/crossdomain.xml. I am unsure why this problem occurs only when we try accessing the hosted application outside and doesn't occur while running under localhost. I have tried placing both these xml files in the root folder of IIS and also inside our application hosted folder. Looking forward for your kind suggestions/help resolving this.
Thanks,
Subbu
The Problem:
I can access my Cloud Endpoints API via the following version-specific URL:
https://[version]-dot-[myappid].appspot.com/...
but I can't access it via this main URL:
https://[myappid].appspot.com/...
the error I receive in the chrome console is this:
https://[myappid].appspot.com/_ah/api/discovery/v1/apis/userEndpoint/v1/rpc?fields=methods%2F*%2Fid&pp=0 404 (Not found)
What I've done:
First off let me say I'm very new to App Engine so apologies if this is a silly question.
I've created a Google Cloud Endpoints Backend module as part of my project in Android Studio (v0.5.6) which uses all the new gradle stuff and Objectify annotations.
I've tested my back end locally on the dev server and it all runs fine.
I then deployed it to appengine using the gradle task appengineUpdate and all went well.
I deleted previous version instances running in my app engine cloud console and made the newly deployed version (version-2) the default.
I can access and use the endpoint API fine via the version specific URL as described above but not via the main url.
I have a simple index.html file which is using the endpoint via the javascript client library to test with before building client libraries for my android app.
On both versions of the URL the index.html file renders properly, it just can't connect to the API.
If anyone knows how I can get the app to run properly on the main URL (or let me know if it's not supposed to) that would be awesome!
Many thanks!
Solution was to use appengineUpdateAll which calls both: appengineUpdate and appengineUpdateAllBackends my bad!
I believe there is an undocumented Google API available to create and manage Google Cloud Console (and App Engine) projects on behalf of third party users.
Does anyone know how to use it?
I think older versions of the Google Eclipse Plugin obtained an OAuth2 token in the (undocumented) scope https://www.googleapis.com/auth/appengine.admin, and this allowed it to generate a Cloud Console project on your behalf. The latest version doesn't seem to do this. App Engine's own appcfg.py also uses this scope, but doesn't seem to do much more than deploy the code - I'm looking to change core settings for the project, such as Name, Redirect URLs, and Web Origins.
Any information would be appreciated.
I maintain a WordPress plugin providing secure Google Apps Login for end users, and currently have to give detailed instructions to admins for creating a new Cloud Console project manually, and entering settings such as Redirect URL. Ideally, I would create a simple on-line service to do all of this for them.
Thank you!
It is possible to programmatically create a new Developer Console project on behalf of a Google Account (yes, you read that right). You do so in a very roundabout way:
Request the https://www.googleapis.com/auth/drive.scripts scope from the user (standard OAuth 2.0 flow).
Use the Drive API's drive.insert method to create a new file with a mimetype of application/vnd.google-apps.script.
Somehow try to get the project ID, maybe by uploading some Apps Script code? This is the part that I was never able to figure out.
A little known fact is that every Google Apps Script project has a hidden Developer Console project associated with it. This project is not shown in the list of projects, but it does exist. It is created automatically when the user starts a new Apps Script project, and the drive.insert method is enough to cause this to happen.
How do you get to the hidden project? Well, the only way I know of is to open the Apps Script project from the Drive website, open the "Resources > Advanced Google Services" dialog, and click the link to the Developer Console. You'll find the project ID in the URL.
Aside from not being shown in your list of projects and not being able to use App Engine, this is a normal Developer Console project. You can add additional OAuth client credentials, service accounts, Compute Engine instances, etc. And of course once you have a project ID, all of the various management APIs will work: creating new virtual machines, making use of a service account's impersonation ability, etc.