function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Andrew DayAndrew Day 

Report Data Via c#

Hey guys,

I want to run a report and get the results server side in c#, but I am not sure how. Has anyone done this?

I maybe wrong here but it sound like I can do this with the analytics API but not sure how.

Does anyone have an example of this?or and idea's?

I was reading that you can access the analytics api via the apex api? but not surte how.
logontokartiklogontokartik
I am not sure if you have gone through the Analytics API developer guide, but its totally based on Rest principles, if you have already used REST API in salesforce to retrieve data, sobjects, its nothing different, 

You do an authentication with Salesforce, get the session id, or access token, and use it to call various Analytics API Endpoints, 

FYR, 

http://www.salesforce.com/us/developer/docs/api_analytics/salesforce_analytics_rest_api.pdf



I dont have any specific C# examples, but here is the link on how its used in Visualforce, 

http://th3silverlining.com/2013/11/10/salesforce-analytics-api-demo-code/

https://developer.salesforce.com/blogs/developer-relations/2013/09/using-the-salesforce-analytics-api-on-a-visualforce-page.html

Hope this helps