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

RangeStartDate

No

NA

NA

NA

RangeEndDate

No

NA

NA

NA

RangeMode

Yes

Yes

NA

You must provide the value ZAP.

RangeSpan

No

NA

NA

NA

RangeStartSequence (MCPD Only)

No

NA

NA

NA

RangeEndSequence (MCPD Only)

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.

  1. Retrieve the worker record by performing a GET operation on the workers resource, providing the effectiveDate parameter in the URL.
    GET
    
    /hcmRestApi/resources/11.13.18.05/workers?q=PersonId={id}&effectiveDate=2019-02-25
  2. Obtain the visasPermits child singular link from the response.
  3. Perform a DELETE operation on the visasPermits child link by providing the RangeMode in the effective-Of header 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
  4. 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.

  1. Retrieve the worker record by performing a GET operation on the workers resource, providing the effectiveDate parameter in the URL.
    GET
    
    /hcmRestApi/resources/11.13.18.05/workers?q=PersonId={id}&effectiveDate=2018-03-01
  2. Obtain the visasPermits child singular link from the response.
  3. Perform a DELETE operation on the visasPermits child link by providing the RangeMode in the effective-Of header 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
  4. 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