As a Salesforce director you ’ve presumably heard the term ‘ Salesforce APIs ’ numerous times and you know that they ’re commodity to do with programming but have no way really been sure what they’re and when/ how to use them. Sound familiar?
Well, let’s break it down and get our heads around the basics of the content. We ’re all familiar with the idea of a UI or stoner Interface which is the way that we shoot commands like View or Save to our Salesforce org and as Admins, we do so via the graphical Web UI by, for illustration, clicking on the Save button. API stands for Operation Programming Interface and it’s simply another way of transferring commands to Salesforce, only this time there’s no graphical UI to work through, rather, inventors use the APIs to shoot commands like View or Save to Salesforce programmatically by writing platform law.
There are several different APIs that inventors can use; which one they choose will depend on what it’s that they want to do. In this blog I ’m going to concentrate on the 4 main data APIs that inventors use to programmatically manipulate Salesforce data; the REST API, the Cleaner API, the Bulk API and the Streaming API. There are of course several other APIs like the Metadata API which inventors can use to manipulate effects like objects, fields & runner layouts etc. or the Analytics REST API to work with effects like datasets, lenses & dashboards.
The REST API can be used to recoup data from the database by querying or searching, and also allows us to perform DML( Data Manipulation Language) commands similar as Insert, Update, cancel, Upsert & Undelete in law. The commands & functionality are exposed to our law via REST coffers and HTTP styles and the REST API supports both XML & JSON which are two largely structured data formats used for moving data around. Because the REST API’s request/ response frame is featherlight it makes it a great tool for inventors to use when penning apps for both the web and mobile.
Cleaner stands for Simple Object Access Protocol and is an assiduity-standard protocol that allows the colourful rudiments of an app to communicate with each other. The Salesforce Cleaner API is important functionality exposed to inventors as web services and uses a commodity called a WSDL( Web Services Definition Language) train as a kind of contract between the API and the consumer to determine the position of the web service and the styles that it makes available to the consumer. The WSDL is written in XML. In fact, the Cleaner API only supports XML and doesn’t support JSON. Whilst utmost of the Cleaner API functionality is available via the REST API, because there’s this formal WSDL contract between the API and the consumer, Cleaner can be better for penning integrations between waiters.
The Bulk API is a special interpretation of the REST API which has been optimised for working with particularly large volumes of data and by large volumes, I mean further than,000 records at a time. The Bulk API processes data asynchronously meaning that a single large batch of data is broken down into multiple lower batches which are also transferred to multiple waiters for processing at the same time. Once the request has been made, you do n’t need to wait for the response to come back before you can get on with other work( unlike with coetaneous processes). And because multiple batches are reused at the same time, there’s a speed benefit to working with the Bulk API. So, if your demand is to load large quantities of data into your org the Bulk API is the way to go.
don’t miss out iconCheck out another amazing blog by encouragement Consulting then Salesforce Winter 23 Marketing Updates
The Streaming API is the one to choose, If you want to programmatically set up announcements that do automatically when changes are made to your data. The Streaming API utilises a Publish/ Subscribe armature where announcements are published to a channel and druggies can subscribe to that channel to admit the announcements. It works a little bit like a radio transmission where a radio signal is broadcast irrespective of whether anyone’s listening, and people can admit the broadcast by tuning in to the right channel. The publisher( that’s broadcasting the signal) and the consumer( who’s listening to the signal) do n’t need to know about each other and do n’t have any dependencies on each other. As a result, with the Streaming API the need for your app to continuously make API requests by polling for changes is largely reduced. Therefore, if the app you ’re structure would need to constantly poll for data changes, the Streaming API is a great choice.