Learn about the APIs available on the Salesforce Platform.
The Salesforce Platform APIs offer a wide range of tools that allow you to integrate and extend Salesforce functionality. These APIs enable you to access, manipulate, and interact with your Salesforce data in various ways. Whether you want to create custom applications, automate business processes, or integrate with other systems, the Salesforce Platform APIs provide the flexibility and scalability to meet your needs.
Salesforce API-first approach to development
Salesforce adopts an API-first strategy for developing features on its platform. This entails building a strong API for a feature before concentrating on designing its user interface. This approach provides flexibility to Salesforce developers in manipulating their data as they desire. In addition, it allows Salesforce to develop user interfaces on top of the APIs, guaranteeing consistent behavior across them.
The Salesforce Data APIs consist of four different APIs: REST API, SOAP API, Bulk API, and Pub/Sub API. Their primary purpose is to allow you to manipulate your Salesforce data or subscribe to data changes. Other APIs are available for customizing page layouts or building custom development tools. Additionally, you can use other Salesforce APIs to manipulate specific subsets of your Salesforce data. For instance, the Analytics REST API is useful for working with Analytics data. However, these four APIs are widely applicable across the range of core Salesforce data.
REST API
The REST API is a robust and user-friendly web service that follows RESTful principles. It provides access to various Salesforce functionalities using REST resources and HTTP methods. These functionalities include creating, reading, updating, and deleting (CRUD) records, searching or querying data, retrieving object metadata, and accessing information about limits in your organization. REST API supports both XML and JSON formats.
Due to its lightweight request and response framework and ease of use, REST API is ideal for developing mobile and web applications.
SOAP API
SOAP API is a powerful and reliable web service that utilizes the industry-standard protocol of the same name. It employs a Web Services Description Language (WSDL) file to explicitly define the parameters for accessing data through the API. SOAP API is limited to XML only. However, most of its features are available through REST API as well. Which standard you choose depends on your specific requirements.
Because SOAP API relies on the WSDL file as a formal agreement between the API and the consumer, it is better suited for developing server-to-server integrations.
Bulk API
Bulk API is a RESTful API designed for handling large amounts of data in a single request. When we say large, we mean 50,000 records or more. It is asynchronous, so you can submit a request and check back later for the results. This makes it the ideal choice for managing huge amounts of data. There are two versions of Bulk API (1.0 and 2.0). Although both versions can handle large amounts of data, we use Bulk API 2.0 in this module because it is simpler to use.
Bulk API is particularly useful for complex tasks that involve a significant amount of data, like loading data into your organization for the first time.
Pub/Sub API
The Pub/Sub API is a useful tool for integrating external systems with real-time events. You can easily subscribe to receive real-time events that will trigger whenever changes are made to your data or when custom events occur. This API uses a publish-subscribe, or pub/sub, model. This means that you can subscribe to channels that broadcast data changes or custom notifications.
The pub/sub model is advantageous because it reduces the number of API requests required, eliminating the need for making frequent API requests to get data. It is an excellent choice for writing apps that would otherwise need to frequently poll for changes.
Salesforce API Access and Authentication
To start integrating, you will need a Salesforce org that has one of the following editions: Enterprise Edition, Unlimited Edition, Developer Edition, Performance Edition, or Professional Edition (with an add-on). Additionally, make sure that you have the "API Enabled" permission.
Please note that for authentication, all API calls, except for the SOAP API login() call, require authentication. You can either use one of the supported OAuth flows or authenticate with a session ID obtained from the SOAP API login() call. To get started with your API of choice, refer to the developer guide.
Salesforce API Limits
Salesforce has set up limits on the number of API calls per organization. These limits are in place to prevent any malicious code from consuming too many shared resources in a multitenant environment.
There are three types of API limits: timeout limits, concurrent request limits, and total request allocations. Timeout limits restrict the duration of time that a single call can run. Concurrent limits restrict the number of long-running calls running at any given time. Concurrent limits may vary by org type, for instance, trial orgs and production orgs may have different limits on concurrent requests. Total limits restrict the number of calls made within a rolling 24-hour period. Total limits may vary by org edition and license type, including any add-on licenses you purchase. Total limits are also subject to minimums and maximums based on the org edition.
There are several methods available to check the remaining API calls in your account:
1. You can check the API Usage box on the System Overview page. To access it, simply navigate to Setup, enter System Overview in the Quick Find box, and then select System Overview.
2. For REST APIs, you can find the information in the Sforce-Limit-Info response header.
3. For SOAP APIs, you can find the information in the response body under "API REQUESTS".
4. Using the REST API, you can make a "/limits" call.
5. The API Request Limit per Month usage-based entitlement will show you the total API calls your account has made over the last 30 days.
6. Additionally, you can set up notifications to receive alerts when your account is approaching or exceeds its designated API call limit. To do so, navigate to Setup, search for "API Usage Notifications" in the Quick Find box, and select API Usage Notifications.
How to choose the right API for your integration?
Consider using the table below to help you decide which API to use.
Get to Know the Salesforce Platform APIs
Salesforce Developer Limits and Allocations

Comments
Post a Comment