GET
Date effective header parameters aren't required when performing a GET operation on date effective objects. Records are retrieved based on these criteria.
Header Attribute | Applicable | Required | Default Value | Criteria |
---|---|---|---|---|
|
No |
NA |
NA |
All the date effective records for both the parent and child objects are retrieved as of the context date. Context date is the value provided for the |
|
No |
NA |
NA |
|
|
No |
NA |
NA |
|
|
No |
NA |
NA |
|
|
No |
NA |
NA |
|
|
No |
NA |
NA |
Examples
Let's say that Mark has an assignment with four physical records, as shown in the table. Each row represents a physical record with an effective start date and an effective end date. This data is used in the following examples to retrieve the assignment details based on the context date provided.
Physical Record | Effective Start Date | Effective End Date | Department |
---|---|---|---|
1 |
2016-01-01 |
2016-12-31 |
D1 |
2 |
2017-01-01 |
2017-12-31 |
D1 |
3 |
2018-01-01 |
2018-12-31 |
D1 |
4 |
2019-01-01 |
4712-12-31 |
D2 |
Example 1
Let's retrieve Mark's assignment details without providing a context date.
- Retrieve the worker record by performing a GET operation on the
workers
resource using this URL format.GET /hcmRestApi/resources/11.13.18.05/workers?q=PersonId={id}
- Obtain the
assignments
child singular link from the response and perform a GET operation..GET /hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/PeriodOfServiceId}/ child/assignments/{assignmentsUniqID}
- Verify the assignment details returned in the response. This operation retrieves physical record 4.
Physical Record Effective Start Date Effective End Date Department 1
2016-01-01
2016-12-31
D1
2
2017-01-01
2017-12-31
D1
3
2018-01-01
2018-12-31
D1
4
2019-01-01
4712-12-31
D2
Example 2
Let's retrieve Mark's assignment details effective as of 2018-06-01.
- Retrieve the worker record by performing a GET operation on the
workers
resource, providing theeffectiveDate
parameter in the URL.GET /hcmRestApi/resources/11.13.18.05/workers?q=PersonId={id}&effectiveDate=2018-06-01
- Obtain the
assignments
child singular link from the response and perform a GET operation..GET /hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/workRelationships/{PeriodOfServiceId}/ child/assignments/{assignmentsUniqID}
- Verify the assignment details returned in the response. This operation retrieves physical record 3.
Physical Record Effective Start Date Effective End Date Department 1
2016-01-01
2016-12-31
D1
2
2017-01-01
2017-12-31
D1
3
2018-01-01
2018-12-31
D1
4
2019-01-01
4712-12-31
D2