a85 / Postman-demo-server

Demo server for postman

Home Page:http://dump.getpostman.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PostmanBin

Demo server for testing / demonstrating Postman. Postman collection with the api endpoints can be downloaded here.

Build Steps

Make sure you have sqlite installed.

$ git clone https://github.com/prakhar1989/Postman-demo-server.git 
$ virtualenv venv 
$ source venv/bin/activate
$ pip install -r requirements.txt
$ python setup.py # sets up the database
$ python app.py 
 * Running on http://127.0.0.1:5000/
 * Restarting with reloader

To deploy a flask app I have a blogpost written here which you can follow.

Endpoints

Method Endpoint Description
1 GET {{url}}/blog/posts Return all blog posts
2 DELETE {{url}}/blog/posts/{{id}} Delete the existing blog post
3 GET {{url}} Returns a JSON with all the available API endpoints.
4 GET {{url}}/blog/users/{{user_id}} Get user details for a user
5 GET {{url}}/blog/posts/{{id}} Return blog post with that ID
6 POST {{url}}/blog/users/ Create a new user with the given username and password.
7 POST {{url}}/blog/posts Create a new blog post
8 GET {{url}}/cookies/delete?name Similar to httpbin.org/cookies. Delete a cookie.
9 GET {{url}}/delay/10 Return response after a few seconds
10 POST {{url}}/post Similar to httpbin.org/post. Return POST data.
11 POST {{url}}/blog/users/tokens/ POST on this endpoint will create a new token provided the username and password is correct. The returned token will be used to make subsequent requests.
12 GET {{url}}/cookies Similar to httpbin.org/cookies. Return cookies set in the domain.
13 DELETE {{url}}/blog/users/tokens/{{token_id}} Delete the token. Effectively signing out the user.
14 GET {{url}}/get Similar to httpbin.org/get. Return GET data.
15 GET {{url}}/headers Similar to httpbin.org/headers. Return all the headers passed to it.
16 GET {{url}}/cookies/set?name=value Similar to httpbin.org/cookies. Set a cookie
17 PUT {{url}}/blog/posts/{{id}} Modify the existing post
18 GET {{url}}/blog/users/ Get all current users of the blog.
19 GET {{url}}/status Return the status of the API with the timestamp.

Thanks

HTTPBIN for inspiration

About

Demo server for postman

http://dump.getpostman.com


Languages

Language:Python 73.6%Language:HTML 26.4%