Zap
ZAP
This table shows the required date effective header parameters and the criteria to perform a ZAP operation on date effective objects.
| Header Attribute | Applicable | Required | Default Value | Criteria |
|---|---|---|---|---|
|
|
No |
NA |
NA |
NA |
|
|
No |
NA |
NA |
NA |
|
|
Yes |
Yes |
NA |
You must provide the value |
|
|
No |
NA |
NA |
NA |
|
|
No |
NA |
NA |
NA |
|
|
No |
NA |
NA |
NA |
Examples
Let's look at some examples
of the ZAP operation
performed on the visasPermits child resource of workers to delete records for date effective objects.
Let's say that Mark has two visa records, as shown in the table. Each row represents a physical record with an effective start date and an effective end date. This sample data is used in the following examples to retrieve the appropriate records, based on the context date provided, and delete them.
| Physical Record | Effective Start Date | Effective End Date | Visa |
|---|---|---|---|
|
1 |
2016-01-01 |
4712-12-31 |
V1 |
|
1 |
2016-01-01 |
2016-12-31 |
V2 |
|
2 |
2017-01-01 |
2017-12-31 |
V2 |
|
3 |
2018-01-01 |
2018-12-31 |
V2 |
|
4 |
2019-01-01 |
4712-12-31 |
V2 |
Example 1
Let's get Mark's worker record effective as of 2019-02-25 and obtain the visa record to be deleted.
- Retrieve the worker record by performing
a GET operation on the
workersresource, providing theeffectiveDateparameter in the URL.GET /hcmRestApi/resources/11.13.18.05/workers?q=PersonId={id}&effectiveDate=2019-02-25 - Obtain the
visasPermitschild singular link from the response. - Perform a DELETE operation on the
visasPermitschild link by providing theRangeModein theeffective-Ofheader attribute.DELETE /hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/visasPermits/{VisaPermitId}Header
REST-Framework-Version : 4 Content-Type : application/vnd.oracle.adf.resourceitem+json effective-Of : RangeMode=ZAP - The entire record is deleted.
Before Deletion After Deletion Physical Record Effective Start Date Effective End Date Visa Physical Record Effective Start Date Effective End Date Visa 1
2016-01-01
4712-12-31
V1
Entire record is deleted.
Example 2
Let's get Mark's worker record effective as of 2018-03-01 and obtain the visa record to be deleted.
- Retrieve the worker record by performing
a GET operation on the
workersresource, providing theeffectiveDateparameter in the URL.GET /hcmRestApi/resources/11.13.18.05/workers?q=PersonId={id}&effectiveDate=2018-03-01 - Obtain the
visasPermitschild singular link from the response. - Perform a DELETE operation on the
visasPermitschild link by providing theRangeModein theeffective-Ofheader attribute.DELETE /hcmRestApi/resources/11.13.18.05/workers/{workersUniqID}/child/visasPermits/{VisaPermitId}Header
REST-Framework-Version : 4 Content-Type : application/vnd.oracle.adf.resourceitem+json effective-Of : RangeMode=ZAP - The entire record is deleted.
Before Deletion After Deletion Physical Record Effective Start Date Effective End Date Visa Physical Record Effective Start Date Effective End Date Visa 1
2016-01-01
2016-12-31
V2
Entire record is deleted.
2
2017-01-01
2017-12-31
V2
3
2018-01-01
2018-12-31
V2
4
2019-01-01
4712-12-31
V2