diff --git a/appengine/flexible/endpoints/README.md b/appengine/flexible/endpoints/README.md index c31f528dba0..aff053b4da0 100644 --- a/appengine/flexible/endpoints/README.md +++ b/appengine/flexible/endpoints/README.md @@ -172,3 +172,16 @@ $ gcloud app deploy app.yaml --project=YOUR-CLIENT-PROJECT-ID Your client app is now deployed at https://YOUR-CLIENT-PROJECT-ID.appspot.com. When you access https://YOUR-CLIENT-PROJECT-ID.appspot.com, your client calls your server project API from the client's service account using Google ID token. + +## Viewing the Endpoints graphs + +By using Endpoints, you get access to several metrics that are displayed graphically in the Cloud Console. + +To view the Endpoints graphs: + +1. Go to the [Endpoints section in Cloud Console](https://console.cloud.google.com/endpoints) of the project you deployed your API to. +2. Click on your API to view more detailed information about the metrics collected. + +## Swagger UI + +The Swagger UI is an open source Swagger project that allows you to explore your API through a UI. Find out more about it on the [Swagger site](http://swagger.io/swagger-ui/). diff --git a/appengine/flexible/endpoints/index.html b/appengine/flexible/endpoints/index.html deleted file mode 100644 index 9774466482f..00000000000 --- a/appengine/flexible/endpoints/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - Endpoints Echo & Auth Sample - - -

Welcome to your Endpoints Sample

-

Congratulations on successfully setting up and deploying your Endpoints bookstore sample.

-

Here are some helpful links:

- - - diff --git a/appengine/flexible/endpoints/main.py b/appengine/flexible/endpoints/main.py index 86ba7ebfd37..1e3d529edb0 100644 --- a/appengine/flexible/endpoints/main.py +++ b/appengine/flexible/endpoints/main.py @@ -22,29 +22,14 @@ import json import logging -from flask import Flask, jsonify, request, send_from_directory +from flask import Flask, jsonify, request from flask_cors import cross_origin from six.moves import http_client -import yaml app = Flask(__name__) -@app.route('/', methods=['GET']) -def index(): - """Shows the index page.""" - return send_from_directory('.', 'index.html') - - -@app.route('/api-docs', methods=['GET']) -def swagger_json(): - """Serves up the Swagger spec for the API.""" - with open('swagger.yaml', 'r') as f: - spec = yaml.safe_load(f) - return jsonify(spec) - - @app.route('/echo', methods=['POST']) def echo(): """Simple echo service.""" diff --git a/appengine/flexible/endpoints/main_test.py b/appengine/flexible/endpoints/main_test.py index 2b9b4b66c42..6ca6b5093d3 100644 --- a/appengine/flexible/endpoints/main_test.py +++ b/appengine/flexible/endpoints/main_test.py @@ -29,16 +29,6 @@ def client(monkeypatch): return client -def test_index(client): - r = client.get('/') - assert r.status_code == 200 - - -def test_api_docs(client): - r = client.get('/api-docs') - assert r.status_code == 200 - - def test_echo(client): r = client.post( '/echo',