Retrieve Salesforce Daily API Request Limit

Does anyone know how to retrieve SFDC daily request api limit via SOAP or REST? I don’t see any requirements. Currently, I have to access this information on the company information page. I want to retrieve this information at the code level for batch processing.

Thank you!

We use custom code to solve this problem:

WebService static string GetAPIUsage() {
PageReference pr = new PageReference('/00D20000000HsCQ');//use id of setup page
pr.setRedirect(false);
String result = pr.getContent().toString();
Integer start_index = result.indexOf('API Requests, Last 24 Hours', 1) + 52;
Integer end_index = result.indexOf ('<', start_index);
result = result.substring(start_index, end_index);
result = result.replaceAll(' ', '');
return result; < br />}

Hope it helps.

Greetings, Lucas

Does anyone know how to pass SOAP or REST retrieval SFDC daily request api limit? I don’t see any requirements. Currently, I have to access this information on the company information page. I want to retrieve this information at the code level for batch processing.

Thank you!

We use custom code to solve this problem:

WebService static string GetAPIUsage( ) {
PageReference pr = new PageReference('/00D20000000HsCQ');//use id of setup page
pr.setRedirect(false);
String result = pr.getContent().toString ();
Integer start_index = result.indexOf('API Requests, Last 24 Hours', 1) + 52;
Integer end_index = result.indexOf('<', start_index);
result = result.substring(start_index, end_index);
result = result.replaceAll(' ', '');
return result;
}

Hope It helps.

Regards, Lucas

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2759 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.