TheTestRequest is a free online REST API that you can use whenever you need some fake data.
Pagination is supported across the board, all pagination related information is exposed in response headers.
You acn control pagination with the following parameters
As of now, there are three resources exposed by TheTestRequest API.
In TestRequestAPI an "Author" has many "Articles".
XML responses?
Article has the following routes
GET - https://thetestrequest.com/articles.xml
GET - https://thetestrequest.com/authors/1/articles.xml
GET - https://thetestrequest.com/authors/1/articles/1.xml
NOTE - Response of this request is fake i.e. No data will be saved on server.
POST - https://thetestrequest.com/authors/1/articles.xml
{
"article": {
"title": "Title of Article",
"body": "Article Content",
"views": 100,
"likes": 35
}
}
NOTE - Response of this request is fake i.e. No data will be saved on server.
PUT/PATCH - https://thetestrequest.com/authors/1/articles/1.xml
{
"article": {
"title": "Title of Article",
"body": "Article Content",
"views": 100,
"likes": 35
}
}
NOTE - Response of this request is fake i.e. No data will be saved on server.
DELETE - https://thetestrequest.com/authors/1/articles/1.xml
Comments
In TestRequestAPI an "Article" has many "Comments".
Details
Attributes
Routes
XML responses?
Comment has the following routes
Get all Comments against an Article
GET - https://thetestrequest.com/articles/1/comments.xml
Accepted params (optional)
Get a single Comment against an Article
GET - https://thetestrequest.com/articles/1/comments/1.xml
Accepted params (optional)
Create a Comment against an Article
NOTE - Response of this request is fake i.e. No data will be saved on server.
POST - https://thetestrequest.com/articles/1/comments.xml
Accepted data (JSON object)
Update a Comment
NOTE - Response of this request is fake i.e. No data will be saved on server.
PUT/PATCH - https://thetestrequest.com/articles/1/comments/1.xml
Accepted data (JSON object)
Delete a Comment
NOTE - Response of this request is fake i.e. No data will be saved on server.
DELETE - https://thetestrequest.com/articles/1/comments/1.xml