So if you are looking for a free public sample dummy rest API URL with XML response for testing purposes then you have come to the right place.

Sometimes we need a sample rest API with XML response for testing XML while developing an application. we have created a list of dummy free rest APIs for testing without authentication for a software developer for demo purposes you can use consume it in your application. and let you know that all endpoints are ajax enable.

Sample rest api with xml response

Api Base Url- http://restapi.adequateshop.com

  1. /api/Traveler?page=1(Get all Traveler with pagging)
  2. /api/Traveler/14841(Get Traveler detail by Id)
  3. /api/Traveler (Create Traveler i.e make an entry in database POST API)
  4. /api/Traveler/14841(Update Traveler Detail PUT API)
  5. /api/Traveler/14841 (DELETE Traveler by Id)

Get API

This API REST endpoint returns all Traveler data from the database. where ”page”– parameter is option field and API returns the maximum of 10 records per page.Open the below URL in the browser, you can see the response.

http://restapi.adequateshop.com/api/Traveler

GET api/Traveler?page=1
API Response

<TravelerinformationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DummyRestApi.Models">
                <page>6</page>
                <per_page>10</per_page>
                <total_pages>763</total_pages>
                <totalrecord>7624</totalrecord>
                <travelers>
                <Travelerinformation>
                <adderes>Badarpur, New Delhi, Delhi, India</adderes>
                <createdat>2020-05-31T17:03:54.9474996</createdat>
                <email>rakesh_singh_bisht@yahoo.co.in</email>
                <id>81</id>
                <name>Rakesh Singh Bisht</name>
                </Travelerinformation>
                <Travelerinformation>
                <adderes>USA</adderes>
                <createdat>2020-06-02T04:03:01.5222942</createdat>
                <email>fyizgcfray_1574354851@tfbnw.net</email>
                <id>82</id>
                <name>Harry Bushakson</name>
                </Travelerinformation>
                <Travelerinformation>
                <adderes>USA</adderes>
                <createdat>2020-06-02T05:08:58.672851</createdat>
                <email>sonam123@gmail.com</email>
                <id>84</id>
                <name>Sonam Sharma</name>
                </Travelerinformation>
                <Travelerinformation>
                <adderes>USA</adderes>
                <createdat>2020-06-02T05:14:40.7655781</createdat>
                <email>shreya.kumari4994@gmail.com</email>
                <id>85</id>
                <name>shreya</name>
                </Travelerinformation>
                <Travelerinformation>
                <adderes>USA</adderes>
                <createdat>2020-06-02T05:18:22.7652253</createdat>
                <email>ap.prak96@gmail.com</email>
                <id>86</id>
                <name>ap</name>
                </Travelerinformation>
                <Travelerinformation>
                <adderes>USA</adderes>
                <createdat>2020-06-02T12:56:51.9287121</createdat>
                <email>chandanjaishawal@gmail.com</email>
                <id>87</id>
                <name>AP</name>
                </Travelerinformation>
                <Travelerinformation>
                <adderes>USA</adderes>
                <createdat>2020-06-04T08:48:53.8471058</createdat>
                <email>295037348564302</email>
                <id>88</id>
                <name>Ajay Nagar</name>
                </Travelerinformation>
                <Travelerinformation>
                <adderes>USA</adderes>
                <createdat>2020-06-08T15:58:26.3844855</createdat>
                <email>ap.prak97@gmail.com</email>
                <id>89</id>
                <name>AP</name>
                </Travelerinformation>
                <Travelerinformation>
                <adderes>10281 Mission Gorge Rd, Santee, CA 92071, USA</adderes>
                <createdat>2020-06-09T14:04:12.9065286</createdat>
                <email>alexathomas1975@gmail.com</email>
                <id>90</id>
                <name>Alexa Thomas</name>
                </Travelerinformation>
                <Travelerinformation>
                <adderes>USA</adderes>
                <createdat>2020-06-10T17:12:53.4353615</createdat>
                <email>jennifermathis.89904@gmail.com</email>
                <id>91</id>
                <name>Jennifer Mathis</name>
                </Travelerinformation>
                </travelers>
</TravelerinformationResponse>

Get With Parameter or for getting single record

This API rest point endpoint returns all traveler detail by Id i.e we get single records from the database according to the id supplied.

http://restapi.adequateshop.com/api/Traveler/90

GETapi/Traveler/90
API Response

<Travelerinformation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DummyRestApi.Models">
                <adderes>10281 Mission Gorge Rd, Santee, CA 92071, USA</adderes>
                <createdat>2020-06-09T14:04:12.9065286</createdat>
                <email>alexathomas1975@gmail.com</email>
                <id>90</id>
                <name>Alexa Thomas</name>
                </Travelerinformation>

PUT API-

This endpoint response for put request, For updating the entity, you can use this endpoint, you need to pass the 3 parameters in the request body i.e nameemail, and adderes. 

http://restapi.adequateshop.com/api/Traveler/90

PUT http://restapi.adequateshop.com/api/Traveler/90
API Request

<Travelerinformation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <id>90</id>
                <name>Alexa uodate</name>
                <email>alexathomas1975@gmail.com</email>
                <adderes>10281 Mission Gorge Rd, Santee, CA 92071, USA</adderes>              
                </Travelerinformation>

API Response

<Travelerinformation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <id>90</id>
                <name>Alexa uodate</name>
                <email>alexathomas1975@gmail.com</email>
                <adderes>10281 Mission Gorge Rd, Santee, CA 92071, USA</adderes>
                <createdat>2020-06-09T14:04:12.9065286</createdat>
                </Travelerinformation>

POST API-

This endpoint response for a post request, For updating the creating, you can use this endpoint, you need to pass the 3 parameters in the request body i.e nameemail, and adderes. 

http://restapi.adequateshop.com/api/Traveler

POSTapi/Traveler
API Request

<?xml version="1.0"?>
<Travelerinformation>
                <name>John</name>
                <email>john344@gmail.com</email>
                <adderes>Usa</adderes>
</Travelerinformation>

API Response

<Travelerinformation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <id>17351</id>
                <name>John</name>
                <email>john344@gmail.com</email>
                <adderes>Usa</adderes>
                <createdat>2022-01-25T14:00:28.7504065Z</createdat>
</Travelerinformation>

DELETE API

This endpoint response for a delete request,this is a delete endpoint to delete the traveler object in the database

http://restapi.adequateshop.com/api/Traveler/17351

DELETE/api/Traveler/17351
API Response

<Travelerinformation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <id>17351</id>
                <name>John</name>
                <email>john344@gmail.com</email>
                <adderes>Usa</adderes>
                <createdat>2022-01-25T14:00:28.7504065</createdat>
                </Travelerinformation>

*Thank you so much if you have a question please comment

Basic Concept of XML

There are many people who are fond of learning web designing and if you also want to make a career in web designing, then you need to learn html, css and xml language. We have already told about Html, Css. Today you will learn about xml.

Xml is a machine language also known as markup language. It was developed to meet the limitations of HTML. Designed to store and transfer data from XML.

Here are some basic information of xml, what is xml below, the full form of xml and also the information related to xml has been given. Must read the post till the end.
XML means extensible markup language. As the name suggests, it is an extensive form of markup language. That is, XML is a coding language that is used to create web pages.

As you know, HTML is used to create the structure or layout of web pages. With HTML, we are not able to store any kind of data. To overcome similar limitations of HTML, XML language was developed by W3C (World Wide Web Consortium) in 1996.

XML is a markup language that allows data to be stored and data transferred.

With the help of XML, we are able to store any kind of data and also transfer data from one web page to another very easily. That is, xml is also used as a database.

Xml can also be used by combining it with html which is called X-HTML.

Why was XML developed?

Before the advent of XML, HTML was used as a markup language. But the features of html are limited. For example, html supports only predefined tags. html does not provide any kind of data store facility.

XML has been developed by the W3C to overcome these limitations of HTML. Xml provides the facility to create tags by itself, so that there is no hassle of remembering the tags.

At the same time, they provide the facility to store and transfer data. Today very big websites are also using application xml to store data.

Uses of xml

  • XML is also used to transfer data from one web page to another.
  • XML allows you to create tags by yourself, which are their own defined.
  • Many organizations also use html as a database.
  • Xml organizes data structurally so that the root of html is able to display those data in the order of need.
  • Dynamic content can be created using XML. By which you can access those data even without a database.
  • Stored in XML Data can be represented in different formats, with different stylesheets.
  • XML is used to store the data.

Advantages of XML

  • It is very easy to learn XML code. Because in this very few tags, syntax and rules have to be remembered.
  • No extra software or tools are needed to write XML code. It can also be coded using any kind of text editor like notepad.
    The tags of xml have their own defined, due to which there is no need to remember the extra tag.
  • Data in XML can be stored in the form of a structure so that the data can be displayed according to its need.
  • Xml code is readable by both humans and machines.
  • It makes data sharing even easier.
  • Xml any language like php, java, asp supports almost every programming language.

Disadvantage of xml

  • It is necessary to end after opening the xml tag. Otherwise an error comes in the program.
  • Xml tags are user defined so that other users can have problems in understanding and modifying that code.
  • They do not support the data type.
  • No browser understands the XML language. Xml files depend on html to display the data.

By the way, the Default Option remains in the laptop or computer, to open the Xml file, we can open it without installing any software, in which the software like Notepad, Wordpad, are already installed so that we can easily access the Xml file. You can open or edit, let’s know about it.

  • First of all, select your Xml file.
  • Now right click your mouse and click on Open With.
  • Now select Notepad, Wordpad Software.
  • Your XML file must have been opened, now you can copy or edit it.

how to open xml file in adnroid mobile

In Android Mobile, we do not get any such software or App Default so that we can edit or open XML file, for this we have to download an app from Play Store which is named Xml Editor after installing it Can Edit and Open Xml File in Android Phone

The post Free Online Sample XML API for Testing Purpose appeared first on Software Development | Programming Tutorials.



Read More Articles