Last active
January 12, 2019 15:32
-
-
Save mykhailo-riabokon/647e9e205c0c4718b64c4d022b965f27 to your computer and use it in GitHub Desktop.
WellDone API V3 (via API Blueprint)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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