I created a Google cloud endpoint API in java:
@Api(name = "myAPI",
version = "v1",
namespace = @ApiNamespace(ownerDomain = "endpoints",
ownerName = "endpoints",
packagePath=""))
public class MyEndpoint {
/** Déclaration de la méthode */
@ApiMethod(
name = "getPeople",
path = "getPeople/{name}",
httpMethod = HttpMethod.GET)
public People getPeople(@Named("name") String name) {
People pers = ObjectifyDAO.getByKey(People.class, name);
return pers;
}
The API appears in the API explorer https://apis-explorer.appspot.com/apis-explorer/?base=https://myapp.appspot.com/_ah/api#p/ but it does not appear in the google cloud console api dashboard https://console.cloud.google.com/apis/dashboard?project=myproject&duration=PT1H
When i make a request with the following code:
var init = function() {
var rootApi = 'https://myapp.appspot.com/_ah/api/';
var apiKey = "qsfqfdsqzM8TICqjJR29BcXWfLTvradadcqsd";
gapi.client.setApiKey(apiKey);
gapi.client.load('myAPI', 'v1', function() {
console.log("myAPI api loaded");
gapi.client.myAPI.getPeople({name:"Buddha"}).execute(function(resp) {
console.log(resp);
});
}, rootApi);
// Appeler l'api todos
}
I get "Access Not Configured. has not been used in project 123456 before or it is disabled. Enable it by visiting the google cloud console then retry."
But nothing appears but the native Google APIs on the google cloud console api dashboard.
Any ideas on how to enable it or solve this issue ?
Are you using Endpoints Frameworks
and if so, have you deployed your API configuration?