I want to enable debug logs for rest API which is exposed via force.com site.
I have looked into how to set logs for guest user in this link. But I can't able to find for rest API.
PS: I am using postman to make the request.
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
Since you are simply hitting a force.com site as a guest user you need to begin monitoring debug logs for the SITE name and not User. Assuming you site page code simply calls the rest method directly without making a callout
Then in postman set a cookie:
Postman’s native apps provide a Cookie Manager that lets you edit cookies that are associated with each domain. To open the Cookie Manager, click the ‘Manage Cookies’ link under the ‘Send’ button.
similar to this: "debug_logs=debug_logs; path=/; domain=.force.com; Expires=Tue Jan 19 2038 03:14:07 GMT-0500 (EST);"
Then when you make the request and the logs should show up.
In the end it is the same issue as the guest user debug logs and sites from Winter 16 just starting from postman