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
Vinay TemburnikarVinay Temburnikar 

Which is the best API to use for my case? BULK or REST?

  • I have to upsert records contained in a json format, total of around 5000 records (not bulk)
  • I will program the capture of JSON from a differnt system into an object and pass that for upsert to Salesforce
Vivek NayakVivek Nayak
 Please state your requirement clearly.
Is it one time insertion? Is JSON response is callout response? If yes, simply write one Apex callout class , deserialize response , and insert using a batch class.

You can use Bulk API if you trying from workbench or anyother third party client.
Vinay TemburnikarVinay Temburnikar
No, it's not a one time thing. I am writing a. NET application that will basically try to upsert records in JSON format to SFDC. I will not use any third party tools. I want to upsert, not insert. And it's only a few thousand records at a time. So which one is the easier one? Rest or Bulk or Bulk 2.0? Get Outlook for Android
Vivek NayakVivek Nayak
Go for Bulk API. Not sure about Bulk 2.0.
Thanks