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
Divya Chary 17Divya Chary 17 

does viewing debug logs count against API limits of the org?

Best Answer chosen by Divya Chary 17
SwethaSwetha (Salesforce Developers) 
HI Divya,

API Calls that include DebuggingHeader have a separate allocation limit of 1,000 calls per 24-hour period and are counted against API limits.

See https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_api.htm# 

Also as per documentation, https://help.salesforce.com/articleView?id=code_debug_log.htm&type=5 "Debug logs are generated when you have active user-based trace flags, when you run Apex tests, and when executed code or API requests include debugging parameters or headers."

You can test this out by viewing the debug log and checking the API Usage report.https://help.salesforce.com/articleView?id=000326126&type=1&mode=1

Steps:
Click Reports.
Click Administrative Reports.
Click API Usage Last 7 days.

​​​​​​​Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you

All Answers

SwethaSwetha (Salesforce Developers) 
HI Divya,

API Calls that include DebuggingHeader have a separate allocation limit of 1,000 calls per 24-hour period and are counted against API limits.

See https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_api.htm# 

Also as per documentation, https://help.salesforce.com/articleView?id=code_debug_log.htm&type=5 "Debug logs are generated when you have active user-based trace flags, when you run Apex tests, and when executed code or API requests include debugging parameters or headers."

You can test this out by viewing the debug log and checking the API Usage report.https://help.salesforce.com/articleView?id=000326126&type=1&mode=1

Steps:
Click Reports.
Click Administrative Reports.
Click API Usage Last 7 days.

​​​​​​​Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
This was selected as the best answer
Divya Chary 17Divya Chary 17
Hi Swetha,

Thank you for your prompt response, and for the guidance. Just to confirm, do the debug statements in classes exposed as webservice account to the API limit?

Thank you once again.
SwethaSwetha (Salesforce Developers) 
HI Divya,
Happy I could help. The webservice call will be counted against the API limit however, the system.debug statements in it are not counted. Thank you