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
Salesforce SamuraiSalesforce Samurai 

Retrieve API limit from code

We are trying to build a solution for our custom API integration to pull in the current API count / limit in order to throttle our API calls to our SFDC account and avoid hitting our limit.

 

I found this on stackoverflow, but it doesn't look like we can retrieve this data via the API.

http://stackoverflow.com/questions/9221170/retrieve-salesforce-daily-api-requests-limit/9222517#9222517

 

Would it be possible to build a custom object and VFP to read the data from the setup page into a VFP then write the value to a custom object / field for API access?  Does anyone have a better suggestion?

 

Thanks!