Sample Rest Api Url For Testing With Authentication

Sample Rest Api Url For Testing With Authentication

Are you looking for a sample dummy rest JSON API for testing in postman with dummy data to test while implementing or developing a mobile app or Web Application? then you have come to the right place, we have a list of free API for developers, testers.
we have a list of dummy rest API with authentication for practice and demo purposes you can use it.

Api Base Url-http://virtualsolution.adequateshop.com:168

User Registration API

Below is the Request/Response of the sample user registration API. we have also attached the screenshot of the Request/Response of the postman.

You need to pass the three parameters in the request body i.e name, email, and password. After Successful registration, In response you will able to get user detail including auth token. you can use the token for calling secure API.

We using we are using the bearer token authentication method for validating the API Request.

POST-/api/Account/Registration
API Request

{

"Name":"Rahul Developer",
"Email":"test@gmail.com",
"Password":123456
}

API Response

{

"Id": 0,
"Name": "Rahul Developer",
"Email": "test1@gmail.com",
"Token": "9969f28b-c361-4eac-9c52-e6e1d35f657c",
"Password": null,
"code": 200,
"message": "user registered successfully"
}

User Registration API-1

User Login API-

You need to pass the two parameters in the request body i.e name and password. After Successful User Login, In Api response you will able to get user detail including auth token. you will use this token for calling secure API.
POST/api/Account/Login
API Request

{
"Email":"test1@gmail.com",
"Password":123456
}

API Response

{
"Id": 0,
"Name": "Rahul Developer",
"Email": "test1@gmail.com",
"Token": "9969f28b-c361-4eac-9c52-e6e1d35f657c",
"Password": null,
"code": 200,
"message": "success"
}

User Login API-2

Calling Rest Api with Authentication

As we mention the bearer token authentication method for validating the API Request. So need to set the Authorization header for calling the secure API otherwise you will get the 401 authentication error.

Header-

headers: {
'Authorization': 'Bearer <token>'
}

Calling Rest Api with Authentication-3

Cretae EmployeeEntities API-

You need to pass the three parameters in the request body i.e EmployeeName, EmployeeSalary, and Adress.
In response, you will able to get the Employee detail.

POST/api/EmployeeEntities/
API Request

{
"EmployeeName":"John",
"EmployeeSalary":20000,
"Adress":"Amsterdam, Netherlands"
}

API Response 201 created

{
"Id": 2,
"EmployeeName": "John",
"EmployeeSalary": 20000,
"Adress": "Amsterdam, Netherlands"
}

Cretae EmployeeEntities API-4

Update EmployeeEntities API-

PUT/api/EmployeeEntities?id=2
This endpoint is used to update the EmployeeEntities object, the You just to pass the EmployeeEntities object in the request body.In response, you will able to get an updated Employee detail.

API Request

{
"Id": 2,
"EmployeeName": "John Updtae",
"EmployeeSalary": 50000,
"Adress": "Amsterdam, Netherlands"
}

API Response- 200 Ok

{
"Id": 2,
"EmployeeName": "John Updtae",
"EmployeeSalary": 50000,
"Adress": "Amsterdam, Netherlands"
}

Update EmployeeEntities API-5

Get All employees

GET: api/EmployeeEntities
It will return employees in the database

API Response

[
{
"$id": "1",
"Id": 1,
"EmployeeName": "Connor",
"EmployeeSalary": 20000,
"Adress": "Amsterdam, Netherlands"
},
{
"$id": "2",
"Id": 2,
"EmployeeName": "John Updtae",
"EmployeeSalary": 50000,
"Adress": "Amsterdam, Netherlands"
}
]

Get All employees-6

Get employee by Id

GET: /api/EmployeeEntities?id=2
It will return all employee with id=2 in the database

{
"$id": "1",
"Id": 2,
"EmployeeName": "John Updtae",
"EmployeeSalary": 50000,
"Adress": "Amsterdam, Netherlands"
}

DELETE employee by Id

DELETE:/api/EmployeeEntities?id=2
It will delete the employee with id=2 in the database

{
"Id": 2,
"EmployeeName": "John Updtae",
"EmployeeSalary": 50000,
"Adress": "Amsterdam, Netherlands"
}

If you have any query please comment.

Some Basic Concept of Api

We all have heard about the API, but there will be many of us who will not know about the API. If you are interested in learning about computer programming language or software development, then you must know about API.

API is a software code that helps to communicate different software programs. As we get to know a lot more about it by its name, the Application Programming Interface means that the system programming the application, overall the API is a system through which our Application communicate.

So today I thought that I will give you detailed information about the API so that you do not face any problem regarding the API. So without delay let’s know what is API and what are its benefits.

if we run an application on our phone or computer, then when the application connects to the Internet Or, then it sends data to a server. The server receives that data acts on it, do whatever work you want, and then sends that data back to your phone or your computer.

All this work is done through an API. That task of any application without API is difficult.

Let us understand through a simple example.

Suppose you have gone to a restaurant to eat food, then you will have a menu from which you can choose what to eat. Now if you order a pizza, a waiter will come, he will go to the kitchen and the person who is working in the kitchen will make pizza, then that waiter will come to you and give you pizza.

In this example, the waiter is working is between us and the kitchen people. In this case, The pizza is an application that we start and then the waiter is the API that takes our data to a server, and then when the data we want is ready, then take it to us. Comes back on our phone or computer.

In computer language, API is a way through which he can provide him a medium while developing App through which he can operate easily and give a good experience to the user.

In simple language, it is a communication medium between many software systems. A good API facilitates the application’s communication medium with its speed. That is, it works more quickly, for example, you can see that some applications have good speed and some do not.

API has many types, all types perform different tasks according to individual. Different companies work on their API as per their requirement. Today I will tell you about different types of APIs.it varies depending on a different method, we are showing you the types of APIs depending on the procedure.

1. Procedural:

To complete the special work of this app, the handler of the software i.e. the one who is handling it, goes to the server.

It is mainly provided with a common interface to open a file to the function from its function, then we can do any work through that open fail. Procedural APIs are handled entirely by RPC Implementations.

2. Object-Oriented:

This API is a way to do the difficult tasks in System objects and to make them accessible to the server, it can carry the maximum load.

This API system is faster and more powerful than many other API systems. It also works in the public like many sites and software hits that everyone does, such as the low-grade Search Engines.

3. Service Oriented:

This API where many of the protocols are responsible for making the services and functions that we do through our application, to make them accessible to the server, ie the activities that we do to them Returns the result. This is usually in the merchant department i.e. Shopping, Discount Apps, and Sites. Like Amazon.

4. Resource-Oriented:

By the name of this API, it is known what its name is. As we know that resource means ‘resource’. It also works like this.

When we run software or application, when that API collects our data, it takes it directly to the server. This API uses big companies who want to be completely secure. Expensive web hostings also use this API.

As we know that technology is changing the world, in this way technology like API is also changing, so if the API has to stay in this world for a long time, then its builders will have to make changes according to it. so that it will become even better and people will start using it more.

Since APIs are able to save their time and money to a large extent, I feel that the future of the API is very bright, but its creators will have to constantly change it according to the time and need, otherwise, the day is not far when New technology will take its place.

I sincerely hope that I have given you complete information about what the API is and I hope you all have understood about the Application Programming Interface.

Ashok Patel

I'm an electronic engineer working in a multinational company,having good experience on Electronics and electrical engineers design and oversee production of electronic equipment such as radios, televisions, computers, washing machines and telecommunication systems.I like to do RND and Research.I also have hands on experience graphic design software and in web designing having great command on ASP.NET, HTML5, JavaScript, T-SQL, JQuery.

Add comment

Your Header Sidebar area is currently empty. Hurry up and add some widgets.