Which SFDC API Is Right for You?
As even their name suggests, SFDC APIs (Salesforce Dot Com application programming interfaces) act as an intermediary between your organization’s information and Salesforce’s cloud-based system. Depending on the objects that need to be handled, you can choose one or more APIs from the 10 that are currently available. As you will soon notice, SOAP (Simple Object Access Protocol) and REST (Representational State Transfer) APIs form the foundation that most of the others are based on.
What Sets SOAP and REST Apart?
While both SOAP and REST are web service architectures typically used for real-time integrations, they take different approaches, as they:
- Are based on different technologies
- Support different data formats
- Are preferred for different types of services
More specifically, SOAP works over HTTPS (and several other protocols that are not applicable in Salesforce’s case), relies on WSDL (Web Service Definition Language), handles data only in the XML format and works best for services within the enterprise.
In comparison, REST only works over HTTPS. It is based on URI (Uniform Resource Identifier), supports JSON in addition to XML, and is usually the API of choice for services that are part of mobile apps and web projects. The reason behind this is that JSON is a lightweight data-interchange format that enables apps to run smoothly.
REST and SOAP are both synchronous interfaces, meaning that they block the caller until the work is completed. Asynchronous APIs, such as some of the ones listed below, do not block the caller and need a callback that’s executed as soon as the task is done.
What about the Other SFDC APIs?
SOAP and REST are quite versatile, but they do have their limitations, and that’s where the other APIs come into play. Let’s see what each of them can do best and when exactly they could come in handy.
Bulk API, an asynchronous application programming interface based on REST, proves useful when processing large numbers of records. REST itself cannot handle more than a million records, but this is not a limitation for Bulk API, which can not only process them, but even do it in a timely fashion.
Unlike SOAP, which accesses data and processes records, the asynchronous SOAP/WSDL-based Metadata API handles customizations in your organization and creates tools that manipulate the metadata model.
Apex REST API is a synchronous interface that relies on REST. Because it can also handle custom data formats besides JSON and XML, it’s useful for building custom JSON responses. In addition, Apex REST API is able to expose Apex classes as RESTful Web services.
The SOAP/WSDL-based synchronous Apex SOAP API creates custom SOAP Web services in Apex and exposes Apex classes as SOAP Web services, thus enabling you to build XML responses.
Tooling API is a synchronous interface that builds custom development tools for SFDC. You should look into this one if you want to augment the functionality of your existing integration and development tools.
Chatter REST API is a synchronous interface that relies on REST to access Chatter feeds, as well as social data including users, followers, groups and files. Bear in mind that Chatter REST API processes photos asynchronously.
Streaming API gives you access to a stream of data that mirrors the changes in your organization’s data. Unlike the previous APIs, this doesn’t use neither SOAP or REST as a protocol
Data.com API takes advantage of the Data.com Prospector and Data.com Clean to inform you of any account and contact information changes in real-time.
As you can see, each SFDC API serves a different purpose. To choose one, you need to consider the actions that you need to perform and the data that you wish to access. You should also take into account criteria such as the number of records and the access speed.
Your Context Dictates which SFDC API to Use
SFDC APIs are tremendously helpful when it comes to manipulating records or your company’s data, in general. As any other aspect related to Salesforce, these interfaces are well-documented and you can learn everything about them, if you are willing to invest the time. On top of that, configuring each API to fit your needs and your company’s volume of data might prove challenging, at least in the beginning. In such scenarios, being assisted by a team of experts might be your best bet.
Are you having a hard time deciding which SFDC API matches your needs? We can help you make the right choice based on your specific context. Get in touch with us to find out more!