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
Sagar Hinsu 11Sagar Hinsu 11 

how to get the salesforce Id of all the records through API

Hello Everyone,
I am creating an small tool which requiers the salesforce 'Id' through API.
But through API it only fetches 2000 record 'Id'. 
What if I have 10000 records?
I want all the 10000 record 'Id' through API.
Any help will be appriciated.
Thank You.
pconpcon
You will want to use the Bulk API [1] for this number of records.  The Bulk API support up to 10,000 records in a single call [2].  If you need to get back more than 10k records, you will need to order your query based on something that will not change the order of your results (createddate for example) and then make multiple queries.  Alternately you can use an existing tool (such as jsForce [3]) to do the query/queryMore for you.

[1] https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_intro.htm
[2] https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_concepts_limits.htm
[3] https://jsforce.github.io/document/#bulk-query
Abhishek_DEOAbhishek_DEO
You can use Querymore call or bulk API as pcon mentioned. To see a ample, please access below link

queryMore (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_querymore.htm)