A simple and unsecure API to store blog data. The server limit the number of request from an IP at 264 per minute.
Add an article in the database.
-
URL:
/article/{id}/
-
Method:
POST
-
URL Param:
required:
id=[string]represents an user ID -
Data Param:
{ "title": "My Article", "content": "Whatever I want to say!" } -
Success Response:
Code:
200 OK
Content:{ "title": "My Article", "content": "Whatever I want to say!" } -
Error Response:
Code:
400 Bad Request
Content:error as plain/textCode:
500 Internal Server Error
Content:error as plain/text
Get an article from the database.
-
URL:
/article/{id}/{title}
-
Method:
GET
-
URL Param:
required:
id=[string]represent an user ID
title=[string]represent the title of an article -
Data Param:
None
-
Success Response:
Code:
200 OK
Content:{ "title": "My Article", "content": "Whatever I want to say!" }
Delete an article from the database.
-
URL:
/article/{id}/{title}
-
Method:
DELETE
-
URL Param:
required:
id=[string]represent an user ID
title=[string]represent the title of an article -
Data Param:
None
-
Success Response:
Code:
200 OK
Content: None -
Error Response:
Code:
400 Bad Request
Content:error as plain/textCode:
404 Not Found
Content:error as plain/textCode:
500 Internal Server Error
Content:error as plain/text
Get all article from an user.
-
URL:
/articles/{id}/{order}/
-
Method:
GET
-
Headers:
optional:
Accept: text/xmlask the server to send data as XML -
URL Param:
required:
id=[string]represent an user IDoptional:
order=[desc|asc]ask the server to order in an ascending or descending way -
Data Param:
None
-
Success Response:
Code:
200 OK
Content:[{ "title": "My Article", "content": "Whatever I want to say!" },{ "title": "My Other Article", "content": "Whatever I want to add!" }] -
Error Response:
Code:
400 Bad Request
Content:error as plain/textCode:
404 Not Found
Content:error as plain/textCode:
500 Internal Server Error
Content:error as plain/text
Delete all article from an user.
-
URL:
/articles/{id}/
-
Method:
DELETE
-
URL Param:
required:
id=[string]represent an user ID -
Data Param:
None
-
Success Response:
Code:
200 OK
Content: None -
Error Response:
Code:
400 Bad Request
Content:error as plain/textCode:
404 Not Found
Content:error as plain/textCode:
500 Internal Server Error
Content:error as plain/text