SharePoint 2013 RestAPI Recover Task and Subtask Undefined Parent ID

Try to add console.log (value); in your $ .each to see what data you have:

$ .each (data.d.results, function (key, value) {
console.log (value);
subTasks + = & # 39;Title:  & # 39; + value.Title +
& # 39; Status: & # 39; + value.Status + & # 39; Parent ID: & # 39; + value.Id +
& # 39;
& # 39 ;; });

Most likely, value.Id is indeed undefined. That's because you do not ask

Try this REST request instead:

? $ select = Title, Status, Predecessors,Predecessors / Id& $ expand =Predecessors

enter the description of the image here