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://samplerestapi.com

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

Get API

This API REST endpoint returns all Petslover 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://samplerestapi.com/api/petslover

GET api/petslover?page=1
API Response
<PetsLoverInformationResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <page>1</page>
        <per_page>10</per_page>
        <totalrecord>14740</totalrecord>
        <total_pages>1474</total_pages>
        <travelers>
        <PetsloverInformation>
        <id>17239</id>
        <name>vinee</name>
        <email>[email protected]</email>
        <adderes>USA</adderes>
        <createdat>0001-01-01T00:00:00</createdat>
        </PetsloverInformation>
        <PetsloverInformation>
        <id>13814</id>
        <name>RDLKAUT36</name>
        <email>[email protected]</email>
        <adderes>BE</adderes>
        <createdat>2021-12-17T07:39:41.8449975</createdat>
        </PetsloverInformation>
        <PetsloverInformation>
        <id>275801</id>
        <name>id-rilhlzp</name>
        <email>[email protected]</email>
        <adderes>Shanghai</adderes>
        <createdat>2023-10-12T20:40:17.3344701</createdat>
        </PetsloverInformation>
        <PetsloverInformation>
        <id>267312</id>
        <name>2023???140932_006</name>
        <email>[email protected]</email>
        <adderes>USA</adderes>
        <createdat>2023-09-14T18:32:42.1328906</createdat>
        </PetsloverInformation>
        <PetsloverInformation>
        <id>17484</id>
        <name>Ramesh</name>
        <email>[email protected]</email>
        <adderes>India</adderes>
        <createdat>2022-01-29T06:05:15.5940364</createdat>
        </PetsloverInformation>
        <PetsloverInformation>
        <id>12660</id>
        <name>Quy test</name>
        <email>[email protected]</email>
        <adderes>USA</adderes>
        <createdat>0001-01-01T00:00:00</createdat>
        </PetsloverInformation>
        <PetsloverInformation>
        <id>14534</id>
        <name>dhoni</name>
        <email>[email protected]</email>
        <adderes>Punjab</adderes>
        <createdat>2021-12-28T07:39:40.298778</createdat>
        </PetsloverInformation>
        <PetsloverInformation>
        <id>17298</id>
        <name>vinee</name>
        <email>[email protected]</email>
        <adderes>USA</adderes>
        <createdat>0001-01-01T00:00:00</createdat>
        </PetsloverInformation>
        <PetsloverInformation>
        <id>276008</id>
        <name>Sameer</name>
        <email>[email protected]</email>
        <adderes>USA</adderes>
        <createdat>2023-10-13T19:36:59.8124831</createdat>
        </PetsloverInformation>
        <PetsloverInformation>
        <id>272127</id>
        <name>Assf29</name>
        <email>Satya321319</email>
        <adderes>USA</adderes>
        <createdat>2023-09-29T07:31:35.3457451</createdat>
        </PetsloverInformation>
        </travelers>
</PetsLoverInformationResponse>

Get With Parameter or for getting single petslover 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://samplerestapi.com/api/petslover/17239

GETapi/api/petslover/17239
API Response
<PetsloverInformation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <id>17239</id>
    <name>vinee</name>
    <email>[email protected]</email>
    <adderes>USA</adderes>
    <createdat>0001-01-01T00:00:00</createdat>
</PetsloverInformation>

PUT Update 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://samplerestapi.com/api/petslover/17239

PUT http://samplerestapi.com/api/petslover/17239
API Request
<PetsloverInformation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <id>17239</id>
    <name>vinee gupa</name>
    <email>[email protected]</email>
    <adderes>USA California</adderes>
</PetsloverInformation>

API Response

<PetsloverInformation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <id>17239</id>
    <name>vinee gupa</name>
    <email>[email protected]</email>
    <adderes>USA California</adderes>
</PetsloverInformation>

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://samplerestapi.com/api/petslover

POSTapi/petslover
API Request
<PetsloverInformation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <name>Rajan Patel</name>
    <email>[email protected]</email>
    <adderes>Indai Gujrat</adderes>
</PetsloverInformation>

API Response

<PetsloverInformation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <id>319720</id>
    <name>Rajan Patel</name>
    <email>[email protected]</email>
    <adderes>Indai Gujrat</adderes>
    <createdat>2024-03-08T11:19:18.008376Z</createdat>
</PetsloverInformation>

DELETE API

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

http://samplerestapi.com/api/petslover/319720

DELETE/api/petslover/319720
API Response
<ResposneData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Message>Record deleted successfully!</Message>
</ResposneData>

*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