1

With Spring '17, the Composite REST API becomes generally available. It allows to bundle multiple subrequests into a single HTTP request by describing them in a JSON payload.

Will this composite request count as one (composite request only), two (subrequests only), or three (composite request, plus subrequests) toward the API Limits?

POST /services/data/v39.0/composite

{ "compositeRequest" : [
  {
    "method" : "POST",
    "url" : "/services/data/v38.0/sobjects/Account",
    "referenceId" : "refAccount",
    "body" : { "Name" : "Sample Account" }
  }, {
    "method" : "POST",
    "url" : "/services/data/v38.0/sobjects/Contact",
    "referenceId" : "refContact",
    "body" : { "LastName" : "Sample Contact", "AccountId" : "@{refAccount.id}" }
  }
]}

I could not find any information in the official docs or communities. Maybe someone here knows?

2

It counts as one. I asked this very question at a dreamforce session where they announced this feature. I don't have any relevant documentation handy but if you watch the session video, at 22:33 you'll hear the question answered:

Me: What are the effects on limit usage?

Jay Hurst: Right now this is one API call for the entire composite, so it definitely will give you a more efficient use of the API. We’re playing around with how that might work when we build in query as well, so that you can actually maybe do some simple iteration of query results. So maybe we enforce limits on the query if you’re doing something like that, but for now it’s all one single call just like it would be in SOAP.

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.