Skip to Main Content

Cloud Platform

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

hcmRestApi workers query name.LastName not working?

Martin...Dec 2 2021 — edited Dec 2 2021

Hi,
On this page:
REST API for Oracle HCM Cloud (0 Bytes)There is an example which says the API can be called as:

GET "https://<host>:<port>/hcmRestApi/resources/11.13.18.05/workers?q=names.LastName='Doe'"

When I try a query of this form, the response is always:
URLrequestparameterqwithvaluenames.LastName='Doe'isnotvalid.
Is it possible to confirm:
Does this type of call work?
Am I using the correct calling syntax?
Or am I missing something?

This post has been answered by Martin... on Feb 3 2024
Jump to Answer

Comments

DeloitteRob

yes this does not work and I have not been able to get this to work any way yet either.

Pradeep Kumar-Oracle

Hello, Just checking if anyone got a solution to this ?

Pradeep Kumar-Oracle

Just to update on this, I tried with "FullName" instead and it worked.
So, the call should be as below -

GET "https://<host>:<port>/hcmRestApi/resources/11.13.18.05/workers?q=FullName='Doe, Mic'"
user-uxa13

This is very frustrating. The documentation for worker api STILL (18 months later) has incorrect examples of how to retrieve a worker.

The employee api is being deprecated and we need to move everything over to the worker api. Oracle is making this job much more work than it needs to be by publishing incorrect documentation.

I hope they fix it.

Thank you @pradeep-kumar-oracle2 for your fix!!

Martin...
Answer

Hello,

I've just tried this query again …

GET "https://<host>:<port>/hcmRestApi/resources/latest/workers?q=names.LastName='Jones'"

And it is now working :-)

200 OK
{
	"items": [
		{
			"PersonId": 300000052307100,
			"PersonNumber": "1200243",
			...
			...
			},
			"names": {
				"items": [
					{
						"PersonNameId": 300000052307101,
						"EffectiveStartDate": "2021-11-24",
						"EffectiveEndDate": "4712-12-31",
						"LegislationCode": "GB",
						"LastName": "Jones",
						...
						...
}

Thank you for the fix

Marked as Answer by Martin... · Feb 3 2024
1 - 5

Post Details

Added on Dec 2 2021
5 comments
1,193 views