Posts

Showing posts with the label integration

RESTful API in Salesforce: The Complete Guide

Image
Think of a REST API as the digital waiter in a restaurant. You, the Client don't just walk into the kitchen and grab what you want; instead, you place a formal HTTP Request through a standardized menu. This request tells the Server exactly what you need using a specific Endpoint and an HTTP Method  like GET, POST or DELETE . Make API Callout In Salesforce public static void callAPI() { // Define the URL before using it String url = 'https://www.themealdb.com/api/json/v1/1/search.php?s=pizza'; // Instantiate a new Http object Http h = new Http(); // Instantiate a new HTTP request, specify the method (GET) as well as the endpoint HttpRequest req = new HttpRequest(); req.setEndpoint(url); // Set the URL endpoint req.setMethod('GET'); // Set the HTTP method // Set headers correctly using separate setHeader calls // req.setHeader('X-Key', 'Your API-Key'); // Send the request and get res...

Salesforce GraphQL: Developer Insights

Image
What is GraphQL?   GraphQL is a standard query language for APIs and a runtime for fulfilling those queries with your data. It provides users with a single endpoint to request all necessary data from in a single request. Applications that utilise GraphQL APIs are frequently far more efficient than those that stick with REST APIs. This is due to their capacity to retrieve all required data in a single invocation, which reduces the number of round trips to the server, allowing you to customise it to meet your needs. Why GraphQL is better than REST API? REST API is the gold standard for APIs, yet traditional REST APIs present significant issues when developing modern, highly performant, and scalable online and mobile applications. REST endpoints do not allow client changes to the API endpoint's response.   For example, when fetching a user's phone number from a REST API, receiving extraneous data beyond the number adds unnecessary costs for both the server and the requester. ...

SOAP Integration in Salesforce

Image
If you don’t know the basics of SOAP fear not, because I've got you covered! Dive into the basics of SOAP with my latest blog, ' SOAP Explained: With JavaScript .’ Oh, you already know about SOAP and are here to learn how it works in Salesforce? You've come to the right spot! Let's get started. SOAP Integration in Salesforce SOAP is a protocol where client and server are tightly coupled meaning that minor changes on either side can potentially disrupt the connection.   To use SOAP API, your org must use Enterprise Edition, Performance Edition, Unlimited Edition, or Developer Edition. In all supported editions, a user must have the API Enabled permission turned on in the user profile they’re assigned.  In Salesforce, Apex SOAP web services(It is like a class) allow an external application to invoke Apex methods through SOAP Web services. The Web service that is available to you is defined in generated WSDL file. What is WSDL? Web Service Description Language is a file t...