You need to sign in to do that
Don't have an account?

Sites Pageview for Apex REST calls?
We are hosting an Apex REST endpoint on our salesforce site. The URL path to the service is similar to https://mycompany.secure.force.com/services/apexrest/endpointName.
I am confused as to whether a hit against that endpoint will count as a Site Pageview, API call or both? It appears that it is counting as a pageview, but it seems to me that it should not and should only count as an API hit. Please clarify.
I am confused as to whether a hit against that endpoint will count as a Site Pageview, API call or both? It appears that it is counting as a pageview, but it seems to me that it should not and should only count as an API hit. Please clarify.
You might hack to access the Apex REST class directly from Sites controller, but it doesn't looks like an ideal solution to me.
I think if you want to use Sites pages as REST resources, best would be to change Visualforce page content type to XML/JSON and print out stuff directly, it could work somewhat for public guest users.
Answering your original questions : If you are hitting a sites page its a sites view, not an API call. Unless you are using Http class in Sites Apex controller :)
If you host a Rest API via Apex through a Force.com Site (unauthenticated) does it consume 1 API call AND 1 Pageview?
I'd love someone to just clarification in the documentation at https://help.salesforce.com/HTViewHelpDoc?id=sites_limits.htm&language=en_US#SitesPageViewsWhatCounts (https://help.salesforce.com/HTViewHelpDoc?id=sites_limits.htm&language=en_US#SitesPageViewsWhatCounts) and put an end to the question.