Invoke WorkItems & WorkItemLinks using VSO Rest API


We are trying to invoke rest api in the following scenarios where we are facing the challenges listed below:
1) We are trying to fetch the WorkItem collection using the VSO Rest API:
2) We are trying to fetch the WorkitemLinks data from the Rest API:
  • On referral to https://www.visualstudio.com/en-us/docs/integrate/api/wit/reporting-work-item-links to fetch the links information for the corresponding WorkItemType, while retrieving we are getting SourceId,TargetId values where the TargetId holds the values of Workitemtype Task as well as other work item types (eg: Deliverable,Task Group).
  • We need to retrieve only the particular workitemtypes data. Could you please help us out in retrieving this data? Are we missing any filters to retrieve the data?.