scroll

04/10/2018 Acquisition of the deleted data using Read related APIs

Overview

HRBC Connect API 3.12.29 will add a function so that deleted records can be acquired by Read related APIs.

The addition of this function will affect the behavior only when the Parameter is explicitly specified. Existing apps are not affected.

Acquisition of the Deleted Data using Read Related APIs

[Target APIs]

Read method of Client, Recruiter, Job, Candidate, Resume, Process, Activity, Contract, and Sales

[Change details]

itemstate” is added as a Parameter that can be specified, allowing a user to make a request with the data status specified.

GET

.../v1/{Resource}?partition=[value]&count=[value]&start=[value]&field=[value,...]&condition=[field=value,...]&keywords=[value,...]&order=[value,...]&itemstate=[value]

 

Input Variables

The notes on the Parameters that can be specified and changes in them are as follows:

Required Parameter Definition
partition No change
count No change
start No change
field No change
In response to the addition of this function, Field:{Resource}.P_Deleted, which represents the deletion status, will be added to each Resource.
Note that there is no change in how to specify the Parameter.
condition

There is no change when “existing” is specified for the itemstate or the itemstate is not specified..
Below shows the three Fields that can be specified for “condition” and the conditions when “deleted” or “all” is specified for the itemstate.
Note that more than one of the following three conditions can be specified.

  1. {Resource}.P_Id
  2. {Resource}.P_UpdateDate
    The value that can be specified is a value between the date and time of the Request and the same time 90 days ago. No date and time earlier than this time can be specified.
    If nothing is specified, the same time 90 days prior to the data and time of the Request is assumed to be specified.
  3. {Resource}.P_UpdatedBy

*For deleted data, the specifications of {Resource}.P_UpdateDate and {Resource}.P_UpdatedBy are as follows:
 {Resource}.P_UpdateDate = Date and time of deletion
 {Resource}.P_UpdatedBy=Person who last updated the data before deletion

itemstate The deletion status of the data to be acquired can be specified.
The following values can be specified. If nothing is specified, “existing” is assumed to be specified.
 existing: Acquires data that are not deleted.
 deleted: Acquires the deleted data
 all: Acquires data in all statuses.
keywords No change
order No change

 

Result Values

When the processing is successfully completed, “200” is returned to the Response Header as the HTTP status, and the value that is described in Output Values can be acquired.

If an error occurs, a value other than 200 is returned.

 

Output Values

The output value can be acquired in the XML format. There is no change in response to the addition of this function.

Tag Definition
{Resource} Route element including {Resource} that meets the conditions.
The number of acquired data is set for Count, and the index of the acquired data is set for Start. Start is the index beginning with 0.
Lists every {Resource} as the Item elements.
 Total Attribute of {Resource} Indicates the total number of records that can be acquired under the specified search conditions.
 Count Attribute of {Resource} Indicates the number of records of the data acquired this time.
 Start Attribute of {Resource} Indicates the start index of the data acquired this time.
Code This is the code that represents the processing result. For details, see Result Code List.
Item Indicates one piece of {Resource} information. Includes a Field element.
 Field Stores the value of a specified item.
For the names of the elements, see the Field List of each Resource.
*The Filed that indicates the deletion status is not output.
In response to the addition of this function, Field:{Resource}.P_Deleted will be added to each Resource.
To output {Resource}.P_Deleted, it needs to be specified for the field Parameter when a Request is made.

*For the deleted data, the specifications of  {Resource}.P_UpdateDate and {Resource}.P_UpdatedBy are as follows:
 {Resource}.P_UpdateDate = Date and time of deletion
 {Resource}.P_UpdatedBy=Person who last updated the data before deletion

 

Sample

This sample code shown below is not encoded. In the case of an actual Request, encoding/decoding may be necessary depending on the content.

The sample below uses Client Read to acquire the deleted records under the condition that the last update user is User ID:1.

(Because Client.P_UpdateDate is not specified for the condition, the records that were deleted after the same time 90 days ago are acquired.)

 

Input Parameter

.../v1/client?partition=999999&field=Client.P_Id,Client.P_Name,Client.P_UpdateDate,Client.P_UpdatedBy,Client.P_Deleted&condition=Client.P_UpdatedBy:eq=1&itemstate=deleted

 

Output XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Client Total="1" Count="1" Start="0">
 <Code>0</Code>
 <Item>
  <Client.P_Id>100</Client.P_Id>
  <Client.P_Name>XX corporation</Client.P_Name>
  <Client.P_UpdateDate>2018/01/04 12:00:00</Client.P_UpdateDate>
  <Client.P_UpdatedBy>
   <User>
    <User.P_Id>1</User.P_Id>
   </User>
  </Client.P_UpdatedBy>
  <Client.P_Deleted>1</Client.P_Deleted>
 </Item>
</Client>

 

 
Was this article helpful?
0 out of 0 found this helpful