4
votes

I came to know GAE cloud endpoints yesterday. From that time I am trying to generate APIs for my current web application. I am using JPA2.0, I chose one of my entity classes right clicked on it and then "generate Google endpoint class" . So now I have another class for this entity with @API annotations, etc.

But the problem is after deploying the app when I go to : https://developers.google.com/apis-explorer/?base=https://myAppId.appspot.com/_ah/api#p/

the services tab is empty. Same thing when I check it locally(Image below) enter image description here

5
When you say "check locally" you mean you don't see anything when you go to localhost:8888/_ah/api/explorer (filling in whatever port you're using if not 8888)? Do you see any errors in your local logs? - Dan Holevoet
Thank you. Please check the above image. I see empty screen both locally and in production. - Sara

5 Answers

2
votes

You need to Generate Cloud Endpoints Library (in Eclipse, right click on the Project, it's under Google) as well.

1
votes

I had similar issue and it was caused by missing public attribute in methods.

@Api
public class MyApi {
   @ApiMethod
   void myMethod() { }
}

caused that I saw no methods. While added

@Api
public class MyApi {
   @ApiMethod
   public void myMethod() { }
}

methods started to be visible.

1
votes

1.Login appengine https://appengine.google.com/

2.Click the [Version] link in a Main category

3.Select your version and [Make Default] button

4.You can access the api explorer https://myAppId.appspot.com/_ah/api/explorer

Best Regard.

0
votes

I actually managed to resolve the above issue. So I had a web application existing and I thought I could just add annotations to it and have the APIs represented for it after deployment. But I realized that I had to start from scratch by creating an android app and then generate the back-end for that app and add my classes there. It now works. Thank you.

0
votes

Points to remember before working on endpoints :

  1. Need to create an endpoint client library before running your project.(In Eclipse : Project -> Right click -> Google -> Generate cloud endpoints library)

  2. Check whether you are using latest Google Plugin or not. Because files required by endpoints will be executed from the plugin. If you are not able to generate the endpoint library. problem is with the plugin .Try updating it.

  3. Endpoints will work only on default versions. Make sure that you made your version default.

  4. finally try loading http://myApp.appspot.com/_ah/api/explorer. Everything should be fine now.