Personnel
Version: 1.2 | Release Date: 30/01/2024
# Employee
# Fetch Employee Listing
# Description
Usage: Fetch Employee Listing
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:employee
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("employee"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "stSearch": "employee", "size": 10, "stSearchDisplay": "Employee", "values": [ { "code": "00006", "photoCode": "", "email": "hcm03@@xxx.xxx", "tel": "", "id": 49, "st_desc": "-00006", "st_id": 49, "st_code": "00006" }, {......} ] }
# Create Employee
# Description
Usage: Create Employee
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/employee HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:employee
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/employee"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("employee"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "employee": { "values": [ { "code": "test001", "desc": "test001", "joinDate": "2022-04-20", "birthday": "1998-10-01", "dept": 3, "position": 6 } ] } }
Response Sample
{ "recordId": 72524, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Combo Value", "msgCode": "core_143008" } ], "status": false }
# Load Employee
# Description
Usage: Load Employee Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/employee HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:employee
id long
(Query)Yes Employee ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/employee"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("employee"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "data": { "empuserinfo": [ { "hId": 72524, "code": "test001", "esspUser": true, "iRev": 1, "itemNo": "", "userId": 0, "i18nField": "{}", "desc_zh-TW": "", "id": 2463, "desc_en": "test001", "loginBlock": false, "desc": "test001", "desc_zh-CN": "" } ], "employee": [ {......} ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Employee
# Description
Usage: Update Employee
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/employee HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:employee
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/employee"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("employee"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "employee": { "values": [ { "id": 72524, "code": "test002", "tel": "123456789", "email": "123@qq.com", "weibo": "testweibo", "restCoutry": "中国", "restProvince": "广东", "restCity": "深圳" } ] } }
Response Sample
{ "recordId": 72524, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Email format is invalid", "msgCode": "core_145017" } ], "status": false }
# Delete Employee
# Description
Usage: Delete Employee
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/employee HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:employee
id long
(Query)Yes Employee ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/employee"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("employee"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Department
# Fetch Department Listing
# Description
Usage: Fetch Department Listing
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:dept
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("dept"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "stSearch": "dept", "size": 10, "stSearchDisplay": "Department", "values": [ { "code": "ACCT", "desc__lang": "会计部", "iRev": 33, "lastModifyDate": "2019-05-25 10:41:32", "dept.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 1, "st_desc": "ACCT-会计部", "st_id": 1, "st_code": "ACCT" }, {......} ] }
# Create Department
# Description
Usage: Create Department
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/dept HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:dept
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/dept"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("dept"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "dept": { "values": [ { "code": "test001", "desc": "test dept", "supDept": 1 } ] } }
Response Sample
{ "recordId": 5176, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "First level must be Business Entity", "msgCode": "ch01_emp_dept_100008" }, { "msgDetail": "Same Code found(dept.code)", "msgCode": "core_101903" } ], "status": false }
# Load Department
# Description
Usage: Load Department
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/dept HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:dept
id long
(Query)Yes Department ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/dept"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("dept"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "data": { "dept": [ { "udfattri7": 0, "addr2_en": "", "noticePeriodEndAppDay": false, "calDays1": 0, "useAccess": false, "udfattri4": 0, "calDays2": 0, "udfattri3": 0, "contactPerson_zh-CN": "", "udfattri2": 0, "expiredDate": -2209017600000, "udfattri1": 0, "sysJson": "", "viewCode": "dept", "remark_zh-TW": "", "acctNo": "", "useAccessBl": false, "tel": "", "id": 5176, "fax": "", "seniorityDateId": 0, "dissolved": false, "lastModifyDate": 1650447205000, "contactPerson_zh-TW": "", "createUid": 4, ...... } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Department
# Description
Usage: Update Department
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/dept HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:dept
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/dept"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("dept"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "dept": { "values": [ { "id": 5176, "tel": "123456789", "email": "123@qq.com", "website": "www.test.edu.cn", "addr": "中国广东深圳" } ] } }
Response Sample
{ "recordId": 5176, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Email format is invalid(dept.email)", "msgCode": "core_145017" } ], "status": false }
# Delete Department
# Description
Usage: Delete Department
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/dept HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:dept
id long
(Query)Yes Department ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/dept"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("dept"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Position
# Fetch Position Listing
# Description
Usage: Fetch Position Listing
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:position
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("position"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "stSearch": "position", "size": 10, "stSearchDisplay": "职位", "values": [ { "code": "HR", "desc__lang": "人事部门-简体", "iRev": 9, "lastModifyDate": "2021-03-15 12:27:43", "position.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 1, "st_desc": "人事部门-简体", "st_id": 1, "st_code": "HR" }, {......} ] }
# Create Position
# Description
Usage: Create Position
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/position HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:position
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/position"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("position"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "position": { "values": [ { "code": "test001", "desc": "test pos" } ] } }
Response Sample
{ "recordId": 375, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(position.code)", "msgCode": "core_101903" } ], "status": false }
# Load Position
# Description
Usage: Load Position
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/position HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:position
id long
(Query)Yes Position ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/position"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("position"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "data": { "position": [ { "udfattri8": 0, "udfattri7": 0, "udfattri6": 0, "lastModifyUid": 4, "udfattri5": 0, "calDays1": 0, "useAccess": false, "udfattri4": 0, "calDays2": 0, "expiredDate": -2209017600000, "sysJson": "", "require_zh-TW": "", "viewCode": "position", "udfattri9": 0, "beId": 0, "passProba": 0, "useAccessBl": false, "id": 375, "locked": false, "lastModifyDate": 1650449401000, "createUid": 4, ...... } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Position
# Description
Usage: Update Position
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/position HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:position
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/position"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("position"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "position": { "values": [ { "id": 375, "positionTypeId": 2, "probaPeriod": 6, "probaPeriodCombo": "mth" } ] } }
Response Sample
{ "recordId": 375, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Combo Value", "msgCode": "core_143008" } ], "status": false }
# Delete Position
# Description
Usage: Delete Position
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/position HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:position
id long
(Query)Yes Position ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/position"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("position"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Virtual Organization
# Fetch Virtual Organization List
# Description
Usage: Fetch Virtual Organization List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:virDept
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("virDept"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "stSearch": "virDept", "size": 10, "stSearchDisplay": "Virtual Organization", "values": [ { "code": "TT", "desc__lang": "", "iRev": 1, "lastModifyDate": "2016-11-16 09:51:09", "virdept.lastModifyUid.simpleUser.desc__lang": "", "id": 1, "st_desc": "TT", "st_id": 1, "st_code": "TT" }, {......} ] }
# Create Virtual Organization
# Description
Usage: Create Virtual Organization
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/virDept HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:virDept
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/virDept"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("virDept"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "virdept": { "values": [ { "code": "test001", "desc": "test Virtual Organization" } ] } }
Response Sample
{ "recordId": 30007, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(virdept.code)", "msgCode": "core_101903" } ], "status": false }
# Load Virtual Organization
# Description
Usage: Load Virtual Organization
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/virDept HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:virDept
id long
(Query)Yes Virtual Organization ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/virDept"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("virDept"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "data": { "virdept": [ { "attachmentNo": 0, "lastModifyUid": 4, "code": "test001", "useAccess": false, "expiredDate": -2209017600000, "iRev": 1, "sysJson": "", "viewCode": "virDept", "beId": 0, "expired": false, "printCount": 0, "useAccessBl": false, "id": 30007, "statusModifyDate": 1650511711000, "locked": false, "desc_en": "test Virtual Organization", "lastModifyDate": 1650511711000, "createUid": 4, "createDate": 1650511711000, "desc_zh-CN": "", "lastApproveUid": 0, "udfpp": 0, "expiredUid": 0, "useAccessWl": false, "supVirdept": 0, "i18nField": "{\"desc_en\": \"test Virtual Organization\"}", "desc_zh-TW": "", "useAccessAutoCalc": false, "status": "N", "desc": "test Virtual Organization" } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Virtual Organization
# Description
Usage: Update Virtual Organization
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/virDept HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:virDept
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/virDept"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("virDept"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "virdept": { "values": [ { "id": 30007, "supVirDept": 92 } ] }, "virdeptmember": { "values": [ { "virposition": 4, "userId": 2, "startDate": "2022-04-21", "endDate": "2022-02-21" }] } }
Response Sample
{ "recordId": 30007, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Expiry Date is earlier than Effective Date(virdeptmember.endDate.1)", "msgCode": "core_101907" } ], "status": false }
# Delete Virtual Organization
# Description
Usage: Delete Virtual Organization
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/virDept HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:virDept
id long
(Query)Yes Virtual Organization ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/virDept"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("virDept"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Headcount Setup
# Fetch Headcount Setup List
# Description
Fetch Headcount Setup List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:headcountRecord
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("headcountRecord"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "stSearch": "headcountRecord", "size": 10, "stSearchDisplay": "Headcount Setup", "values": [ { "code": "1403", "status": "Y", "iRev": 3, "lastModifyDate": "2018-02-07 14:40:50", "headcountRecord.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 56, "st_desc": "1403", "st_id": 56, "st_code": "1403" }, {......} ] }
# Create Headcount Setup
# Description
Usage: Create Headcount Setup
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/headcountRecord HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:headcountRecord
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/headcountRecord"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("headcountRecord"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "headcountrecord": { "values": [ { "code": "test001", "headcountType": 9 } ] } }
Response Sample
{ "recordId": 79, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(headcountrecord.code)", "msgCode": "core_101903" } ], "status": false }
# Load Headcount Setup
# Description
Usage: Load Headcount Setup
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/headcountRecord HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:headcountRecord
id long
(Query)Yes Headcount Setup ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/headcountRecord"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("headcountRecord"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "data": { "headcountrecord": [ { "headcountIdPrefix": "", "attachmentNo": 0, "lastModifyUid": 4, "code": "test001", "lastApproveUid": 4, "useAccess": false, "postStartAt": "1", "iRev": 1, "sysJson": "", "viewCode": "headcountRecord", "useAccessWl": false, "beId": 0, "headcountType": 9, "printCount": 0, "useAccessBl": false, "id": 79, "statusModifyDate": 1650522454000, "skipHCPlanCheck": 0, "lastModifyDate": 1650522454000, "useAccessAutoCalc": false, "createUid": 4, "createDate": 1650522454000, "status": "Y", "headcountIdPostfix": 1 } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Headcount Setup
# Description
Usage: Update Headcount Setup
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/headcountRecord HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:headcountRecord
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/headcountRecord"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("headcountRecord"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "headcountrecord": { "values": [ { "id": 79 } ] }, "headcountrecordt": { "values": [ { "headcountId": "202204", "dept": 1, "position": 1, "startDate": "2022-04-21" }] } }
Response Sample
{ "recordId": 79, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Expiry Date cannot be earlier than Effective Date.(headcountrecordt.endDate.1)", "msgCode": "core_101011" } ], "status": false }
# Delete Headcount Setup
# Description
Usage: Delete Headcount Setup
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/headcountRecord HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:headcountRecord
id long
(Query)Yes Headcount Setup ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/headcountRecord"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("headcountRecord"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Employee Change Note
# Fetch Employee Change Note List
# Description
Usage: Fetch Employee Change Note List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:empChgNote
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("empChgNote"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "stSearch": "empChgNote", "size": 10, "stSearchDisplay": "Employee Change Note", "values": [ { "code": "00004001", "effDate": "2017-07-01", "empChgNote.empId.employee.code": "00004", "empChgNote.empId.employee.desc": "123413weibo122", "empChgNote.empId.employee.dept.dept.desc__lang": "人事部门-简体", "empChgNote.empId.employee.position.position.desc__lang": "美工-SC", "isHistData": false, "isRun": true, "status": "Y", "iRev": 4, "lastModifyDate": "2018-02-10 10:35:27", "empChgNote.lastModifyUid.simpleUser.desc__lang": "BT_SC", "id": 136, "st_desc": "00004001", "st_id": 136, "st_code": "00004001" }, {......} ] }
# Create Employee Change Note
# Description
Usage: Create Employee Change Note
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/empChgNote HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:empChgNote
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/empChgNote"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("empChgNote"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "empchgnote": { "values": [ { "code": "20220421", "empId": 49, "effDate": "2022-04-21" } ] } }
Response Sample
{ "recordId": 566, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "he following employees have duplicated non-approved ECN(s)", "msgCode": "ch01_emp_empChgNote_100010" }, { "msgDetail": "Same Code found(empchgnote.code)", "msgCode": "core_101903" } ], "status": false }
# Load Employee Change Note
# Description
Usage: Load Employee Change Note
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/empChgNote HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:empChgNote
id long
(Query)Yes Employee Change Note ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/empChgNote"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("empChgNote"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "data": { "empchgnote": [ { "udfappdate": -2209017600000, "attachmentNo": 0, "empId": 49, "udfdeptIdStr": "", "runDate": -2209017600000, "lastModifyUid": 4, "code": "20220421", "checkReCalcMPFJson": "", "useAccess": false, "skipECNReCalcMPFConHldCheck": 0, "iRev": 1, "sysJson": "", "viewCode": "empChgNote", "skipECNProbaNeedCheck": 0, "caseSummary": "", "beId": 0, "effDate": 1650470400000, "isHistData": false, "skipECNBackdateRecChgSameFieldCheck": 0, "udfdeptId": 0, "printCount": 0, "useAccessBl": false, "id": 566, "caseSummaryTC": "", "udfposIdStr": "", "statusModifyDate": 1650524749000, "isProbaNeeded": false, "lastModifyDate": 1650524749000, "createUid": 4, "createDate": 1650524749000, "isUpdateEmpMPF": false, "lastApproveUid": 0, "useAccessWl": false, "errorMsg": "", "caseSummarySC": "", "isRun": false, "useAccessAutoCalc": false, "udfposId": 0, "status": "N" } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Employee Change Note
# Description
Usage: Update Employee Change Note
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/empChgNote HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:empChgNote
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/empChgNote"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("empChgNote"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "empchgnote": { "values": [ { "id": 375, "isProbaNeeded": true, "code": "20220421" } ] }, "employee": { "values": [ { "dept": 1, "position": 7 }] } }
Response Sample
{ "recordId": 375, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(empchgnote.code)", "msgCode": "core_101903" } ], "status": false }
# Delete Employee Change Note
# Description
Usage: Delete Employee Change Note
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/empChgNote HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:empChgNote
id long
(Query)Yes Employee Change Note ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/empChgNote"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("empChgNote"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Probation Log
# Fetch Probation Log List
# Description
Usage: Fetch Probation Log List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:probaLog
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("probaLog"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "stSearch": "probaLog", "size": 10, "stSearchDisplay": "Probation Log", "values": [ { "code": "PL170001", "probaLog.empId.employee.code": "BTEST010", "probaLog.empId.employee.desc": "BTEST010", "probaLog.empId.employee.dept.dept.desc__lang": "1455-EN", "probaLog.empId.employee.position.position.desc__lang": "美工-SC", "probaStatus": "close", "startDate": "2017-02-07", "endDate": "1899-12-31", "status": "Y", "iRev": 2, "lastModifyDate": "2017-08-17 12:18:26", "probaLog.lastModifyUid.simpleUser.desc__lang": "BT_SC", "id": 257, "st_desc": "PL170001", "st_id": 257, "st_code": "PL170001" }, {......} ] }
# create Probation Log
# Create Employee
# Load Probation Log
# Description
Usage: Load Probation Log
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/probaLog HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:probaLog
id long
(Query)Yes Probation Log ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/probaLog"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("probaLog"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "data": { "probalog": [ { "attachmentNo": 0, "empId": 70584, "probaType": "onBoardProba", "lastModifyUid": 10, "code": "PL170001", "useAccess": false, "endDate": -2209104000000, "iRev": 2, "remark": "Automatically generated by new join employee record", "sysJson": "", "refRecordClose": "PR170021", "viewCode": "probaLog", "udfprobaresult": 0, "beId": 0, "printCount": 0, "useAccessBl": false, "details": "", "id": 257, "statusModifyDate": 1502943506000, "lastModifyDate": 1502943506000, "createUid": 10, "createDate": 1502943506000, "lastApproveUid": 0, "useAccessWl": false, "probaStatus": "close", "useAccessAutoCalc": false, "startDate": 1486396800000, "refRecordCreate": "BTEST10", "status": "Y" } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Probation Log
# Description
Usage: Update Probation Log
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/probaLog HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:probaLog
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/probaLog"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("probaLog"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "probalog": { "values": [ { "id": 257, "udfprobaresult": 13, "remark": "Automatically generated by new join employee record" } ] } }
Response Sample
{ "recordId": 257, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "End Date must be later than Start Date(probalog.endDate.1)", "msgCode": "ch01_emp_employee_100018" } ], "status": false }
# Delete Probation Log
# Delete Employee
# Probation Result
# Fetch Probation Result List
# Description
Usage: Fetch Probation Result List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:probaResult
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("probaResult"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "stSearch": "probaResult", "size": 10, "stSearchDisplay": "Probation Result", "values": [ { "code": "AA002", "probaResult.empId.employee.code": "AA002", "probaResult.empId.employee.desc": "AA002", "probaResult.empId.employee.dept.dept.desc__lang": "1455-EN", "probaResult.empId.employee.position.position.desc__lang": "", "status": "Y", "iRev": 7, "lastModifyDate": "2020-04-21 18:42:51", "probaResult.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 13, "st_desc": "AA002", "st_id": 13, "st_code": "AA002" }, {......} ] }
# Create Probation Result
# Description
Usage: Create Probation Result
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/probaResult HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:probaResult
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/probaResult"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("probaResult"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "probaresult": { "values": [ { "code": "test001", "probaLogId": 296 } ] } }
Response Sample
{ "recordId": 236, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(probaresult.code)", "msgCode": "core_101903" } ], "status": false }
# Load Probation Result
# Description
Usage: Load Probation Result
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/probaResult HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:probaResult
id long
(Query)Yes Probation Result ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/probaResult"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("probaResult"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "data": { "probaresult": [ { "attachmentNo": 0, "empId": 70982, "reason": "", "lastModifyUid": 4, "code": "test001", "lastApproveUid": 0, "useAccess": false, "iRev": 1, "sysJson": "", "viewCode": "probaResult", "useAccessWl": false, "beId": 0, "result": "pass", "newEndDate": -2209017600000, "printCount": 0, "useAccessBl": false, "probaLogId": 296, "id": 236, "statusModifyDate": 1650528443000, "lastModifyDate": 1650528443000, "useAccessAutoCalc": false, "createUid": 4, "createDate": 1650528443000, "status": "N" } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Probation Result
# Description
Usage: Update Probation Result
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/probaResult HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:probaResult
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/probaResult"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("probaResult"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "probaresult": { "values": [ { "id": 157, "result": "extendProba", "newEndDate": "2022-04-21" } ] } }
Response Sample
{ "recordId": 157, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "<New End Date> must be blank(probaresult.newEndDate.1)", "msgCode": "ch01_emp_probaResult_100003" } ], "status": false }
# Delete Probation Result
# Description
Usage: Delete Probation Result
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/probaResult HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:probaResult
id long
(Query)Yes Probation Result ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/probaResult"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("probaResult"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "Only the latest record can be deleted(probaresult.code.1)", "msgCode": "core_101013" } ], "status": false }
# Blocklist
# Fetch Blocklist List
# Description
Usage: Fetch Blocklist List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:blacklist
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("blacklist"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "stSearch": "blacklist", "size": 10, "stSearchDisplay": "Blocklist", "values": [ { "code": "17062901", "blacklist.empId.employee.code": "", "blacklist.empId.employee.desc": "", "blacklist.empId.employee.dept.dept.desc__lang": "", "blacklist.empId.employee.position.position.desc__lang": "", "isReleased": false, "releasedDate": "1900-01-01", "status": "Y", "iRev": 4, "lastModifyDate": "2017-12-21 09:24:12", "blacklist.lastModifyUid.simpleUser.desc__lang": "", "id": 35, "st_desc": "17062901", "st_id": 35, "st_code": "17062901" }, {......} ] }
# Create Blocklist
# Description
Usage: Create Blocklist
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/blacklist HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:blacklist
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/blacklist"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("blacklist"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "blacklist": { "values": [ { "code": "test001", "idTypeId": 31, "idNo": "12345" } ] } }
Response Sample
{ "recordId": 49, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(blacklist.code)", "msgCode": "core_101903" } ], "status": false }
# Load Blocklist
# Description
Usage: Load Blocklist
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/blacklist HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:blacklist
id long
(Query)Yes Blocklist ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/blacklist"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("blacklist"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "data": { "blacklist": [ { "releasedDate": -2209017600000, "attachmentNo": 0, "empId": 70248, "udfattri29": 0, "lastModifyUid": 4, "code": "20200619", "useAccess": false, "udfattri2": 0, "blacklistTypeId": 0, "udfattri23": 0, "udfattri24": 0, "empName_en": "17060601", "iRev": 1, "remark": "", "udfattri21": 0, "sysJson": "", "udfattri22": 0, "udfattri27": 0, "viewCode": "blacklist", "idNo": "17060601", "udfattri28": 0, "udfattri25": 0, "idTypeId": 31, "udfattri26": 0, "beId": 0, "photoCode": "", "empName": "简体", "printCount": 0, "useAccessBl": false, "id": 47, "statusModifyDate": 1592539552000, "isReleased": false, "empName_zh-TW": "繁体", "lastModifyDate": 1592539552000, "createUid": 4, "createDate": 1592539552000, "lastApproveUid": 4, "releasedBy": 0, "useAccessWl": false, "i18nField": "{\"empName_en\": \"17060601\", \"empName_zh-CN\": \"简体\", \"empName_zh-TW\": \"繁体\"}", "empName_zh-CN": "简体", "blacklistReasonId": 0, "useAccessAutoCalc": false, "status": "Y" } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Blocklist
# Description
Usage: Update Blocklist
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/blacklist HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:blacklist
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/blacklist"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("blacklist"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "blacklist": { "values": [ { "id": 49, "empId": 51 } ] } }
Response Sample
{ "recordId": 49, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "必填项为空(blacklist.idTypeId,blacklist.idNo)", "msgCode": "core_101905" } ], "status": false }
# Delete Blocklist
# Description
Usage: Delete Blocklist
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/blacklist HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:blacklist
id long
(Query)Yes Blocklist ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/blacklist"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("blacklist"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Job Suspension
# Fetch Job Suspension List
# Description
Usage: Fetch Job Suspension List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:jobSuspension
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("jobSuspension"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "stSearch": "jobSuspension", "size": 10, "stSearchDisplay": "Job Suspension", "values": [ { "code": "17120402", "effDate": "2017-01-01", "jobSuspension.empId.employee.code": "17120401", "jobSuspension.empId.employee.desc": "17120401", "jobSuspension.empId.employee.dept.dept.desc__lang": "出勤部门_cn", "jobSuspension.empId.employee.position.position.desc__lang": "出勤员_cn", "end": true, "status": "Y", "iRev": 10, "lastModifyDate": "2019-10-10 11:41:34", "jobSuspension.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 16, "st_desc": "17120402", "st_id": 16, "st_code": "17120402" }, {......} ] }
# Create Job Suspension
# Description
Usage: Create Job Suspension
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/jobSuspension HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:jobSuspension
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/jobSuspension"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("jobSuspension"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "jobsuspension": { "values": [ { "code": "test001", "effDate": "2022-04-22", "empId": 49 } ] } }
Response Sample
{ "recordId": 54, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Another Job Suspension Record(s) overlapped with editing record.", "msgCode": "ch01_emp_jobSuspension_100005" }, { "msgDetail": "Same Code found(jobsuspension.code)", "msgCode": "core_101903" } ], "status": false }
# Load Job Suspension
# Description
Usage: Load Job Suspension
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/jobSuspension HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:jobSuspension
id long
(Query)Yes Job Suspension ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/jobSuspension"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("jobSuspension"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "data": { "jobsuspension": [ { "attachmentNo": 0, "empId": 10081, "lastModifyUid": 4, "code": "D5", "jobSuspensionType": 0, "useAccess": false, "endDate": 1573142400000, "iRev": 3, "sysJson": "", "udfaskif": false, "viewCode": "jobSuspension", "beId": 0, "effDate": 1551369600000, "printCount": 0, "useAccessBl": false, "end": false, "id": 45, "statusModifyDate": 1591266079000, "lastModifyDate": 1591266079000, "createUid": 4, "affectSeniority": false, "createDate": 1591266072000, "jobSuspensionIntention": 0, "lastApproveUid": 4, "useAccessWl": false, "allowPayCalc": false, "lockAccount": false, "replacement": 10081, "useAccessAutoCalc": false, "remarks": "", "status": "Y" } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Job Suspension
# Description
Usage: Update Job Suspension
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/jobSuspension HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:jobSuspension
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/jobSuspension"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("jobSuspension"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "jobsuspension": { "values": [ { "id": 54, "jobSuspensionType": 1, "endDate": "2022-04-21" } ] } }
Response Sample
{ "recordId": 54, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "End Date cannot be earlier than Effective Date", "msgCode": "core_101011" } ], "status": false }
# Delete Job Suspension
# Description
Usage: Delete Job Suspension
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/jobSuspension HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:jobSuspension
id long
(Query)Yes Job Suspension ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/jobSuspension"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("jobSuspension"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Termination
# Fetch Termination List
# Description
Usage: Fetch Termination List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:termination
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("termination"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "stSearch": "termination", "size": 10, "stSearchDisplay": "Termination", "values": [ { "code": "17060601", "effDate": "2017-08-01", "termination.empId.employee.code": "17060601", "termination.empId.employee.desc": "简体", "termination.empId.employee.dept.dept.desc__lang": "出勤部门_cn", "termination.empId.employee.position.position.desc__lang": "出勤员_cn", "status": "Y", "iRev": 24, "lastModifyDate": "2020-06-23 16:39:16", "termination.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 52, "st_desc": "17060601702482017-08-01", "st_id": 52, "st_code": "17060601" }, {......} ] }
# Create Termination
# Description
Usage: create Termination
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/termination HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:termination
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/termination"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("termination"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "termination": { "values": [ { "code": "test001", "effDate": "2022-04-22", "empId": 49, "applyDate": "2022-04-22", "reqEffDate": "2022-05-01" } ] } }
Response Sample
{ "recordId": 489, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "The employee has another Termination Record", "msgCode": "ch01_emp_termination_100004" }, { "msgDetail": "Same Code found(termination.code)", "msgCode": "core_101903" } ], "status": false }
# Load Termination
# Description
Usage: Load Termination
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/termination HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:termination
id long
(Query)Yes Termination ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/termination"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("termination"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "data": { "termination": [ { "reason": 0, "lastModifyUid": 4, "useAccess": false, "sysJson": "", "type": 0, "viewCode": "termination", "actNoticeUnit": "days", "payer": "nil", "udfctest": "", "beId": 0, "noticeReqUnit": "days", "updateEmployment": 0, "effDate": 1650556800000, "empTurnoverTypeId": 0, "autoinbl": false, "useAccessBl": false, "id": 489, "lastModifyDate": 1650599678000, "createUid": 4, "terminaLetter": "", "lastApproveUid": 4, ...... } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Termination
# Description
Usage: Update Termination
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/termination HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:termination
entity String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/termination"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("termination"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "termination": { "values": [ { "id": 489, "empId": 1, "reqEffDate": "2022-04-21" } ] } }
Response Sample
{ "recordId": 489, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Data Found(termination.empId)", "msgCode": "core_143009" } ], "status": false }
# Delete Termination
# Description
Usage: Delete Termination
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/termination HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:termination
id long
(Query)Yes Termination ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/termination"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("termination"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Load EBI data
# Employee Listing
# Description
Usage: Run EBI [Employee Listing], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "size": 10, "rows": [ { "T1_A_employStatus": "在职", "T1_C_desc__lang": "D122", "aiM18ReservedCol_dataIndex": 1, "T1_A_terminateDate": "", "T1_B_desc__lang": "开发部", "T1_A_id": "49", "T1_A_joinDate": "2017/02/06", "T1_A_code": "00006" }, ...... ] }
# Department Listing
# Description
Usage: Run EBI [Department Listing], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "size": 10, "rows": [ { "T1_A_deptBeId": "2", "aiM18ReservedCol_dataIndex": 1, "T1_A_deptBeId_code": "SZO", "T1_A_id": "1", "T1_A_supDept_desc__lang": "SZO", "T1_A_email": "", "T1_A_desc__lang": "会计部", "T1_A_supDept_code": "SZO", "T1_A_supDept": "2", "T1_A_code": "ACCT" }, ...... ] }
# Department Head Listing
# Description
Usage: Run EBI [Department Head Listing], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "size": 10, "rows": [ { "T3_A_id": "8", "MAIN_endDate": "9999/12/31", "aiM18ReservedCol_dataIndex": 1, "T1_A_id": "1", "MAIN_inCharge": "否", "MAIN_startDate": "", "T2_A_id": "2", "T1_A_code": "ACCT", "T2_A_code": "2", "T3_A_code": "SD" }, ...... ] }
# Position Listing
# Description
Usage: Run EBI [Position Listing], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "size": 10, "rows": [ { "T1_A_require__lang": "简体-<br>工作细心<br>每周汇报工作进度", "T1_A_positionTypeId_code": "", "T1_A_probaPeriodCombo": "月", "aiM18ReservedCol_dataIndex": 1, "T1_A_id": "1", "T1_A_desc__lang": "人事部门-简体", "T1_A_probaPeriod": "3", "T1_A_positionTypeId": "0", "T1_A_code": "HR" }, ...... ] }
# Planned Headcount Listing
# Description
Usage: Run EBI [Planned Headcount Listing], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "size": 10, "rows": [ { "MAIN_udfHCrace_code": "0", "MAIN_endDate": "9999/12/31", "aiM18ReservedCol_dataIndex": 1, "T1_A_id": "4", "MAIN_startDate": "2014/01/01", "MAIN_headcountId": "A2", "MAIN_code": "S001", "T1_A_code": "T001" }, ...... ] }
# Headcount Movement Report
# Description
Usage: Run EBI [Headcount Movement Report], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "size": 10, "rows": [ { "MAIN_empHcHeadcount": "0.5000", "T1_A_desc": "0002", "T2_A_desc": "AAA的说明", "MAIN_endDate": "9999年12月31日", "aiM18ReservedCol_dataIndex": 1, "MAIN_empHcStartDate": "2020年01月01日", "MAIN_startDate": "2017年03月27日", "MAIN_headcountId": "SC0101", "T1_C_desc": "00005", "T1_B_desc": "00001", "MAIN_headcount": "0.5000", "T4_A_desc": "SC01说明", "T1_A_id": "2982", "MAIN_empHcEndDate": "9999年12月31日", "T3_A_desc": "Social Worker 01 SC", "T1_A_code": "0002" }, ...... ] }
# Headcount Fulfillment Report
# Description
Usage: Run EBI [Headcount Fulfillment Report], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "size": 10, "rows": [ { "MAIN_empHcHeadcount": "0.0000", "T1_A_desc": "", "T2_A_desc": "AAA的说明", "MAIN_endDate": "9999年12月31日", "aiM18ReservedCol_dataIndex": 1, "MAIN_headcount": "1.0000", "T1_A_id": "0", "T3_A_desc": "Social Worker 01 SC", "MAIN_startDate": "2017年03月27日", "MAIN_headcountId": "SC0102", "T1_A_code": "" }, ...... ] }
# Virtual Organization Head Listing
# Description
Usage: Run EBI [Virtual Organization Head Listing], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "size": 5, "rows": [ { "T2_A_employeeId_code": "A001", "T2_A_employeeId_desc__lang": "A001 S", "T2_A_employeeId": "10184", "T3_A_id": "2", "MAIN_endDate": "9999/12/31", "aiM18ReservedCol_dataIndex": 1, "T1_A_id": "5", "T3_A_desc__lang": "", "T2_A_id": "72", "T3_A_code": "V03", "T1_A_code": "TA", "T2_A_code": "A001" }, ...... ] }
# Virtual Organization Member Listing
# Description
Usage: Run EBI [Virtual Organization Member Listing], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "size": 10, "rows": [ { "T1_A_employeeId_desc__lang": "A001 S", "T3_A_id": "2", "aiM18ReservedCol_dataIndex": 1, "T1_A_employeeId": "10184", "T1_A_id": "72", "MAIN_startDate": "", "T3_A_desc__lang": "", "T2_A_id": "4", "T3_A_code": "V03", "T2_A_code": "Consultant", "T1_A_code": "A001", "T1_A_employeeId_code": "A001" }, ...... ] }
# Organization Chart Report
# Description
Usage: Run EBI [Organization Chart Report], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "size": 10, "rows": [ { "T2_A_effDate": "2017/06/05", "MAIN_subCode": "", "aiM18ReservedCol_dataIndex": 1, "MAIN_subDesc": "", "T1_A_id": "2", "T2_A_currentEff": "否", "T2_A_id": "50", "T2_A_code": "YTEST1", "T2_A_effType": "立即生效", "T1_A_code": "SZO", "MAIN_level": "1" }, ...... ] }
# Employee Reporting Line Listing
# Description
Usage: Run EBI [Employee Reporting Line Listing], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "size": 10, "rows": [ { "T_A_code": "T032201", "T_A_id": "10004", "T1_A_endDate": "", "T1_A_inCharge": "否", "aiM18ReservedCol_dataIndex": 1, "T1_C_code": "SD", "T1_A_startDate": "", "T1_B_id": "2", "T1_C_id": "8", "T1_B_code": "2" }, ...... ] }
# Employee Education Report
# Description
Usage: Run EBI [Employee Education Report], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "size": 10, "rows": [ { "T2_A_dateFromYear": "1900", "T2_C_desc": "EDU01", "aiM18ReservedCol_dataIndex": 1, "T2_A_dateToYear": "1900", "T1_A_id": "10006", "T2_A_isHighestEducation": "是", "T2_A_majorSubject": "fdfd", "T1_A_code": "DT004" }, ...... ] }
# Employee Asset Allocation Listing
# Description
Usage: Run EBI [Employee Asset Allocation Listing], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "size": 10, "rows": [ { "T2_B_code": "Phone", "aiM18ReservedCol_dataIndex": 1, "T2_returnUnit": "", "T2_A_assetUnit": "个", "T1_A_id": "49", "T2_returnQty": "0.0", "T2_B_id": "4", "T1_A_code": "00006", "T2_A_assetQty": "2.00" }, ...... ] }
# Employee License Report
# Description
Usage: Run EBI [Employee License Report], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "size": 10, "rows": [ { "L_B_id": "1", "MF_A_id": "51", "L_A_effDateTo": "2017/02/02", "L_A_licenseNo": "testaa", "L_A_hId": "51", "aiM18ReservedCol_dataIndex": 1, "L_A_isNewWorkingVisa": "否", "MF_A_code": "00004", "L_B_code": "aa", "L_A_effDateFrom": "2017/01/01" }, ...... ] }
# Employee Health Report
# Description
Usage: Run EBI [Employee Health Report], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSO