What is API ?
API Stands for Application Programming Interface
- They enable systems to share & update information among each other.
- Since different applications are built on different technologies, APIs provide a standard set of rules and protocols to communicate with each other
- To use an API, you do not need to be concerned about the internal implementation as long as you follow these rules and protocols.
- Eg. It is like driving a car. What you need is to know is how to use the accelerator, brake, gear, steering wheels etc. and don’t really need to bother yourself with the mechanics of how the car engine works.
Protocol:
In simple terms a protocol defines a set of rules & standards used by two or more parties to communicate with each other. Protocols include definitions of message format, data types, data flows etc.
The are two main protocols for Web Services
- REST API
- SOAP API
- Bulk API
- Streaming API
Though there are other protocols also like RPC, Bauyex, WSFL, BEEP etc.,
Salesforce APIs mainly supports:
1. REST API:
- Stands for REpresentational State Transfer. It is also known as RESTful API.
- REST is an architectural style, or design pattern, for APIs.
- REST was created by Roy Fielding, a computer scientist in the year 2000.
- Supports different messaging formats like JSON, XML, HTML, Plain Text etc.
- Salesforce provides various REST APIs to to query, create, update, and delete data & metadata
2. SOAP API:
- Stands for Simple Object Access Protocol
- SOAP is a messaging protocol
- SOAP was created by Microsoft in the year 1998
- Supports only XML messaging format
- Like REST, Salesforce provides various SOAP APIs to to query, create, update, and delete data & metadata
3. Bulk API:
- Bulk API is a specialized RESTful API for loading and querying lots of data at once.
- By lots, we mean 50,000 records or more.
- Bulk API is asynchronous, meaning that you can submit a request and come back later for the results.
- This approach is the preferred one when dealing with large amounts of data.
- There are two versions of Bulk API (1.0 and 2.0). Both versions handle large amounts of data, but we use Bulk API 2.0 in this module because it’s a bit easier to use.
- Bulk API is great for performing tasks that involve lots of records, such as loading data into your org for the first time.
4. Streaming API:
- Streaming API is a specialized API for setting up notifications that trigger when changes are made to your data.
- It uses a publish-subscribe, or pub/sub, model in which users can subscribe to channels that broadcast certain types of data changes.
- The pub/sub model reduces the number of API requests by eliminating the need for polling.
- Streaming API is great for writing apps that would otherwise need to frequently poll for changes.
Difference between REST and SOAP:
API Communication Type:
Third important concept in the world of APIs is whether the communication is- Synchronous
- Asynchronous
- Synchronous means that when you call an API from a block of code, the code will wait for the response. And until the response is received, all other further executions will be halted.
- Asynchronous means that when you call an API from a block of code, you pass the values and let it do what it is supposed to do without waiting for the response. All further code executions will continue without waiting for the response.
What Are The Salesforce Supported APIs?
- Salesforce follows API first approach when building features on its platform.
- Salesforce APIs enables organizations to with other applications in their organization.
- These APIs also enable 3rd party vendors and ISVs to integrate their products with Salesforce, there by enabling them to offer rich set of industry specific applications, features and functionalities that work seamlessly with Salesforce.
- Some of the APIs offered by Salesforce, allows you to create, update or delete metadata in Salesforce. This enables companies to develop tools to move metadata between Salesforce Orgs during the development process
- In general Salesforce APIs enable Architects, Administrators and Developers to build tools and automation to extend the functionalities of the platform to meet their unique business requirement
What APIs Do Salesforce Provide?
Resources:
# Trailhead : Platform API Basics
# Trailhead : User Interface API
# Trailhead : Apex Metadata API
# Trailhead : Postman API Client
# Trailhead : Build a Connected App for API Integration
# Trailhead : Design Solutions with Salesforce APIs
# Integration Patterns and Practices
# Bulk API 2.0 Developer Guide
# Streaming API Developer Guide
# Developer Limits and Allocations Quick Reference
Comments
Post a Comment