2

I am running a webapp locally using dev_appserver.py My app is running properly on localhost:8080 When I try to access the Api endpoints explorer @ localhost:8080/_ah/api/explorer , I get 404 Error

Console log:

INFO 2017-11-07 05:59:24,864 module.py:821] default: "GET /_ah/api/explorer HTTP/1.1" 404 154

app.yaml

application: hari-mq-endpoints
version: 1
runtime: python27
api_version: 1
threadsafe: yes

builtins: 
 - deferred: on

handlers:
- url: /favicon\.ico
  static_files: favicon.ico
  upload: favicon\.ico

# Serving static files (css, images, etc)
- url: /static
  static_dir: static

# Loads some data
- url: /importdata/.*
  script: main.app
  login: admin

# Endpoints Handler
- url: /_ah/spi/.*
  script: api.app

# Main handler
- url: .*
  script: main.app

libraries:
- name: webapp2
  version: "2.5.2"
- name: jinja2
  version: "2.6"

api.py

import endpoints
from protorpc import remote
from models import MovieQuote

@endpoints.api(name="moviequotes", version="v1", description="Movie Quotes API")
class MovieQuotesApi(remote.Service):
    @MovieQuote.method(path="moviequote/insert",name="moviequote.insert", http_method="POST")
    def moviequote_insert(self, request):
        """ Inserts a new MovieQuote into the Datastore. """
        request.put()
    return request

app = endpoints.api_server([MovieQuotesApi], restricted=False)

https://developers.google.com/apis-explorer/?base=http://localhost:8080/_ah/api#p/

opens up the api explorer and I have enabled running unsafe script. But it still doesn't show my api

Harikumar
  • 21
  • 5
  • Never Mind...The mistake was that I havn't added endpoints to the libraries Adding this to the end of app.yaml fixed the problem. - name: endpoints version: 1.0 – Harikumar Nov 07 '17 at 07:43

0 Answers0