 Hello, everyone. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to discuss about APIs and integration related questions and answers. So first question is what is an API? So an API is equivalent to a user interface, except it is designed for software instead of humans. APIs allows applications to talk one another. The client sends a request for specific information to another system. Other system returns the data in response. To send or receive data, there is an expectation that it will be in a specific format that both sides can understand. So basically between two systems, if you want to create an interaction system, so for that purpose you can create APIs. What is integration? So integration is process of connecting to applications. A typical enterprise uses many applications, most of which are not designed to work with one another. Integrating separate but related apps helps organizations to achieve greater levels of organizational consistency, efficiency and quality. What are Salesforce data APIs? So there are for REST API, SOAP API, Bulk API and Streaming API. If inter asked, like tell something about REST API, so you can answer this, it is simple and powerful RAP service based on RESTful principles, exposes functionality via REST resources and HTTP methods, CRUD operations, so CRUD means create, read, update and delete, search or query data, retrieve object metadata, access information about limits and org, supports both XML and JSON, has lightweight request and response framework so useful for writing mobile and web apps. Next is about SOAP API. So it is robust and powerful web service based on the industry standard protocol, uses web services description language file to define the parameters for accessing data. It supports XML only, most of SOAP API functionality is also available through REST API. Great for writing server to server integrations about bulk API, so spatialized RESTful API for loading and querying lots of data at once. 50,000 records or more, bulk API is asynchronous, two versions are available, those are 1.0 and 2.0, both versions can handle large amount of data. Next is about streaming API. So it is used for setting up notifications that trigger when changes are made to data. Users are published, subscribe or PubSub model in which users can subscribe to channels that broadcast certain type of data changes. It is great for writing apps that would need to frequently poll for changes. API details, so we have lots of APIs, so I'm going to discuss those. So if you want to use REST API, so it uses REST protocol, date format, JSON, XML. So here it is basically data format. So for REST API, data formats are JSON and XML and communication is synchronous. Next is SOAP API, protocol SOAP uses WSGL file and data format is XML and it is also synchronous. Chatter REST API, protocol is REST, data format, JSON, XML and communication is synchronous. User interface API, protocol REST, data format, JSON and communication synchronous. Analytics REST API, protocol REST, data format, JSON, XML and synchronous. Bulk API, protocol REST, data format, CSV, JSON, XML and it is having asynchronous communication. Then we have metadata API, it uses SOAP protocol, data format is XML, communication asynchronous. Streaming API, Bayoaks, JSON, data format, communication medium asynchronous. Apex REST API, REST protocol, data format, JSON, XML and custom and communication is synchronous. Apex SOAP API, protocol SOAP, data format, XML and communication synchronous. And tooling API, protocol REST or SOAP and data format, JSON, XML, custom and it is synchronous and communication. When to use REST API, so it is great for use with mobile apps and web projects. Web service interface for interacting with Salesforce, provides CRUD operations, search or query data, retrieve, object, metadata, access information about limits and org. When to use SOAP API, so web service interface for interacting with Salesforce, CRUD operations can be used in any language that supports web services. When to use ChatterREST API to display chatter feeds, users, groups and followers, especially in mobile apps, provides programmatic access to files, recommendations, topics, notifications, data.com, purchasing and more. When to use user interface API, so it builds Salesforce UI for native mobile apps and custom web apps. Build user interfaces that let users work with records, list views, action, favourites and more. You don't have to worry about layouts, picklists, free-level security and sharing. When to use analytics REST API, so access analytics assets such as database, lenses and dashboards. Send queries directly to the analytics platform, retrieve a list of data set versions, create and retrieve analytics applications, create and retrieve lenses, create, update and retrieve analytics dashboards, manipulate replicated data sets. When to use bulk API, so you can use it like it is based on REST principle. Optimize for loading and deleting large set of data. Query query all, insert, update, absurd or delete many records as in currency by submitting branches, sorry, batches. Batches are processed by Salesforce and background. Easiest way to use bulk API is to enable it for processing records and data loader using CSV files. When to use metadata API, so it is used to retrieve, deploy, create, update or delete customization of org. Common uses to deploy metadata from sandbox to production org. To access the functionality, use Salesforce extensions for Visual Studio Code or the end migration tool. When to use streaming API, so it is used to retrieve near real-time streams of data that are based on changes in Salesforce reports or custom payloads. Subscribers can receive notifications using Comet D and implementation of Bayoaks protocol that simulates push technology. When to use Apex REST API, so use it when there is requirement to expose Apex classes and methods so that external applications can access port through REST architecture. It supports both OTH 2.0 and session ID for authorization. When to use Apex SOAP API, so use it when there is requirement to expose Apex methods to external application through SOAP external application can access port. It supports both OTH 2.0 and session ID for authorization. When to use tooling API, so it integrates Salesforce metadata with other system. Matadata types are exposed as S objects, so complex type components can be accessed. To manage and deploy working copies of Apex classes, trigger and VF pages and components tooling API can be used. REST and SOAP both are supported. What do you understand with callouts? So this question's answer is callouts enable you to tightly integrate Apex with an external service. You make a callout to external web service or sending HTTP request from Apex port and then receiving the response. What do you understand with web services? So web services is a functionality or code which helps to do integration. Web service are open standard like XML SOAP, HTTPS, etc. Based web applications that interact with other web applications for the purpose of exchanging data. What is WSDL? So WSDL stands for web services description language. It is an XML document that describes a web service. How SOAP can be accessed? SOAP can be communicated through WSDL file without WSDL file we cannot do integration. Masses format of SOAP is an example. How to use external WSDL file? So you just need to go to setup and then in quick find you can enter Apex classes then select Apex classes. Then click generate from WSDL. Click browse to navigate to a WSDL document on your local drive-on network. This WSDL document is the basis for the Apex class you are creating. Click pass WSDL to verify the WSDL document contents. Click generate Apex code. This final page of the wizard shows the generated classes along with any errors. The page also provides a link to view successfully generated code. What is remote site settings? So remote site setting is used to authorize the endpoint. It allows us to integrate with endpoint. How SOAP and REST communicates? SOAP communicates through WSDL file and REST communicates through HTTP protocol. What are the methods in REST? So we have HTTP GET which retrieves data identified by a URL. HTTP post create a resources or post data to the server. HTTP delete delete a resource identified by a URL. HTTP put create or replace the resource sent in the request body. A REST request consists with four components. So it contains a resource URI and HTTP method request header and a request body. What is JSON? JSON stands for JavaScript object notation. JSON is lightweight than XML. While exchanging data between a browser and a server, the data can only be in text format. JSON is text, hence we can convert any JavaScript object into JSON and can send JSON to the server. So this is all about question and answers related to APIs and integration. So I tried to have as many questions as I can. So if you are a fresher or intermediate developer, so you can use this video to prepare yourself for APIs and integration related questions. Thank you.