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
roni shoreroni shore 

Get details of Bulk Upload Jobs

Hi Guys,
can I get the details of Bulk upload jobs? I see in docs we can use REST API to get the Id and details like "/services/data/v45.0/jobs/ingest".
Is it possible to programmatically use this to fetch the number of records failed?
 
MKRMKR
Hi,

Currently it is not possible directly from Apex with a query. Have a look into this idea if you think it might be useful: https://success.salesforce.com/ideaView?id=08730000000l30hAAA

However the '/services/data/v45.0/jobs/ingest/<jobid>' can be used for that. The API call will return "numberRecordsFailed" value in response. If you want to do it from Apex, have a look into this resource: https://www.jitendrazaa.com/blog/salesforce/call-salesforce-rest-api-from-apex/

Regards,
MKR