Salesforce Integration With COVID API

In this article I will show you can integrate lightning component with COVID REST API.

There are various API available now a days which you can consume. This one API, which I have used is an unauthenticated API, which means there is no need to provide authentication information while calling this API.


API End point

COVID API URL : https://api.covidindiatracker.com/state_data.json


Add this End point to Remote site Settings


This is pretty simple API integration and useful for people who are just beginner in Salesforce integration.


After development, we would be able to see covid statistics as follows.





The above API retrieves India's state wise data. In this component state wise Covid statistics is shown.


First we will code the apex class, which will call the api and store data in wrapper class.

1. Covid19Gobal.apxc :


2. CovidWrapper.apxc :


Aura Component File :


Cmp File


Controller.js file


Helper.js file





Let me know if you face any problem in the code.







©2019 by SFDC Blogs.