You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

REST API for Direct reports with worker type filter

edited May 23, 2024 7:32AM in HCM REST APIs 2 comments

Summary:


We are building Custom VBCS page, where manager can view their direct reportees. We are using below REST API and its getting the expected result but we want to see ONLY contingent worker type.

https://<>/hcmRestApi/resources/11.13.18.05/publicWorkers?expand=assignments.directReports&q=PersonNumber=<>

We want to filter the data to see the ONLY contingent worker type and tried to add in query parameter but its not working.

If add below worker type in query parameter its throwing an error message

https://<>/hcmRestApi/resources/11.13.18.05/publicWorkers?expand=assignments.directReports&q=PersonNumber=12345677 and assignments.directReports.WorkerType='C'

"Failed to build ViewCriteria from expression \"PersonNumber=12345677 and assignments.directReports.WorkerType='C'\" using view object PublicWorker. Unable to create criteria item from node: \"assignments\". ",

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!