DEV Community

Discussion on: A Beginner's Guide To Understand Application Programming Interface.

Collapse
 
paulineoraro profile image
Pauline Oraro

-REST APIs are not always required to use JSON as their data format.
-REST APIs can use various data formats, including: JSON, XML, HTML, YAML,plain text
-JSON is the most commonly used data format for REST APIs due to its simplicity, readability, and wide support in programming languages. However, it's not a requirement for REST.
-SOAP APIs typically use XML as their data format.

Collapse
 
khairunnisaas profile image
Khairunnisaas

If you can also use XML format for SOAP API then what is the difference between SOAP API and REST API? Sorry if this is a dumb question, i just still didn't know much about API.

Thread Thread
 
paulineoraro profile image
Pauline Oraro

SOAP is a protocol with strict standards and is typically used for enterprise-level applications, while REST is an architectural style that relies on HTTP methods and is commonly used for public APIs and web services.