Skip to content

User Rest API where you can access hundreds of users information with online.

Notifications You must be signed in to change notification settings

Atakatom/FakeRestAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FakeRestAPI

You can use the API online from the link,

https://fake-rest-api-deploy.herokuapp.com/


Introduction


Welcome to the FakeRestAPI where you can find fake attributes about users. This documentation should help you familiarise yourself with the resources available and how to consume them with HTTP requests.


Getting started


Let's make your first API request to the FakeRestAPI!

I'll be using postman for examples as it displays responses nicely and gives us a whole lot more useful information.



The Base URL is the root URL for all of the API, if you ever make a request to FakeRestAPI and you get back a 404 NOT FOUND response then check the Base URL first.

This API let's you do all Create, Read, Update, Delete operations on USERS.


Attributes:

  1. full_name string -- The name and surname of a user.
  2. country string -- The country where the user is from.
  3. created_at date -- Full date of the time when the user's account is created.
  4. id string -- Unique id of that user.
  5. email string -- The email adress of that user.

  • CREATE


    POST a single user with the URL:

    https://fake-rest-api-deploy.herokuapp.com/users

    With the body:

    {
        "full_name" : "Atakan Yontar",
        "country" : "Turkey",
        "email" : "atakanyontar@gmail.com"
    }

    Example response:

    {
        "id": 1646155611621,
        "full_name": "Atakan Yontar",
        "country": "Turkey",
        "email": "atakanyontar@gmail.com",
        "created_at": "2022-03-01T17:26:51.621Z"
    }
    HTTP status: 200 OK

  • READ


    GET all of the users with to the URL:

    https://fake-rest-api-deploy.herokuapp.com/users/

    Example response:

    {
        "full_name": "Luisa Koelpin",
        "country": "Austria",
        "created_at": "2012-12-27T18:51:33.419Z",
        "id": 0,
        "email": "Lauriane_Dickens@derrick.us"
    
        ... with the rest of the users 
    }
    HTTP status: 200 OK

    GET the infomation of user with id:0 using the URL:

    https://fake-rest-api-deploy.herokuapp.com/users/0

    after users/, 0 can be any number and FakeRestAPI will tell you if such user exists or not.

    Example response:

    {
        "full_name": "Luisa Koelpin",
        "country": "Austria",
        "created_at": "2012-12-27T18:51:33.419Z",
        "id": 0,
        "email": "Lauriane_Dickens@derrick.us"
    }
    HTTP status: 200 OK

  • UPDATE


    Change the full_name & country of user 3 with the URL:

    https://fake-rest-api-deploy.herokuapp.com/users/3
    

    With the body:

    {
        "full_name": "Atakan Yontar",
        "country": "Turkey"
    }

    Example response

    {
        "full_name": "Atakan Yontar",
        "country": "Turkey",
        "created_at": "1996-02-27T17:42:21.329Z",
        "id": 10,
        "email": "Freddie@taylor.com"
    }
    HTTP status: 200 OK

  • DELETE


    Delete the user 3 with the URL:

    https://fake-rest-api-deploy.herokuapp.com/users/3

    Example response:

    {
        "message": "User is deleted!"
    }
    HTTP status: 200 OK

About

User Rest API where you can access hundreds of users information with online.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published