0% found this document useful (0 votes)
2 views10 pages

Upload 7

Reqres is a hosted REST-API that allows developers to test their front-end applications with real responses and various HTTP methods (GET, POST, PUT, DELETE) without the need for tedious sample data creation. It provides a simple interface for simulating user authentication and other scenarios, while ensuring data is not stored after being sent. Users can upgrade to a Pro version for unlimited requests and faster performance for a monthly fee.

Uploaded by

Narendra Kumawat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views10 pages

Upload 7

Reqres is a hosted REST-API that allows developers to test their front-end applications with real responses and various HTTP methods (GET, POST, PUT, DELETE) without the need for tedious sample data creation. It provides a simple interface for simulating user authentication and other scenarios, while ensuring data is not stored after being sent. Users can upgrade to a Pro version for unlimited requests and faster performance for a monthly fee.

Uploaded by

Narendra Kumawat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

GET FREE API KEY

Test your front-end against a real API

Fake data Real responses


Always-on

 
No more tedious Develop with real
24/7 free access in
sample data response codes.
your development
creation, we've got GET, POST, PUT &
phases. Go nuts.
it covered. DELETE supported.

A hosted REST-API ready to respond to your AJAX


requests.


Give it a try

UPGRADE TO PRO
GET

GET
LIST USERS

SINGLE USER
Response
200
Request



/api/users?page=2

GET SINGLE USER NOT {


"page": 2,
FOUND
"per_page": 6,
"total": 12,
GET LIST <RESOURCE> "total_pages": 2,
"data": [
{
GET SINGLE "id": 7,
<RESOURCE> "email": "michael.lawso
"first_name": "Michael"
"last_name": "Lawson",
GET SINGLE "avatar": "https://reqr
<RESOURCE> NOT },
{
FOUND
"id": 8,
"email": "lindsay.fergu
POST CREATE "first_name": "Lindsay"
"last_name": "Ferguson"
"avatar": "https://reqr
PUT UPDATE },
{
PATCH UPDATE "id": 9,
"email": "tobias.funke@
"first_name": "Tobias",
DELETE DELETE "last_name": "Funke",
"avatar": "https://reqr
},
POST REGISTER -
{
SUCCESSFUL "id": 10,
"email": "byron.fields@
"first_name": "Byron",
POST REGISTER -
"last_name": "Fields",
UNSUCCESSFUL "avatar": "https://reqr
},
{
POST LOGIN -
"id": 11,
SUCCESSFUL "email": "george.edward
"first_name": "George",

POST LOGIN - "last_name": "Edwards",


"avatar": "https://reqr
UNSUCCESSFUL },
{

GET DELAYED "id": 12,


"email": "rachel.howell
RESPONSE
"first_name": "Rachel",
"last_name": "Howell",
"avatar": "https://reqr
}
],
"support": {
"url": "https://contentcadd
"text": "Tired of writing e
}
}
It’s all in the details
 
Hosted on Heroku Language agnostic
Which means 99.99% A generic API that conforms
Uptime SLA. to REST principles and
All you need is the base accepts a content type of
URL, and you're away:
application/json

https://reqres.in/api/

Any endpoint that contains "


The API is CORS enabled, <resource>" can be
so you can make requests substituted with anything
right from the browser, no you supply, ie. "products",
matter what domain, or "accounts", etc..the API will
even from somewhere like just respond with various
JSFiddle or JSBin. Pantone colours.

Getting started

Check out the Swagger doc:


jQuery Native JavaScript

If you, for example, want to create If you've already got your own
a fake user: application entities, ie. "products",
you can send them in the endpoint
$.ajax({
url: "https://reqres.in/api/users",
URL, like so:
headers: { "x-api-key": "reqres-free-v1"
type: "POST", var xhr = new XMLHttpRequest();


data: { xhr.open("GET", "https://reqres.in/api/product
name: "paul rudd", xhr.onload = function(){
movies: ["I Love You Man", "Role Mode console.log(xhr.responseText);
}, };
success: function(response){ xhr.send();
console.log(response);
}
});

It would be impossible for Reqres


to know your application data, so
For which the response to this the API will respond from a sample
request will be... set of Pantone colour data

{ {
"name":"paul rudd", "data":{
"movies[]":[ "id":3,
"I Love You Man", "name":"true red",
"Role Models" "year":2002,
], "pantone_value":"19-1664"
"id":"243", }
"createdAt":"2014-10-18T12:09:05.255Z" }
}

It's entirely possible to get sample


You can see that the API has sent data into your interface in seconds!
us back whatever user details we
sent it, plus an id & createdAt key
for our use.

Still don't really get it...


 
Reqres is a real API Technical demos and
Reqres simulates real tutorials
application scenarios. If you If you're trying to
want to test a user demonstrate a front-end
authentication system, (JavaScript-based) concept,
Reqres will respond to a you don't really want the
successful login/register hassle of setting up an API,
request with a token for you or even a server (especially
to identify a sample user, or during a live workshop or
with a 403 forbidden demo).
response to an
unsuccessful You can just write your
login/registration attempt. HTML, CSS & JavaScript as
usual and send Reqres
A common front-end AJAX requests, which will
scenario that's easily respond with the expected
forgotten is loading states, response codes and output.
which can be easily
simulated through Reqres
by appending
?delay=<a number of seconds> to
any endpoint URL, which
will delay the API response
time. Animated loading GIFs
& SVGs at the ready!

Rapid prototyping of
interfaces
When prototyping a new
interface, you just want an
API there, with minimal
setup effort involved.
Normally, I'd point people,
who aren't too familiar with
backend programming, to
Sailsjs which can auto-
generate a REST-API for you
from the command line.

However, you will need


Node.js installed and some
familiarity of how Node.js
works. If that sounds like
too much hassle and way
too daunting, Reqres is just
a URL. Sending it an AJAX
request is step 1...there is
no step 2.

Peace of mind


It might seem pretty weird to be sending your data to a 3rd party API, but I can assure
you, Reqres does not store any of your data at all. Once you send it to us, we just send it
straight back...and then it's gone!

Level-up your API

Heavy user? Go Pro for unlimited requests,


faster rate limits, and priority uptime.
UPGRADE → MANAGE SUBSCRIPTION

$9 / month · Cancel anytime

Advertising

Do you want to advertise your jobs/tools/software/cats through Reqres to millions of


developers every week? Click for more info [pdf] on the ads. Contact for pricing and
questions.

Looking for Pro features?

Need more than 100 requests per day? Want faster performance?

UPGRADE TO PRO - $9/MONTH

Made for developers and designers by Ben Howdle

You might also like