Bulk Update Record's Assignee via REST API

Need to offset tasks to another team member?
Here is a simple script that updates a set of records with a specified assignee.

const recordStart = 1;
const recordEnd = 2;
const humanID = 'username';
const appID = kintone.app.getId();
const recordRange = [...Array(recordEnd - recordStart + 1).keys()].map(x => x + recordStart);
recordRange.forEach((recordID) => {
  const body = {
    'app': appID,
    'id': recordID,
    'assignees': [humanID],
  };

  kintone.api(kintone.api.url('/k/v1/record/assignees', true), 'PUT', body, function (resp) {
    // success
    console.log(`Record ${recordID} is assigned to ${humanID}`);
    console.log(resp);
  }, function (error) {
    // error
    console.log(`Error with Record ${recordID}`);
    console.log(error);
  });
});