18

I have a public Force.com site without any pages. I have created a APEX REST service and added it to the force.com site. So the APEX REST service will be accessible public without authentication. All of these developed in a developer org.

I am looking for the following confirmation:

  1. As there are no pages in the site and only APEX REST API, will the page view limit for a force.com site still apply? Or is the response (JSON) considered as a page view

  2. How do I calculate the bandwidth & Request time estimates for the API?

  3. As the force.com site is accessed using guest user license and the APEX REST service is public, does the concurrent API request limit (25) still apply? I guess not.

  4. There are daily API limits on an organization. Does the API requests on the public Force.com site hosted REST Service get included under this?

  5. I used Force.com REST API to get an attachment over 5 MB and it returned the response without error. Is the 3 MB request/response limit not applicable to Salesforce REST API? Is it then applicable for the public APEX REST Service exposed via the public force.com site?

Appreciate any input/direction in this regard to clarify/confirm my above understanding/query.

9
+50

I built a similar service some time ago, and made some similar verifications and tests, I can provide some answers as follows:

  1. Any request for 'Your Domain" will count as a page view, see docs
  2. You can test the service from runscope (or similar), to get real request times. For example, I have a similar service that performs a SOQL & DML to a single contact record (on a dev org), the round trip averages at 630ms.
  3. Yes, this is still an API call and so the limit will apply. You will need to asses the likely hood of hitting this limit based on your knowledge of the service, frequency of calls to it and the average response time tests from runscope. If your service responds instantly there is much less chance of hitting this limit than if your service completes some complex apex perhaps including SOQL and DML before responding seconds later. (see dev blog article)
  4. Yes, each call to this public site RestResource will consume 1 API request. I have tested this.
  5. The docs here clearly state the 3mb request/response limit does apply, although this does not explain your tests. However perhaps an exception is made around attachments as these clearly do transport successfully via API (e.g. with force.com dataloader over soap or dataloader.io over soap & rest and many other integration tools).
  • Are you certain about #1? Apex REST is served under /services/apexrest from the root of the site. It is not located under mycompany.force.com/mypage as the docs describe how a page takes a pageview. The docs don't account for the apexrest path. – hemmeter Apr 16 '15 at 23:27
  • Any update on #1 .. I wonder if the limits should be on one side between #1 and #4. I think it should be one or the other – balinder singh Feb 25 at 23:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.