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://restapi.adequateshop.com
Api List-
Users
- /api/users?page=1
- /api/users/7075 (Get user by Id)
- /api/users (Create User object POST API)
- /api/users/7075 (Update User Object PUT API)
- /api/users/7075 DELETE user by Id
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.
if you are looking sample rest api url for testing without authentication then please follow below link
User Registration API-
http://restapi.adequateshop.com/api/authaccount/registration
{ "name":"Developer", "email":"Developer5@gmail.com", "password":123456 }
API Response
{ "$id": "1", "code": 0, "message": "success", "data": { "$id": "2", "Id": 7075, "Name": "Developer", "Email": "Developer5@gmail.com", "Token": "3030401c-c5a5-43c8-8b73-2ab9e6f2ca22" } }
If email already in use then API Response
{ "$id": "1", "code": 1, "message": "The email address you have entered is already registered", "data": null }
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.
http://restapi.adequateshop.com/api/authaccount/login
{ "email":"Developer5@gmail.com", "password":123456 }
API Response
{ "$id": "1", "code": 0, "message": "success", "data": { "$id": "2", "Id": 7075, "Name": "Developer", "Email": "Developer5@gmail.com", "Token": "02b869e4-ea45-4b5c-b764-642a39e95bb7" } }
If email or password is wrong then API Response
{ "$id": "1", "code": 1, "message": "invalid username or password", "data": null }
Calling Rest Api with Authentication
As we mention the bearer token authentication method for validating the API Request. So you need to set the Authorization header for calling the secure API otherwise you will get the 401 authentication error.
Header-
headers: { 'Authorization': 'Bearer <token>' }
Get All Users
This API returns all users in the organization
http://restapi.adequateshop.com/api/users?page=1
API Response
{ "$id": "1", "page": 1, "per_page": 10, "totalrecord": 2812, "total_pages": 282, "data": [ { "$id": "2", "id": 1, "name": "ashish thapliyal", "email": "Ashulive6123@gmail.com", "profilepicture": "https://www.adequatetravel.com/ATMultimedia/Images/1a30600f-3b07-4797-b883-981b455f2e84.png", "location": "USA", "createdat": "2020-04-26T12:21:05.7103885" }, { "$id": "3", "id": 2, "name": "Anand Prakash", "email": "prak.anand95@gmail.com", "profilepicture": "https://www.adequatetravel.com/ATMultimedia//Images/userimageicon.png", "location": "USA", "createdat": "2020-04-26T12:21:42.8669234" }, { "$id": "4", "id": 3, "name": "Anand Prakash", "email": "1661677300651859", "profilepicture": "https://www.adequatetravel.com/ATMultimedia//Images/userimageicon.png", "location": "USA", "createdat": "2020-04-26T12:23:38.8303108" }, { "$id": "5", "id": 5, "name": "Neeraj Singh", "email": "neirajsingh101@gmail.com", "profilepicture": "https://www.adequatetravel.com/ATMultimedia/Images/c1c163c4-5972-42df-b128-c535ca3c1035.png", "location": "USA", "createdat": "2020-04-26T14:32:19.2965268" }, { "$id": "6", "id": 6, "name": "Vikash Kumar Shah", "email": "adktest12@gmail.com", "profilepicture": "https://www.adequatetravel.com/ATMultimedia//Images/userimageicon.png", "location": "USA", "createdat": "2020-04-26T15:02:16.6330683" }, { "$id": "7", "id": 7, "name": "Raju Prasad", "email": "raju.nsit@gmail.com", "profilepicture": "https://www.adequatetravel.com/ATMultimedia/Images/5e914f8f-7eb7-4895-838f-09e0fe4afda1.png", "location": "Delhi Noida Direct Flyway, New Friends Colony, New Delhi, Delhi 110024, India", "createdat": "2020-04-26T15:44:01.3315904" }, { "$id": "8", "id": 8, "name": "Adequate Infosoft", "email": "contact@adequateinfosoft.com", "profilepicture": "https://www.adequatetravel.com/ATMultimedia//Images/userimageicon.png", "location": "USA", "createdat": "2020-04-26T17:17:15.2711201" }, { "$id": "9", "id": 9, "name": "Ashok Patel", "email": "ashokpatel457@gmail.com", "profilepicture": "https://www.adequatetravel.com/ATMultimedia/UserProfileCover/9/11ee4354-89d5-48c2-8edc-900e0d5fa93f.png", "location": "Noida, Uttar Pradesh, India", "createdat": "2020-04-26T17:17:47.4475925" }, { "$id": "10", "id": 10, "name": "Vikash Shah", "email": "1564091363743796", "profilepicture": "https://www.adequatetravel.com/ATMultimedia//Images/userimageicon.png", "location": "USA", "createdat": "2020-04-26T17:31:22.4311495" }, { "$id": "11", "id": 11, "name": "Brigette Jewell", "email": "brigettejewell.90897@gmail.com", "profilepicture": "https://www.adequatetravel.com/ATMultimedia//Images/userimageicon.png", "location": "USA", "createdat": "2020-04-26T18:42:50.4394587" } ] }
Get user by Id
GET: /api/users/7075 It will return user with id=2 in the database
http://restapi.adequateshop.com/api/users/7075
{ "$id": "1", "id": 7075, "name": "Developer", "email": "Developer5@gmail.com", "profilepicture": "https://www.adequatetravel.com/ATMultimedia//Images/userimageicon.png", "location": "USA", "createdat": "0001-01-01T00:00:00" }
Create User object API-
You need to pass the three parameters in the request body i.e name, email, and location. In response, you will able to get the user detail.
http://restapi.adequateshop.com/api/users
{ "name":"traveler", "email":"traveler@gmail.com", "location":"USA" }
API Response
{ "$id": "1", "id": 7076, "name": "traveler", "email": "traveler@gmail.com", "profilepicture": "https://www.adequatetravel.com/ATMultimedia//Images/userimageicon.png", "location": "USA", "createdat": "2021-10-14T12:05:59.7235182Z" }
Update User Object API-
This endpoint is used to update the user object, the You just to pass the user object in the request body. and In response, you will able to get the user detail.
http://restapi.adequateshop.com/api/users
{ "id": 7076, "name":"traveler change name", "email":"traveler@gmail.com", "location":"USA" }
API Response
{ "$id": "1", "id": 7076, "name": "traveler change name", "email": "traveler@gmail.com", "profilepicture": "https://www.adequatetravel.com/ATMultimedia//images/userimageicon.png", "location": "USA", "createdat": "2021-10-14T12:05:59.7235182" }
DELETE user by Id
This API end point delete the user object in the database
http://restapi.adequateshop.com/api/users
{ "$id": "1", "id": 7076, "name": "traveler change name", "email": "traveler@gmail.com", "profilepicture": "https://www.adequatetravel.com/ATMultimedia//Images/userimageicon.png", "location": "USA", "createdat": "2021-10-14T12:05:59.7235182" }
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.
The post Sample Rest Api Url For Testing With Authentication appeared first on Software Development | Programming Tutorials.
Read More Articles
- Write a value which contain comma to a CSV file in c#?
- Reading CSV File with cells containing commas c#
- Split CSV with columns may contain ‘,’ Comma C#
- [Simple Way]-Cascading DropDownList in Asp.Net Mvc Using Jquery Ajax
- [Simple Way]-How to get data from database using JQuery Ajax in asp net MVC
- [Simple Way]-ASP.NET Core Upload Multiple File Web API model
- [Simple Way]- Image Upload in .NET Core Web API
- [Easy Way]-Receive File and other form data together in ASP.NET Core Web API
- Replace image in word document using C#
- How to add new rows to an existing word document table in C#
- How do I use C# REST API HttpClient for both Basic header authentication and for default AD credentials?
- Azure Active Directory Authentication with and Existing App which is using Identity framework for user authentication. Using ADAL or Web Api
- Azure AD with Bearer token authentication for Web API not working throwing error as "Authorization has been denied for this request."
- c#, Given a webapp with REST API & want to add websockets that each REST API could interact with, where define ClientManager for global access?
- Zendesk REST API Url for articles returning data in Browser, but giving unauthorized error in Visual Studio
- .net core console app calling PHP rest API with basic authentication
- Using Visual Studio 2017 Load Testing to test rest API with different request bodies
- Authentication failed for bucket "Bucket Name" for CouchbaseServer with Web Api
- Put Append Block operation with Blob Service Rest API - 403 Authentication failure
- Best practice when sending Logindata for REST Api
- How I can write string for default value with fluent api in SQL Server
- Using Azure token from WAM/MSAL for authentication to custom API
- Directline - C# API REST - Continue with a bot conversation when the flow leaves the API
- Set lease for build with Azure DevOps API in C#
- Fake authentication and authorization for testing asp.net core app
- Why do I keep getting "Missing/Malformed URL Parameters" when consuming my API in C# (RestSharp) with VS 2022?
- Parsing problem while testing API Services with Moq
- How to encode a stream (filestream of a file (pdf, ppt etcc.) from s3 bucket) to base64string in python for sending across network using Rest API
- Hangfire Not Getting Configurations when I try to run Test Case for the method containing hangfire activation .net Core REST Web API
- Blazor page's URL is interfering with component's call to API -- 400-Bad Request
- Mock Refit SDK injection with a Mock HttpClient for Integration Testing
- Amazon Cognito Authentication for FileMaker Data API
- How to add authorization with per-item based permissions to REST API endpoints in ASP.NET Core
- How to perform SOAP API client call via X509Certificate2 with 2-way mutual authentication in C#
- .NET 6 Web API with Bearer Authentication returns 401 when using the [Authorize] Attribute
- What is the process for adding Groups to an existing type in Kontent Management API v2 with C#?
- Get rest API data and save them into SQL Table with C#
- ASP.NET Core DateTime Rest API with Javascript converts to UTC instead of java
- Setting headers in HttpClient for authorizing a rest api
- Login Authentication failing for Asp.net MVC and Wordpress sites on windows server 2019 with Plesk Obsidian
- Use AOP in C# to detect if return value is used
- C# linq how to build expandoobjects into a list?
- Add members to Outlook GAL Distribution List using C# in a Console app
- Unregister a PRISM Region from the RegionManager
- continue processing when web page loading is finished how can I do it?
- Running JS or JQ using execScript always throws syntax error in mshtml
- Type of concrete class in base class with generic in c#
- Dynamically generated checkbox always has Checked==False on postback
- Make a WriteableBitmap Transparent in Windows Phone 8.1 C# WinRT Programmatically
- Bad Request accessing Web API from Xamarin.Forms
- Windows Phone XAP Obfuscation with ConfuserEx
- UWP App proc.Start() Unable to Find the File Specified C#
- Relationship with [NotMapped] and [Keyless] ends up with NULL object in aspnet core
- Is there a way to stop audio on Android when my app crashes or hangs?
- updating existing ParseUser properties
- Is StoreId of an Outlook Store globally unique?
- Why can't VSCode's C# extension find dotnet?
- vs2008 c#: Facebook very simple beginner application
- Get elements from child class
- How can I make some objects to move between waypoints?