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
Get Started with Redwood for Oracle Cloud HCM   Begin Now
To ensure that questions get required attention from community members and are NOT left unanswered, it’s important for the author to indicate (by selecting “Yes” or “No” when prompted) whether the question was answered. (newly added) Please note that it is also important to respond to EACH comment your question receives. Your Yes or No response ensures an accurate status for your question.

For more information, please refer to this announcement explaining best practices for getting answers to questions.

Querying workers API to fetch primary email

Summary:

I have a requirement where I wanted to fetch basic person and assignment details for employees in a single API call. I was trying to leverage the query parameters to query and filter the child collections of the workers, but I see all email addresses were being fetched -primary and non-primary.

https://xx99xx.oraclecloud.com/hcmRestApi/resources/latest/workers?q=PersonNumber=99 and emails.PrimaryFlag=true&fields=PersonNumber,PersonId;names:DisplayName;emails:EmailAddress,PrimaryFlag;nationalIdentifiers:NationalIdentifierNumber,LegislationCode,PrimaryFlag&onlyData=true

I found that this behavior is similar if I want to fetch a specific NID i.e., fetches all instead of one. There was an earlier post in this community that mentioned that we can verify if an attribute is queryable using /describe and I have seen that both NID and Email PrimaryFlag attribute says queryable: true. I am aware that I can do a second call to these child objects and then fetch the primary one using any query parameters or finder attributes. But I am

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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