Attendance
Version: 1.2 | Release Date: 30/01/2024
# Ad Hoc Work Group
# Fetch Ad Hoc Work Group List
# Description
Usage: Fetch Ad Hoc Work Group 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:workgroupassign
......)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("workgroupassign"); 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": "workgroupassign", "size": 10, "stSearchDisplay": "Ad Hoc Work Group", "values": [ { "code": "111", "desc": "22", "startDate": "2018-07-10", "endDate": "2018-07-10", "workgroupassign.personInCharge.employee.code": "00006", "workgroupassign.workgroupid.workgroupset.desc__lang": "SDTEST01", "status": "Y", "iRev": 3, "lastModifyDate": "2018-07-10 18:52:25", "workgroupassign.lastModifyUid.simpleUser.desc__lang": "", "id": 8, "st_desc": "22", "st_id": 8, "st_code": "111" }, {......} ] }
# Create Ad Hoc Work Group
# Description
Usage: Create Ad Hoc Work Group
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/workgroupassign 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:workgroupassign
entitYes 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/workgroupassign"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("workgroupassign"); 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:
{ "workgroupassign": { "values": [ { "code": "test001", "desc": "测试临时班组", "startDate": "2022-04-29", "endDate": "2022-10-01", "workgroupid": 12, "personInCharge": 49 } ] } }
Response Sample
{ "recordId": 18, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(workgroupassign.code)", "msgCode": "core_101903" } ], "status": false }
# Load Ad Hoc Work Group
# Description
Usage: Load Ad Hoc Work Group
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/workgroupassign 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:workgroupassign
id long
(Query)Yes Ad Hoc Work Group 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/workgroupassign"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("workgroupassign"); 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": { "workgroupassign": [ { "attachmentNo": 0, "lastModifyUid": 4, "code": "test001", "useAccess": false, "endDate": 1664553600000, "expiredDate": -2209017600000, "iRev": 1, "sysJson": "", "viewCode": "workgroupassign", "beId": 0, "workgroupid": 12, "expired": false, "printCount": 0, "useAccessBl": false, "id": 18, "statusModifyDate": 1651216558000, "locked": false, "desc_en": "测试临时班组", "lastModifyDate": 1651216558000, "createUid": 4, "personInCharge": 49, "createDate": 1651216558000, "desc_zh-CN": "", "lastApproveUid": 4, "expiredUid": 0, "useAccessWl": false, "i18nField": "{\"desc_en\": \"测试临时班组\"}", "overridesEmpShift": true, "desc_zh-TW": "", "useAccessAutoCalc": false, "startDate": 1651161600000, "status": "Y", "desc": "测试临时班组" } ] }, "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 Ad Hoc Work Group
# Description
Usage: Update Ad Hoc Work Group
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/workgroupassign 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:workgroupassign
entitYes 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/workgroupassign"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("workgroupassign"); 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:
{ "workgroupassign": { "values": [ { "id": 18 } ] }, "workgroupassignt": { "values": [ { "empId": 50 } ] } }
Response Sample
{ "recordId": 18, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Data Found(workgroupassignt.empId.1)", "msgCode": "core_143009" } ], "status": false }
# Delete Ad Hoc Work Group
# Description
Usage: Delete Ad Hoc Work Group
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/workgroupassign 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:workgroupassign
id long
(Query)Yes Ad Hoc Work Group ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/workgroupassign"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("workgroupassign"); 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 }
# Time Card Record
# Fetch Time Card Record List
# Description
Usage: Fetch Time Card Record 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:timeCardRec
......)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("timeCardRec"); 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": "timeCardRec", "size": 10, "stSearchDisplay": "Time Card Record", "values": [ { "code": "00006MLTEST", "tcDate": "2020-03-20", "tcTime": "12:00:01", "timeCardRec.empId.employee.code": "00006", "timeCardRec.empId.employee.desc": "00006", "timeCardRec.empId.employee.dept.dept.desc__lang": "开发部", "timeCardRec.empId.employee.position.position.desc__lang": "D122", "status": "Y", "iRev": 1, "lastModifyDate": "2020-03-09 12:55:36", "timeCardRec.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 12655, "st_desc": "00006MLTEST", "st_id": 12655, "st_code": "00006MLTEST" }, {......} ] }
# Create Time Card Record
# Description
Usage: Create Time Card Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/timeCardRec 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:timeCardRec
entitYes 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/timeCardRec"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("timeCardRec"); 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:
{ "timecardrec": { "values": [ { "empId": 49, "tcDate": "2022-05-05", "tcTime": "09:01:09" } ] } }
Response Sample
{ "recordId": 12724, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Data Found(timecardrec.empId)", "msgCode": "core_143009" } ], "status": false }
# Load Time Card Record
# Description
Usage: Load Time Card Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/timeCardRec 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:timeCardRec
id long
(Query)Yes Time Card Record 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/timeCardRec"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("timeCardRec"); 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": { "timecardrec": [ { "empId": 70304, "attachmentNo": 0, "fileName": "CH01C10917A - sample excel.xlsx", "lastModifyUid": 4, "code": "T_211004114548276922", "tcType": 8, "useAccess": false, "expiredDate": -2209017600000, "iRev": 1, "sysJson": "", "viewCode": "", "udfboolean": false, "beId": 0, "udfnumber": 0, "tcTime": "15:28:21", "expired": false, "printCount": 0, "useAccessBl": false, "id": 12712, "udfCalvinTest": "", "statusModifyDate": 1633319148000, "locked": false, "lastModifyDate": 1633319148000, "createUid": 4, "createDate": 1633319148000, "lastApproveUid": 0, "expiredUid": 0, "tcdsId": 0, "useAccessWl": false, "timeClockId": 0, "schJobId": 3, "tcDate": 1629302400000, "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 Time Card Record
# Description
Usage: Update Time Card Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/timeCardRec 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:timeCardRec
entitYes 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/timeCardRec"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("timeCardRec"); 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:
{ "timecardrec": { "values": [ { "id": 12655, "code": "00006MLTEST", "tcTime": "09:00", "timeClockId": 2 } ] } }
Response Sample
{ "recordId": 12655, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Data Found(timecardrec.timeClockId)", "msgCode": "core_143009" } ], "status": false }
# Delete Time Card Record
# Description
Usage: Delete Time Card Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/timeCardRec 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:timeCardRec
id long
(Query)Yes Time Card Record ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/timeCardRec"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("timeCardRec"); 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 }
# Roster Details
# Fetch Roster Details List
# Description
Usage: Fetch Roster Details 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:emproster
......)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("emproster"); 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": "emproster", "size": 10, "stSearchDisplay": "Roster Details", "values": [ { "emproster.empId.employee.code": "Z00008", "dutydate": "2017-09-05", "iRev": 22, "lastModifyDate": "2021-04-14 14:05:03", "emproster.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 14, "st_id": 14 }, {......} ] }
# Create Roster Details
# Description
Usage: Create Roster Details
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/emproster 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:emproster
entitYes 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/emproster"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("emproster"); 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:
{ "emproster": { "values": [ { "empId": 49, "dutydate": "2022/05/05" } ] } }
Response Sample
{ "recordId": 968, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Data Found(emproster.empId)", "msgCode": "core_143009" } ], "status": false }
# Load Roster Details
# Description
Usage: Load Roster Details
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/emproster 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:emproster
id long
(Query)Yes Roster Details 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/emproster"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("emproster"); 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": { "emprostershift": [ { "shiftId": 7, "hId": 100, "hours": 8, "busUnit": 1, "color": "#e6f41b", "udfTime": "", "iRev": 1, "itemNo": "", "workSite": 5, "udfdate": -2209017600000, "udftrip": "", "i18nField": "{\"desc_en\": \"MLTEST班别说明\"}", "udffield": "", "desc_zh-TW": "", "overwriteLogPt": false, "id": 105, "desc_en": "MLTEST班别说明", "desc": "MLTEST班别说明", "desc_zh-CN": "" } ], "emproster": [ { "attachmentNo": 0, "empId": 14645, "lastModifyUid": 4, "lastApproveUid": 0, "iRev": 1, "sysJson": "", "viewCode": "", "beId": 0, "dayType": "nil", "printCount": 0, "id": 100, "statusModifyDate": 1511333049000, "dutydate": 1509552000000, "lastModifyDate": 1511333049000, "createUid": 4, "createDate": 1511333049000, "status": "Y", "holidayId": 0 } ] }, "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 Roster Details
# Description
Usage: Update Roster Details
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/emproster 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:emproster
entitYes 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/emproster"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("emproster"); 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:
{ "emproster": { "values": [ { "id": 14 } ] }, "emprostershift": { "values": [ { "shiftId": 6, "hours": 7.5, "recognSetId": 2 } ] } }
Response Sample
{ "recordId": 14, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Data Found(emprostershift.shiftId.1)", "msgCode": "core_143009" } ], "status": false }
# Delete Roster Details
# Description
Usage: Delete Roster Details
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/emproster 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:emproster
id long
(Query)Yes Roster Details ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/emproster"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("emproster"); 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 }
# Work Group Roster Details
# Fetch Work Group Roster Details List
# Description
Usage: Fetch Work Group Roster Details 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:wkgproster
......)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("wkgproster"); 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": "wkgproster", "size": 10, "stSearchDisplay": "Work Group Roster Details", "values": [ { "wkgproster.workgroupid.workgroupset.code": "T2", "dutydate": "2017-09-14", "iRev": 4, "lastModifyDate": "2017-09-13 14:45:21", "wkgproster.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 9, "st_id": 9 }, {......} ] }
# Create Work Group Roster Details
# Description
Usage: Create Work Group Roster Details
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/wkgproster 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:wkgproster
entitYes 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/wkgproster"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("wkgproster"); 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:
{ "wkgproster": { "values": [ { "workgroupid": 8, "dutydate": "2022/05/05" } ] } }
Response Sample
{ "recordId": 304, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Data Found(wkgproster.workgroupid)", "msgCode": "core_143009" } ], "status": false }
# Load Work Group Roster Details
# Description
Usage: Load Work Group Roster Details
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/wkgproster 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:wkgproster
id long
(Query)Yes Work Group Roster Details 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/wkgproster"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("wkgproster"); 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": { "wkgprostershift": [ { "shiftId": 6, "hId": 81, "hours": 8, "busUnit": 1, "color": "#2c80f7", "udfTime": "", "iRev": 2, "itemNo": "", "workSite": 5, "udfdate": -2209017600000, "udftrip": "", "i18nField": "{\"desc_en\": \"AAA班别说明\"}", "udffield": "", "desc_zh-TW": "", "overwriteLogPt": false, "id": 98, "desc_en": "AAA班别说明", "desc": "AAA班别说明", "desc_zh-CN": "" } ], "wkgproster": [ { "attachmentNo": 0, "lastModifyUid": 71, "lastApproveUid": 0, "iRev": 2, "sysJson": "", "viewCode": "wkgprostermod", "beId": 0, "dayType": "nil", "workgroupid": 10, "printCount": 0, "id": 81, "statusModifyDate": 1523155914000, "dutydate": 1524499200000, "lastModifyDate": 1523155935000, "createUid": 71, "createDate": 1523155914000, "status": "Y", "holidayId": 0 } ] }, "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 Work Group Roster Details
# Description
Usage: Update Work Group Roster Details
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/wkgproster 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:wkgproster
entitYes 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/wkgproster"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("wkgproster"); 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:
{ "wkgproster": { "values": [ { "id": 81 } ] }, "wkgprostershift": { "values": [ { "shiftId": 6, "hours": 7.5, "recognSetId": 2 } ] } }
Response Sample
{ "recordId": 81, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Data Found(wkgprostershift.shiftId.1)", "msgCode": "core_143009" } ], "status": false }
# Delete Work Group Roster Details
# Description
Usage: Delete Work Group Roster Details
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/wkgproster 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:wkgproster
id long
(Query)Yes Work Group Roster Details ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/wkgproster"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("wkgproster"); 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 }
# OT Application Record
# Fetch OT Application Record List
# Description
Usage: Fetch OT Application Record 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:otApp
......)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("otApp"); 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": "otApp", "size": 10, "stSearchDisplay": "OT Application Record", "values": [ { "code": "2020-08-11", "filingDate": "2020-08-11", "otApp.empId.employee.code": "D11111", "otApp.empId.employee.desc": "DT006", "otApp.empId.employee.dept.dept.desc__lang": "1455-EN", "otApp.empId.employee.position.position.desc__lang": "出勤员_cn", "status": "Y", "iRev": 5, "lastModifyDate": "2021-12-16 12:26:53", "otApp.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 125, "st_desc": "2020-08-11", "st_id": 125, "st_code": "2020-08-11" }, {......} ] }
# Create OT Application Record
# Description
Usage: Create OT Application Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/otApp 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:otApp
entitYes 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/otApp"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("otApp"); 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:
{ "otapp": { "values": [ { "code": "testOtApp", "empId": 49, "startDate": "2022-05-05", "endDate": "2022-05-05", "startTime": "16:00", "endTime": "18:00", "filingDate": "2022-05-05", "otMins": 120.00 } ] } }
Response Sample
{ "recordId": 136, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "The date period of the inserted OT record overlapped", "msgCode": "ch01_att_otApp_100002" } ], "status": false }
# Load OT Application Record
# Description
Usage: Load OT Application Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/otApp 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:otApp
id long
(Query)Yes OT Application Record 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/otApp"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("otApp"); 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": { "otapp": [ { "attachmentNo": 0, "empId": 14657, "reason": "", "lastModifyUid": 109, "code": "OT004", "useAccess": false, "udfmlmul_en": "", "filingDate": 1504627200000, "endDate": 1504627200000, "iRev": 6, "sysJson": "", "viewCode": "otApp", "beId": 0, "udfmlmul_zh-TW": "", "otTypeId": 0, "otMins": 120, "printCount": 0, "useAccessBl": false, "startTime": "18:00", "id": 12, "statusModifyDate": 1542073872000, "udfmldate": -2209017600000, "lastModifyDate": 1542073872000, "createUid": 109, "createDate": 1505354614000, "udfmltext": "", "lastApproveUid": 109, "udfTotalHours": 0, "udfmlnum": 0, "useAccessWl": false, "i18nField": "", "udfmlmul": "", "udfmlmul_zh-CN": "", "endTime": "20:00", "useAccessAutoCalc": false, "startDate": 1504627200000, "status": "R" } ] }, "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 OT Application Record
# Description
Usage: Update OT Application Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/otApp 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:otApp
entitYes 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/otApp"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("otApp"); 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:
{ "otapp": { "values": [ { "id": 135, "startDate": "2022-05-06", "endDate": "2022-05-07" } ] } }
Response Sample
{ "recordId": 135, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Start Date + Start Time must be earlier than End Date + End Time.", "msgCode": "ch01_att_otApp_100001" } ], "status": false }
# Delete OT Application Record
# Description
Usage: Delete OT Application Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/otApp 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:otApp
id long
(Query)Yes OT Application Record ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/otApp"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("otApp"); 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 }
# Work Attendance Summary
# Fetch Work Attendance Summary List
# Description
Usage: Fetch Work Attendance Summary 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:workAttSum
......)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("workAttSum"); 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": "workAttSum", "size": 10, "stSearchDisplay": "Work Attendance Summary", "values": [ { "code": "17111501", "dateFrom": "2017-10-06", "dateTo": "2017-10-06", "workAttSum.empId.employee.code": "17111001", "status": "Y", "iRev": 13, "lastModifyDate": "2018-07-10 12:25:51", "workAttSum.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 16, "st_desc": "17111501", "st_id": 16, "st_code": "17111501" }, {......} ] }
# Create Work Attendance Summary
# Description
Usage: Create Work Attendance Summary
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/workAttSum 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:workAttSum
entitYes 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/workAttSum"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("workAttSum"); 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:
{ "workattsum": { "values": [ { "code": "testworkAttSum", "desc": "desctest", "dateFrom": "2022-05-05", "dateTo": "2022-05-05", "empId": 49 } ] } }
Response Sample
{ "recordId": 124, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Date Range. Start Date cannot be later than End Date.", "msgCode": "ch01_emp_workAttSum_100002" }, { "msgDetail": "Same Code found(workattsum.code)", "msgCode": "core_101903" } ], "status": false }
# Load Work Attendance Summary
# Description
Usage: Load Work Attendance Summary
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/workAttSum 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:workAttSum
id long
(Query)Yes Work Attendance Summary 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/workAttSum"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("workAttSum"); 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": { "workattsum": [ { "attachmentNo": 0, "tDate": -2209017600000, "empId": 49, "lastModifyUid": 4, "code": "testworkAttSum", "useAccess": false, "udfmmtest": "", "iRev": 1, "sysJson": "", "udfmmtest_zh-TW": "", "viewCode": "workAttSum", "beId": 0, "printCount": 0, "useAccessBl": false, "otToLeaveId": 0, "id": 124, "statusModifyDate": 1651743247000, "desc_en": "desctest", "lastModifyDate": 1651743247000, "createUid": 4, "createDate": 1651743247000, "desc_zh-CN": "", "costAmortEffDate": -2209017600000, "lastApproveUid": 4, "otlMonthDay": "", "groupResultBy": "day", "dateFrom": 1651680000000, "useAccessWl": false, "udfmmtest_zh-CN": "", "i18nField": "{\"desc_en\": \"desctest\", \"udfmmtest_en\": \"\"}", "desc_zh-TW": "", "dateTo": 1651680000000, "udfmmtest_en": "", "useAccessAutoCalc": false, "status": "Y", "desc": "desctest" } ] }, "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 Work Attendance Summary
# Description
Usage: Update Work Attendance Summary
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/workAttSum 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:workAttSum
entitYes 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/workAttSum"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("workAttSum"); 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:
{ "workattsum": { "values": [ { "id": 124 } ] }, "workattsumt": { "values": [ { "empId": 49, "date": "2022-05-05" } ] } }
Response Sample
{ "recordId": 124, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Data Found(workattsumt.empId.1)", "msgCode": "core_143009" } ], "status": false }
# Delete Work Attendance Summary
# Description
Usage: Delete Work Attendance Summary
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/workAttSum 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:workAttSum
id long
(Query)Yes Work Attendance Summary ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/workAttSum"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("workAttSum"); 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 }
# OT-to-Leave
# Fetch OT-to-Leave List
# Description
Usage: Fetch OT-to-Leave 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:otToLeave
......)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("otToLeave"); 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": "otToLeave", "size": 10, "stSearchDisplay": "OT-to-Leave", "values": [ { "code": "17092201", "dateFrom": "2017-09-03", "dateTo": "2017-09-04", "otToLeave.pic.employee.code": "17080801", "status": "Y", "iRev": 9, "lastModifyDate": "2018-10-09 10:52:16", "otToLeave.lastModifyUid.simpleUser.desc__lang": "BT_SC", "id": 2, "st_desc": "17092201", "st_id": 2, "st_code": "17092201" }, {......} ] }
# Create OT-to-Leave
# Description
Usage: Create OT-to-Leave
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/otToLeave 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:otToLeave
entitYes 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/otToLeave"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("otToLeave"); 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:
{ "ottoleave": { "values": [ { "code": "testotToLeave", "dateFrom": "2022-05-05", "dateTo": "2022-05-05", "pic": 49, "entitleTypeId": 2 } ] } }
Response Sample
{ "recordId": 27, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(ottoleave.code)", "msgCode": "core_101903" } ], "status": false }
# Load OT-to-Leave
# Description
Usage: Load OT-to-Leave
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/otToLeave 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:otToLeave
id long
(Query)Yes OT-to-Leave 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/otToLeave"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("otToLeave"); 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": { "ottoleave": [ { "attachmentNo": 0, "lastModifyUid": 4, "code": "testotToLeave", "useAccess": false, "otToLeaveFormula": "", "iRev": 1, "sysJson": "", "pic": 49, "entEffPeriod": "fixedPeriod", "viewCode": "otToLeave", "otlSettingId": 0, "dateTo1": -2209017600000, "beId": 0, "printCount": 0, "useAccessBl": false, "id": 27, "statusModifyDate": 1651805688000, "lastModifyDate": 1651805688000, "createUid": 4, "createDate": 1651805688000, "lastApproveUid": 0, "empFilter": "", "afterOtNum": 1, "dateFrom": 1651680000000, "useAccessWl": false, "otResultGroupBy": "day", "dateFrom1": -2209017600000, "otFilingDate": -2209017600000, "otlStatus": "open", "afterOtCombo": "month", "entitleTypeId": 2, "dateTo": 1651680000000, "useAccessAutoCalc": false, "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 OT-to-Leave
# Description
Usage: Update OT-to-Leave
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/otToLeave 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:otToLeave
entitYes 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/otToLeave"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("otToLeave"); 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:
{ "ottoleave": { "values": [ { "id": 27, "startDate": "2022-05-06", "endDate": "2022-05-07" } ] } }
Response Sample
{ "recordId": 27, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Data Found(ottoleave.pic)", "msgCode": "core_143009" } ], "status": false }
# Delete OT-to-Leave
# Description
Usage: Delete OT-to-Leave
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/otToLeave 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:otToLeave
id long
(Query)Yes OT-to-Leave ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/otToLeave"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("otToLeave"); 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
# Actual Attendance Result Listing
# Description
Usage: Run EBI [Actual Attendance Result 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": 1, "rows": [ { "E_A_code": "SZ0001", "MAIN_dutyDate": "2018/05/01", "MAIN_shiftDesc": "手动排班白班(修改后)", "MAIN_attResult": "加班时间-简体", "aiM18ReservedCol_dataIndex": 1, "MAIN_shiftSource": "员工排班", "MAIN_otToLeaveNo": "", "MAIN_workGroupDesc": "", "MAIN_attRegula": "加班-班后第二卡", "MAIN_workAttSumNo": "", "E_A_id": "14657" } ] }
# Brief Attendance Result Report
# Description
Usage: Run EBI [Brief Attendance Result 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": 4, "rows": [ { "MAIN_dutyDate": "2018/05/01", "aiM18ReservedCol_dataIndex": 1, "MAIN_code": "SZ0002" }, { "MAIN_dutyDate": "2018/05/02", "aiM18ReservedCol_dataIndex": 2, "MAIN_code": "SZ0002" }, { "MAIN_dutyDate": "2018/05/03", "aiM18ReservedCol_dataIndex": 3, "MAIN_code": "SZ0002" }, { "MAIN_dutyDate": "2018/05/04", "aiM18ReservedCol_dataIndex": 4, "MAIN_code": "SZ0002" } ] }
# Detailed Attendance Result Report
# Description
Usage: Run EBI [Detailed Attendance Result 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": 3, "rows": [ { "E_A_code": "SZ0001", "MAIN_shiftCode": "MATCHOT", "MAIN_dutyDate": "2021/01/16", "MAIN_ar_NOCARD": "0", "aiM18ReservedCol_dataIndex": 1, "MAIN_logPoint2": "2021/01/16 17:00:00", "MAIN_ar_NOCAR02": "0", "MAIN_logPoint1": "2021/01/16 00:00:00", "MAIN_actLogPoint2": "2021/01/16 21:00:00", "MAIN_actLogPoint1": "", "E_A_id": "14657", "MAIN_ar_MLNOCARD": "0.0" }, ...... ] }
# Attendance Summary Report
# Description
Usage: Run EBI [Attendance Summary 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": 4, "rows": [ { "aiM18ReservedCol_dataIndex": 1, "T1_A_id": "14657", "MAIN_udfAttRus6": "0", "MAIN_udfAttRus5": "12", "MAIN_udfAttRus4": "10", "T1_A_code": "SZ0001" }, ...... ] }
# Time Card Report
# Description
Usage: Run EBI [Time Card 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": [ { "T_T_remarks": "", "T_T_tcType": "手工补卡", "MF_A_id": "70303", "T_T_tcDate": "2017/07/12", "aiM18ReservedCol_dataIndex": 1, "T_T_tcTime": "08:00:00", "MF_A_code": "17062201" }, ...... ] }
# OT-to-Leave Report
# Description
Usage: Run EBI [OT-to-Leave 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_leaveEntTo": "", "aiM18ReservedCol_dataIndex": 1, "T1_A_id": "14657", "MAIN_otResultGroupBy": "日", "MAIN_leaveEntFrom": "", "MAIN_otTakenDate": "2017/09/01", "MAIN_adjEntDay": "0.0000", "MAIN_code": "TT", "T1_A_code": "SZ0001" }, ...... ] }
# Unexpected Time Card Report
# Description
Usage: Run EBI [Unexpected Time Card 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": 2, "rows": [ { "aiM18ReservedCol_dataIndex": 1, "MAIN_hol": "N", "MAIN_tcDate": "2021/03/25", "MAIN_shift": "N", "MAIN_rest": "N", "T1_A_id": "70304", "MAIN_tcTime": "00:01:00", "MAIN_lea": "N", "T1_A_code": "CTEST01", "MAIN_code": "T_210325174050346146" }, ...... ] }
# Shift Attendance Regulation Listing
# Description
Usage: Run EBI [Shift Attendance Regulation 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_attRegulaTypeDesc": "缺勤", "MAIN_A_code": "aa", "MAIN_A_id": "4", "MAIN_F_id": "5", "MAIN_E_id": "2", "aiM18ReservedCol_dataIndex": 1, "MAIN_F_code": "NOCAR02", "MAIN_E_code": "NOCAR01", "MAIN_A_desc__lang": "aa班别说明" }, ...... ] }
# Shift Required Log Point Listing
# Description
Usage: Run EBI [Shift Required Log Point 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_A_reqLogPoint": "21:00", "T3_A_id": "1", "aiM18ReservedCol_dataIndex": 1, "T1_A_id": "4", "T3_A_minRange": "60", "T3_A_maxRange": "60", "T2_A_reqLogPointDesc": "", "T1_A_code": "aa", "T3_A_code": "LOG1" }, ...... ] }
# Roster Listing
# Description
Usage: Run EBI [Roster 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_dutyDate": "2022/05/01", "T1_workGroupCode": "", "MAIN_shifts": "", "MAIN_holiday": "否", "aiM18ReservedCol_dataIndex": 1, "T1_A_workGroupId": "0", "MAIN_shiftSource": "--", "MAIN_restDay": "否", "T1_A_id": "49", "MAIN_leaveApps": "", "T1_A_code": "00006" }, ...... ] }
# OT Application Report
# Description
Usage: Run EBI [OT Application 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": [ { "T1_A_startTime": "00:00", "T1_A_endDate": "2017/08/01", "aiM18ReservedCol_dataIndex": 1, "T1_A_startDate": "2017/08/01", "T1_A_id": "1", "T1_A_otMins": "1,439.00", "T1_A_endTime": "23:59", "T2_A_id": "70593", "T2_A_code": "17082103", "T1_A_code": "BBB" }, ...... ] }
# Daily Attendance Log
# Description
Usage: Run EBI [Daily Attendance Log], 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": 1, "rows": [ { "MAIN_dutyDate": "2021/09/07", "MAIN_shiftSourceDesc": "员工排班", "MAIN_shiftDesc": "临时班组白班", "MAIN_logPoint4": "2021-09-07 18:00:00", "aiM18ReservedCol_dataIndex": 1, "MAIN_logPoint2": "2021-09-07 13:00:00", "MAIN_logPoint3": "2021-09-07 14:00:00", "MAIN_totalLeaveDays": "0.5000", "MAIN_dayTypeDesc": "工作日", "MAIN_workGroupDesc": "", "MAIN_leaveApp": "NPL 2021-09-07 09:00 - 2021-09-07 13:00 Y", "T1_A_id": "14657", "MAIN_logPoint1": "2021-09-07 13:00:00", "T1_A_code": "SZ0001" } ] }
# Detailed Attendance Summary Report
# Description
Usage: Run EBI [Detailed Attendance Summary 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": 5, "rows": [ { "MAIN_filingDate": "2022/02/28", "aiM18ReservedCol_dataIndex": 1, "T1_A_id": "14657", "T1_A_code": "SZ0001", "MAIN_ar_udfAttRus6": "0", "MAIN_la_AL1": "0.0000" }, ...... ] }
# Time Card Log Report
# Description
Usage: Run EBI [Time Card Log 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": [ { "E_A_code": "00006", "TCR_T_tcType": "手工补卡", "TCR_T_id": "12724", "MAIN_action": "创建", "TCR_T_tcTime": "09:01:09", "aiM18ReservedCol_dataIndex": 1, "TCR_T_code": "202205057882_MISC", "E_A_id": "49", "TCR_T_tcDate": "2022/05/05" }, ...... ] }
# Roster Log Report
# Description
Usage: Run EBI [Roster Log 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": 6, "rows": [ { "E_A_code": "SZ0001", "MAIN_newDesc": "0", "aiM18ReservedCol_dataIndex": 1, "MAIN_newShiftCode": "", "MAIN_newHours": "0.00", "MAIN_newShiftId": "0", "MAIN_newWorkSiteCode": "", "MAIN_newWorkSite": "0", "E_A_id": "14657", "MAIN_sType": "shiftSet", "MAIN_wType": "worksite" }, ...... ] }