A simple RESTful API built on top of Google App Engine
This app is intended for educational purposes only, and should NOT be used on production.
To create a RESTful API for production purposes, you should use the Endpoints API.
- Install the Google App Engine Python SDK
- Run
git clone git@github.com:bengrunfeld/gae-restful-api.git && cd gae-restful-api
- Edit
app.yaml
and change the value forapplication
fromgae-restful-api
to any name of your choice. You'll need it later - You can now test your app. Run the development server with
dev_appserver.py .
, then test the app using Postman. You should be able to test a route at http://target-domain/todos/api/v0.1.0/
- Navigate to https://console.developers.google.com/project
- Click
Create Project
- You can use whatever name you want for
PROJECT NAME
, but forPROJECT ID
, you need to use the same value you set above forapplication
inapp.yaml
. cd
into your application directory and runappcfg.py update .
. You will need to enter your email and password.- You can now view the application at
[your-project-id].appspot.com
, although to receive anything besides a 404 error, you'll need to use a URI like http://[your-project-id].appspot.com/todos/api/v0.1.0/
I suggest using Postman to send HTTP requests.
Send a HTTP POST request to http://target-domain/todos/api/v0.1.0/ with form data of Key: title, Value: [title of todo]
Send a HTTP GET request to http://target-domain/todos/api/v0.1.0/
Send a HTTP GET request to http://target-domain/todos/api/v0.1.0/ndb-key-id
Send a HTTP PUT request to http://target-domain/todos/api/v0.1.0/ndb-key-id with form data of Key: title, Value: [new title of todo]
Send a HTTP DELETE request to http://target-domain/todos/api/v0.1.0/ndb-key-id with NO form data