Can anyone demonstrate the API solution. As I want to understand from basics.
Many, many examples are available in Developers (Code Hub).
Here is a link you can use as an intro to API's.
Introduction to RESTful APIs and JSON format
Also, here is a link for Management API Reference guide. These should get you at least some understanding in mgmt_cli, SmartConsole CLI, or Web Service calls.
Check Point - Management API reference
there's this webinar that I always recommend How to use R80.10 API for Automation and Streamlined Security (Video)
Retrieving data ...