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
Minhaj Arifin 5Minhaj Arifin 5 

Question on Trailhead Developer Intermediate: API Basics: Use bulk API challenge

Hello, I will appreciate your help on this please: 
Need help to understand what I am doing wrong.

In developer intermediate section of trailhead
API Basics: Use bulk API challenge

Import Accounts Using Bulk API and Workbench
Using Bulk API and Workbench, import these account records (a CSV file).

This is what I tried in workbench:

Step 1:  /services/data/XX.0/jobs/ingest
Executed POST

Step 2: /services/data/XX.0/jobs/ingest/jobID/batches
Changed Headers Content-Type to text/csv
Executed PUT

Step3: /services/data/XX.0/jobs/ingest/jobID. 
In the request body, replaced the text with the following JSON text.
   "state" : "UploadComplete"

Executed PATCH
NagendraNagendra (Salesforce Developers) 
Hi MInhaj,

Sorry for this issue you are encountering.

May I suggest you please check with below link from the forums community with a similar discussion which might help you further. Please let us know if this helps.

Hello, have you tried replacing the "XX.0" here  /services/data/XX.0/jobs/ingest/jobID/batches with the version you are using? 
At the first page (where you selected production and agreed the terms) it says "version", replace the "XX" with the version you choosed there, for example: /services/data/v41.0/jobs

Hope that helps.

Also, please replace de "JobID" part with the ID of the answer you get when executing the request. It's the first line when you read the response. 
Jess BurghJess Burgh

Hey all! I have been getting frustrated with following the instructions for the example. When I got to do the next step I get an error message of "Insufficient Access". I copied the Id from the first line of the request. Any suggestions on what I'm doing wrong?

Edison Raj 9Edison Raj 9
Hello All,
              I get the following error in even after the job is complete in "Monitor Bulk Data Load Jobs" page of Salesforce Classic.
Bulk API
But, I am not able to complete the challenge in trailhead.
I get the error as :
Challenge Not yet complete... here's what's wrong:
Could not find at least 500 Account records with the Name like 'Bulk Company'.

When I tried to get the Bulk API Job Status in workbench, it gives error message as "InvalidJob: Cannot access V2 Jobs through this endpoint"

pls help me in completing this challenge
rambabu vadlamudi 16rambabu vadlamudi 16
I am also having troubles with the challenge can anyone please help me to resolve this.I am struck on this
Matt ParrellaMatt Parrella
I believe your problem lies here:

Step 2: /services/data/XX.0/jobs/ingest/jobID/batches
Changed Headers Content-Type to text/csv
"/Users/ediz/Downloads/bulkv2hocdata.csv"          // This won't insert all the Accounts
Executed PUT

Instead of putting the directory of where the .csv file is located try the following:
1.) Open the .csv
2.) Ctrl+A to select all
3.) Copy this data
4.) Paste data into the body on the workbench
5.) Be sure to change the header to 'text/csv' and issue a PUT
6.) Follow up with your Step 3 as it is, that part is fine

This should insert all 500 Accounts.

Give that a shot.

Matt ParrellaMatt Parrella
Also, you can check if it was succesful by issuing a GET on the following uri:

Sumeet KheraSumeet Khera
Remember replace only XX.0 part of URI with current version of API

e.g. Working URI
      Non-Working URI
roni shoreroni shore
Hi All, is these a way to dynamically put Id's in the URI