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
mountaindewxmountaindewx 

Discovering API Limits via REST

The REST API documentation references a /limits endpoint (http://www.salesforce.com/us/developer/docs/api_rest/index_Left.htm#StartTopic=Content/resources_limits.htm) to discover the limits for the authorized organization. However, the docs say that it is still in PILOT mode and only available for developers.

The "Status Codes and Error Responses" section (http://www.salesforce.com/us/developer/docs/api_rest/index_Left.htm#StartTopic=Content/errorcodes.htm) of the documentation makes no reference to a LIMITS error code.

1) Is the /limits endpoint still in pilot mode? If so, how else can I programmatically discover the API limits for the authorized organization? 
2) What status code and errorCode (i.e. LIMIT_HIT) can I watch for in my code to stop pinging Salesforce? How can I get the expiration as well so I know when I can start pinging Salesforce again?
ShashForceShashForce
This feature is still in pilot mode, and just "might" become generally available with the winter 15 release (november).
mountaindewxmountaindewx
Hi Shashank,

Thank you for the reply. Can you offer any solutions to the other questions about what I can do to discover and handle limits until this endpoint is out of pilot mode?
mountaindewxmountaindewx
-Bumping this question.

1) Since the /limits endpoint is in pilot mode, how else can I programmatically discover the API limits for the authorized organization?
2) What status code and errorCode (i.e. LIMIT_HIT) can I watch for in my code to stop pinging Salesforce? How can I get the expiration as well so I know when I can start pinging Salesforce again?
mountaindewxmountaindewx
@Shashank_SFDC Still looking for an answer (or even an attempted answer...) for this question.

1) Since the /limits endpoint is in pilot mode, how else can I programmatically discover the API limits for the authorized organization?

2) What status code and errorCode (i.e. LIMIT_HIT) can I watch for in my code to stop pinging Salesforce? How can I get the expiration as well so I know when I can start pinging Salesforce again?
mountaindewxmountaindewx
Still looking for an answer.

1) Since the /limits endpoint is in pilot mode, how else can I programmatically discover the API limits for the authorized organization?

2) What status code and errorCode (i.e. LIMIT_HIT) can I watch for in my code to stop pinging Salesforce? How can I get the expiration as well so I know when I can start pinging Salesforce again?
mountaindewxmountaindewx
These unanswered questions are referenced in a new thread in hopes of getting a response from Salesforce: https://developer.salesforce.com/forums/?id=906F0000000Ai32IAC
Jonye KeeJonye Kee

Generally from Switzerland, implying that you'll have to datejust (https://drwatch.to/) discharge a Swiss ledger to get one of the watches