I have iTunes Connect account, I want to export the analytics from iTunes Connect and then generate a report in my own system. I read many article but haven't been able to find any api to connect to iTunes Connect remotely. Any help in this regards will be greatly appreciated.
Navigate to Analytics for the appropriate app, then select the Metrics tab, then select a metric. There is a download icon (the box with the down arrow in the screenshot below) which you can click on for a CSV file. You can also select an option from the View By dropdown. As far as I know, there is no download all stats functionality sadly. Also, the analytics functionality is available for the iTunes Connect Admin, Finance, and Sales roles.
If you want to download your app store data automatically without navigating manually to iTunes Connect, Apple offers the Reporter Tool which is an API. It takes some programming skills but is a reliable interface that can be adapted to your needs. We are currently developing a Google Sheets Add-on that will import your app statistics directly into Sheets. This includes all available reports and a schedule function on a daily, weekly, or monthly basis. If you are interested in a free trial sign up for beta testing on www.appstoremetrix.com.