REST vs SOAP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2023 02:50 AM
REST or SOAP, which is more efficient, why ?
What are the limitations on using REST API ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2023 02:58 AM
Hi @Ramkumar Thanga ,
Please refer to the replies on these threads:
If my answer has helped with your question, please mark it as correct and helpful
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2023 03:10 AM
Hello @Ramkumar Thanga
Greetings!
In ServiceNow context, REST is considered more efficient than SOAP.
REST APIs offer more flexibility in terms of choosing data formats. ServiceNow REST APIs allow the use of JSON, XML, or even binary formats, depending on the requirements. This flexibility enables efficient data transmission and parsing.
ServiceNow allows developers to interact with its various modules, such as incident management, service catalog, and reporting, using REST APIs. (example OOB scripted rest apis are Cart API, Catalog API, HR Case API).
However, if you need to integrate with older systems that only support SOAP, then SOAP may be the only option.
You can also refer similar question answered here:
Help others to find a correct solution by marking the appropriate response as correct answer and helpful!!
Kind Regards,
Ravi Chandra.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2023 03:43 AM
Hi @Ramkumar Thanga ,
Hope you are doing great.
When comparing the efficiency of REST and SOAP, it's important to consider the specific requirements and constraints of your IT asset management system. Both protocols have their own advantages and considerations:
REST: It is known for its simplicity, scalability, and lightweight nature. It utilizes standard HTTP methods such as GET, POST, PUT, and DELETE to perform operations on resources. REST is widely adopted and favored for its ease of use and compatibility with web-based applications. It is suitable for scenarios where lightweight communication and fast response times are crucial.
SOAPis a more complex protocol that employs XML-based messages for communication. It provides a standardized approach to web service communication, offering features such as built-in error handling, security, and message validation. SOAP is typically used in enterprise-level applications that require advanced functionality and strict adherence to standards.
Regarding the limitations of using the REST API in ServiceNow, it is essential to be aware of the following points:
Limited functionality: While the REST API in ServiceNow provides extensive capabilities, there may be certain advanced features or functionalities that are only available through other interfaces like SOAP or Scripted APIs.
As with any API, proper security measures need to be implemented to safeguard sensitive data. ServiceNow offers authentication and authorization mechanisms to protect REST API access and ensure data integrity.
It's important to ensure that the REST API version being used aligns with the ServiceNow instance version. Compatibility issues may arise if there are significant differences between versions.
Depending on the complexity and volume of requests, there might be performance implications when using the REST API. Proper optimization techniques, such as pagination and efficient data retrieval, should be implemented to mitigate these impacts.
While REST is generally favored for its lightweight nature and ease of use, SOAP may be more suitable for enterprise-level applications requiring advanced functionality and standardized communication.
Regards,
Riya Verma