Skip to content

Instantly share code, notes, and snippets.

@mykhailo-riabokon
Last active January 12, 2019 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mykhailo-riabokon/647e9e205c0c4718b64c4d022b965f27 to your computer and use it in GitHub Desktop.
Save mykhailo-riabokon/647e9e205c0c4718b64c4d022b965f27 to your computer and use it in GitHub Desktop.
WellDone API V3 (via API Blueprint)
FORMAT: 1A
HOST: http://polls.apiblueprint.org/
# welldone-api
API for WellDone web-app which is used as example in blog post
# Data Structures
## Post Base (object)
+ id: 1 (string) - Post ID
## Post Preview (Post Base)
+ title: My first blog post (string) - Blog post title
## Bad Request (object)
+ message: Something went wrong (string) - Error message
## Posts [/posts]
### Get all posts [GET]
+ Response 200 (application/json)
+ Attributes (array[Post Preview])
### Create a new post [POST]
+ Request (application/json)
{
"title": "My new post",
"content": "A lot of words",
"previewImg": "https://gph.is/V4zGWG",
"author": "Jack Smith"
}
+ Response 201 (application/json)
+ Attributes (Post Base)
+ id: 2
+ Response 400 (application/json)
+ Attributes (Bad Request)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment