Training & Sponsorship
Version: 1.2 | Release Date: 30/01/2024
# Training Record
# Fetch Training Record List
# Description
Usage: Fetch Training 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:training
......)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("training"); 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": "training", "size": 1, "stSearchDisplay": "Training Record", "values": [ { "training.empId.employee.code": "MAC08", "training.empId.employee.desc": "杨兰", "training.trainCourse.trainCourse.desc": "入职培训", "refDate": "2018-06-04", "training.trainResult.trainResult.desc": "", "trainHrs": 0, "code": "TRA2022021700002", "status": "N", "lastModifyDate": "2022-02-17 16:05:26", "training.lastModifyUid.simpleUser.desc": "杨兰", "id": 88, "st_desc": "TRA2022021700002 - 杨兰", "st_id": 88, "st_code": "TRA2022021700002" } ] }
# Create Training Record
# Description
Usage: Create Training Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/training 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:training
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/training"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("training"); 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:
{ "training": { "values": [ { "empId": 3461, "refDate": "2018-06-04", "trainCourse":33 } ] } }
Response Sample
{ "recordId": 89, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Required field is empty(training.empId)", "msgCode": "core_101905" } ], "status": false }
# Load Training Record
# Description
Usage: Load Training Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/training 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:training
id long
(Query)Yes Training 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/training"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("training"); 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": { "training": [ { "attachmentNo": 0, "empId": 4730, "lastModifyUid": 4, "code": "TRA2022021700002", "intorext": "int", "skillType": 0, "useAccess": false, "trainType": 0, "udfjerry15": false, "trainInstitute": 0, "udfjeery05": "", "iRev": 2, "exemption": false, "sysJson": "{\"autoGenCode\":{\"snId\":617,\"sn\":\"2\"}}", "viewCode": "training", "trainHrs": 0, "beId": 0, "trainer": 0, "printCount": 0, "useAccessBl": false, "id": 88, "statusModifyDate": 1645085126000, "lastModifyDate": 1653377263000, "createUid": 3991, "createDate": 1645085126000, "lastApproveUid": 0, "useAccessWl": false, "exemptionBy": 0, "udfsub": 0, "udfclaimsession": 0, "udfclaimamount": 0, "trainCourse": 27, "trainResult": 0, "refDate": 1662739200000, "useAccessAutoCalc": false, "remarks": "", "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 Training Record
# Description
Usage: Update Training Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/training 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:training
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/training"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("training"); 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:
{ "training": { "values": [ { "id": 88, "empId":36, "refDate":"2022-09-10" } ] } }
Response Sample
{ "recordId": 88, "messages": [], "status": true }
# Delete Training Record
# Description
Usage: Delete Training Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/training 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:training
id long
(Query)Yes Training Record ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/training"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("training"); 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 }
# Sponsorship
# Fetch Sponsorship List
# Description
Usage: Fetch Sponsorship 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:sponsorship
......)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("sponsorship"); 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": "sponsorship", "size": 1, "stSearchDisplay": "Sponsorship", "values": [ { "sponsorship.empId.employee.code": "ANDY1", "sponsorship.empId.employee.desc": "ANDY1繁", "refDate": "2021-02-22", "sponsorship.sponsorType.sponsorType.desc": "公司培训费用", "paymentDate": "2021-02-22", "amount": 1000, "undertaking": true, "undertakeExpDate": "2022-03-03", "code": "ANDY1", "status": "Y", "lastModifyDate": "2021-09-18 09:33:51", "sponsorship.lastModifyUid.simpleUser.desc": "林文语(人事经理)", "id": 70, "st_desc": "ANDY1", "st_id": 70, "st_code": "ANDY1" } ] }
# Create Sponsorship
# Description
Usage: Create Sponsorship
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/sponsorship 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:sponsorship
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/sponsorship"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("sponsorship"); 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:
{ "sponsorship": { "values": [ { "empId":36, "sponsorType":32, "refDate":"2022-09-10", "cur":10 } ] } }
Response Sample
{ "recordId": 73, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Required field is empty(sponsorship.cur.1)", "msgCode": "core_101905" } ], "status": false }
# Load Sponsorship
# Description
Usage: Load Sponsorship
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/sponsorshiip 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:sponsorship
id long
(Query)Yes Sponsorship 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/sponsorship"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("sponsorship"); 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": { "sponsorship_white": [ { "hId": 68, "roleId": 0, "iRev": 3, "id": 43, "userId": 4 } ], "sponsorship": [ { "attachmentNo": 0, "empId": 16323, "cur": 10, "lastModifyUid": 4, "code": "SS20110014", "useAccess": true, "udfjeery05": false, "iRev": 3, "sysJson": "{\"autoGenCode\":{\"snId\":132,\"sn\":\"14\"}}", "viewCode": "sponsorship", "beId": 0, "printCount": 0, "useAccessBl": false, "id": 68, "statusModifyDate": 1606465659000, "lastModifyDate": 1606465659000, "createUid": 4, "createDate": 1606465658000, "amount": 544, "lastApproveUid": 4, "sponsorType": 34, "undertakeExpDate": -2209017600000, "udfjeery11": "", "useAccessWl": true, "udfjeery12": 0, "undertaking": false, "refDate": 1606406400000, "paymentDate": -2209017600000, "useAccessAutoCalc": true, "remarks": "", "status": "Y" } ], "sponsorshipcoa": [ { "iRev": 3, "itemNo": " 1", "percent": 100, "udfcost38": 0, "udfcost37": 0, "udfcost39": 0, "withCeiling": false, "udfcost30": 0, "udfcost32": 0, "id": 20, "udfcost12": 0, "udfcost11": 0, "udfcost14": 0, "udfcost36": 0, "udfcost13": 0, "udfcost35": 0, "hId": 68, "dept": 0, "residue": true, "udfcost27": 0, "udfcost26": 0, "udfcost29": 0, "udfcost28": 0, "udfcost41": 0, "udfcost40": 0, "udfcost21": 0, "udfcost43": 0, "position": 0, "absCeil": 0, "udfcost23": 0, "udfcost22": 0, "udfcost44": 0, "fixAmt": 0, "udfcost25": 34, "udfcost24": 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 Sponsorship
# Description
Usage: Update Sponsorship
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/sponsorship 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:sponsorship
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/sponsorship"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("sponsorship"); 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:
{ "sponsorship": { "values": [ { "id":73, "empId":36, "sponsorType":32, "refDate":"2022-09-10", "cur":10 } ] } }
Response Sample
{ "recordId": 73, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Delete Sponsorship
# Description
Usage: Delete Sponsorship
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/sponsorship 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:sponsorship
id long
(Query)Yes Sponsorship ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/sponsorship"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("sponsorship"); 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 }
# Course Application
# Fetch Course Application List
# Description
Usage: Fetch Course Application 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:trainadvcourseapp
......)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("trainadvcourseapp"); 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": "trainadvcourseapp", "size": 1, "stSearchDisplay": "Course Application", "values": [ { "code": "TRA0001", "trainadvcourseapp.empId.employee.code": "809", "trainadvcourseapp.empId.employee.desc__lang": "test001", "trainadvcourseapp.empId.employee.dept.dept.desc__lang": "admin", "trainadvcourseapp.empId.employee.position.position.desc__lang": "测试001", "status": "Y", "iRev": 5, "lastModifyDate": "2021-05-17 11:00:34", "trainadvcourseapp.lastModifyUid.simpleUser.desc__lang": "admin", "id": 1, "st_desc": "TRA0001", "st_id": 1, "st_code": "TRA0001" } ] }
# Create Course Application
# Description
Usage: Create Course Application
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/trainadvcourseapp 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:trainadvcourseapp
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/trainadvcourseapp"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("trainadvcourseapp"); 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:
{ "trainadvcourseapp": { "values": [ { "empId":36, "course":35, "courseDesc":"fqCS02", "trainDateFrom":"2021-05-01", "trainDateTo":"2021-05-10", "courseType":3 } ] } }
Response Sample
{ "recordId": 59, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Required field is empty(trainadvcourseapp.course.1)", "msgCode": "ch01_trainadv_trainadvcourseapp_100001" }, { "msgDetail": "Required field is empty(trainadvcourseapp.courseDesc,trainadvcourseapp.trainDateFrom,trainadvcourseapp.trainDateTo)", "msgCode": "core_101905" } ], "status": false }
# Load Course Application
# Description
Usage: Load Course Application
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/trainadvcourseapp 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:trainadvcourseapp
id long
(Query)Yes Course Application 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/trainadvcourseapp"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("trainadvcourseapp"); 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": { "trainadvcourseapp": [ { "cancel": false, "skipSponsorPlanMaxCheck": 0, "courseType": 0, "lastModifyUid": 12262, "udfLocale": "", "useAccess": false, "trainOrganizer_zh-CN": "", "udfLocale_zh-TW": "", "cert": false, "trainObjective_zh-CN": "", "sysJson": "{\"autoGenCode\":{\"snId\":236,\"sn\":\"62\"}}", "viewCode": "trainAdvCourseApp", "trainVenue_pl": "", "beId": 0, "extSponsor": 0, "netAmt": 0, "trainVenue_zh-CN": "", "useAccessBl": false, "courseDesc_udfcn": "", "passAtt": "nill", "attRate": 0, "id": 58, "reimbursement": false, "lastModifyDate": 1651047708000, "createUid": 12262, "sponsorName_zh-CN": "", "courseDesc": "etertery", "lateApp": true, "passExam": "nill", "lastApproveUid": 4, "nomByManag": false, "trainOrganizer_pl": "", "otherAmt": 0, "totalSponsorAmt": 1, "udfLocale_zh-CN": "", "courseDesc_zh-TW": "", "totalAmt": 0, "i18nField": "{\"courseDesc_en\": \"etertery\"}", "trainObjective_pl": "", "receipt": false, "trainObjective": "", "sponsorName_pl": "", "courseSponsorType": 0, "status": "Y", "origCourseFee": 0, "attachmentNo": 0, "empId": 13688, "discountAmt": 0, "code": "TRA0062", "covering": 0, "trainOrganizer_udfcn": "", "trainOrganizer": "", "sponsorName": "", "courseDesc_zh-CN": "", "trainObjective_en": "", "iRev": 5, "appDate": 1646755200000, "courseDesc_pl": "", "trainFee": 0, "trainDateTo": 1646150400000, "printCount": 0, "trainVenue_en": "", "course": 0, "sponsorName_zh-TW": "", "trainObjective_udfcn": "", "udfLocale_en": "", "statusModifyDate": 1651047708000, "cancelReason": "", "overApp": false, "createDate": 1646825884000, "sponsorName_udfcn": "", "trainintorext": "ext", "trainObjective_zh-TW": "", "trainVenue": "", "passAttRate": 0, "udfLocale_pl": "", "sponsorName_en": "", "undertakeExpDate": -2209017600000, "airTicket": 0, "transport": 0, "daysOfLeave": 0, "trainVenue_zh-TW": "", "sponsorPlan": 2, "useAccessWl": false, "fundSource": 0, "trainVenue_udfcn": "", "undertaking": false, "trainDateFrom": 1646236800000, "accommodation": 0, "courseDesc_en": "etertery", "useAccessAutoCalc": false, "trainOrganizer_zh-TW": "", "trainOrganizer_en": "", "udfLocale_udfcn": "" } ] }, "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 Course Application
# Description
Usage: Update Course Application
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/trainadvcourseapp 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:trainadvcourseapp
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/trainadvcourseapp"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("trainadvcourseapp"); 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:
{ "trainadvcourseapp": { "values": [ { "id":59, "empId":36, "course":35, "courseDesc":"fqCS02", "trainDateFrom":"2021-05-01", "trainDateTo":"2021-05-10", "courseType":3, "passAtt":"nil", "passExam":"nil" } ] } }
Response Sample
{ "recordId": 59, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Combo Value(trainadvcourseapp.passAtt,trainadvcourseapp.passExam)", "msgCode": "core_143008" }, { "msgDetail": "There will be only 1 application per employee + course,the record cannot be saved", "msgCode": "ch01_trainadv_trainadvcourseapp_100002" } ], "status": false }
# Delete Course Application
# Description
Usage: Delete Course Application
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/trainadvcourseapp 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:trainadvcourseapp
id long
(Query)Yes Course Application ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/trainadvcourseapp"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("trainadvcourseapp"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Response Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Load EBI data
# Employee Training Report
# Description
Usage: Run EBI [Employee Training 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(3); 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": [ { "T_A_refDate": "2022-01-19", "T_A_empId": "4730", "T_A_remarks": "<p>a</p>", "T_A_skillType_desc__lang": "通用技能", "aiM18ReservedCol_dataIndex": 1, "T_A_empId_code": "MAC08", "T_A_trainInstitute_desc__lang": "", "T_A_trainer_desc__lang": "", "T_A_code": "TR21020026", "T_A_trainResult_desc__lang": "良好", "T_A_id": "46", "T_A_empId_desc__lang": "杨兰", "T_A_trainCourse_desc__lang": "入职培训", "T_A_intorext": "Internal", "T_A_exemptionBy_desc__lang": "", "T_A_trainType_desc__lang": "集团总部培训", "T_A_exemption": "No" } ] }
# Training Need Report
# Description
Usage: Run EBI [Training Need 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(1); 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": [ { "PT_A_course_code": "a", "PT_A_trainUnit": "年", "PT_A_course": "2", "aiM18ReservedCol_dataIndex": 1, "PT_A_dateTo": "2023/05/31", "PT_A_trainExp": "1", "PT_A_dateFrom": "2019/01/01", "PT_A_itemNo": "", "MAIN_trainNeed": "未完成", "PT_A_course_desc__lang": "2" } ] }
# Employee Sponsorship Report
# Description
Usage: Run EBI [Employee Sponsorship 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(1); 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": [ { "T_A_cur_desc__lang": "RMB", "T_A_sponsorType_desc__lang": "不产生变动科目", "T_A_refDate": "2022/05/06", "T_A_empId": "70925", "aiM18ReservedCol_dataIndex": 1, "T_A_sponsorType": "2", "T_A_empId_code": "JIM002", "T_A_paymentDate": "", "T_A_sponsorType_code": "NOVAR", "T_A_code": "181018-TEST", "T_A_id": "9", "T_A_undertaking": "Yes", "T_A_empId_desc__lang": "JIM TEST-SC", "T_A_undertakeExpDate": "2020/12/31" } ] }
# Employee Sponsorship Amortization Report
# Description
Usage: Run EBI [Employee Sponsorship Amortization 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": 1, "rows": [ { "S_A_paymentDate": "2022/06/18", "MAIN_residue": "Yes", "aiM18ReservedCol_dataIndex": 1, "MAIN_amount": "250.0", "MAIN_posCode": "AP", "S_A_code": "a", "MAIN_deptCode": "ACCT", "MAIN_udfcost9": "", "S_A_undertaking": "Yes", "MAIN_udfcost2": "", "MAIN_udfcost1": "", "MAIN_udfcost1Desc": "", "S_A_id": "1" } ] }
# Course Application Report
# Description
Usage: Run EBI [Course 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": 1, "rows": [ { "C_TC_id": "4", "C_TC_code": "C1", "C_TC_trainAttRate": "80.00", "C_TC_trainDateTo": "2021/05/10", "aiM18ReservedCol_dataIndex": 1, "C_TC_trainintorext": "Internal", "C_TC_trainObjective": "C1", "CT_TCT_code": "A", "CT_TCT_id": "1", "C_TC_trainVacancy": "1", "C_TC_trainDateFrom": "2021/05/01", "C_TC_trainVenue": "GZ" } ] }
# Employee Sponsorship and Study Leave Balance
# Description
Usage: Run EBI [Employee Sponsorship and Study Leave Balance], 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_maxSponsorPerCycle": "5000.0", "MAIN_effDate": "2022/01/31", "MAIN_approvedDaysBal": "10.00", "MAIN_applieddSponsorBal": "5,000.00", "MAIN_maxDaysPerCycle": "10.0", "MAIN_appliedSponsor": "0.00", "MAIN_expDate": "2023/01/30", "aiM18ReservedCol_dataIndex": 1, "MAIN_appliedDaysBal": "10.00", "MAIN_approvedDays": "0.00", "MAIN_approvedSponsor": "0.00", "MAIN_approvedSponsorBal": "5,000.00" } ] }
# Planned Mandatory Course Report
# Description
Usage: Run EBI [Planned Mandatory Course 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": 1, "rows": [ { "C_TC_code": "MLCC001", "C_TC_trainAttRate": "80.00", "aiM18ReservedCol_dataIndex": 1, "C_TC_trainintorext": "Internal", "CT_TCT_code": "M1", "CT_TCT_id": "2", "C_TC_trainVenue": "", "C_TC_id": "15", "MAIN_mandatory": "Yes", "CA_A_code": "SZ0001MLCC001", "C_TC_trainObjective": "", "C_TC_trainVacancy": "10", "CA_A_id": "24" } ] }