Term REST refers to Representational State Transfer which is a set of functions and thus helps developers in making requests along with receiving responses. In Rest API interaction is made with HTTP protocol and in a very short time, it becomes a productive standard for API creation.

SOAP Rest API
SOAP is a protocol and specially designed with a specification. It is an architectural style that doesn’t follow any strict standards but follows some constraints.
Soap only uses XML for exchanging information and data. In Rest API it’s the choice of implementer which data format he/she wants to use such as JSON, Plain-Text, and HTML.
For Security, SOAP use SSL and WS-security and is preferred for the bank account password, card number, etc. It has SSL and HTTPS for security.
SOAP is not generally preferred but used in cases where more reliability and stateful data transfer requires. It is most preferred by developers as it provides more maintainability and scalability.
BY Best Interview Question ON 18 Dec 2021