How do we fetch the name of the worker manager via the HCM REST API?
Summary:
How do we fetch the name of the worker manager via the HCM REST API?
Content (please ensure you mask any confidential information):
We can fetch data for a worker with the following REST call on the worker API:
{{ORACLE_HCM_BASE_URL}}/hcmRestApi/resources/11.13.18.05/workers?onlyData=true&expand=workRelationships.assignments.managers&fields=PersonNumber;names:FirstName,LastName;workRelationships:StartDate,TerminationDate;workRelationships.assignments:DepartmentName,LocationCode;workRelationships.assignments.managers:ManagerAssignmentId&limit=1&q=PersonNumber=105803
Then we will get the following response:
{
"items": [
{
"PersonNumber": "105803",
"names": [
{
"FirstName": "xxxxx",
"LastName": "yyyyy"
}
],
"workRelationships": [
{
"StartDate": "2024-07-15",
"TerminationDate": null,
"assignments": [
{
"DepartmentName": "BI & Data Integration & Architecture",
"LocationCode": "LUX_HQ",