Retrieve Direct Reports of a Manager

Let's say that David is a line manager in his organization. He wants to retrieve his direct reports across all assignments for which he's the line manager.

To retrieve the direct reports of a manager across all assignments:

  1. Perform a GET operation on the workers resource by using the findReports finder and providing parameter values such as PersonNumber, LineManagerFlag, and DirectReportsFlag.

    You can also retrieve direct and all reports of a manager from the allReports child resource in the context of a particular worker assignment.

  2. Verify the details returned in the response.

Example URL

Use this resource URL format.

GET
/hcmRestApi/resources/11.13.18.05/workers?finder=findReports;PersonNumber=1234,LineManagerFlag=true,DirectReportsFlag=true&onlyData=true

Example Response

Here's an example of the response body in JSON format.

{
"items": [
  {
   "PersonId": 100100124784129,
   "PersonNumber": "VIS_W_126",
   "CorrespondenceLanguage": "US",
   "BloodType": null,
   "DateOfBirth": "1988-05-15",
   "DateOfDeath": null,
   "CountryOfBirth": "AF",
   "RegionOfBirth": null,
   "TownOfBirth": null,
   "ApplicantNumber": null,
   "CreatedBy": "1006911",
   "CreationDate": "2019-09-06T07:20:29.266+00:00",
   "LastUpdatedBy": "1006911",
   "LastUpdateDate": "2020-07-20T07:42:06.677+00:00"
  },
  {
   "PersonId": 100100124784130,
   "PersonNumber": "VIS_W_139",
   "CorrespondenceLanguage": "US",
   "BloodType": null,
   "DateOfBirth": "1985-07-11",
    ...
  }
 ]
}