aiM18 Developer Center aiM18 Developer Center
DOC Home
  • Platform

    • Overview
    • Frontend Framework
    • Backend Framework
    • EBI Development
    • JSF Components
    • BPM Extension Interface
    • Telescope Extension Interface
    • Mobile App Setup
  • ERP

    • ERP EJB Interfaces
    • ERP XML Config Files
    • ERP Decorators (Frontend Interfaces)
  • Tutorial

    • Setup Development Environment
    • Sample App
  • Platform

    • Authentication
    • Common JSON Objects
    • Core Services
    • EBI Services
  • Enterprise Resource Planning
  • Human Capital Management
  • Business Process Management
  • Schedule Management
  • Document Management
  • Tutorial

    • Interacting with aiM18 via webservices
Tutorial
GitHub (opens new window)
DOC Home
  • Platform

    • Overview
    • Frontend Framework
    • Backend Framework
    • EBI Development
    • JSF Components
    • BPM Extension Interface
    • Telescope Extension Interface
    • Mobile App Setup
  • ERP

    • ERP EJB Interfaces
    • ERP XML Config Files
    • ERP Decorators (Frontend Interfaces)
  • Tutorial

    • Setup Development Environment
    • Sample App
  • Platform

    • Authentication
    • Common JSON Objects
    • Core Services
    • EBI Services
  • Enterprise Resource Planning
  • Human Capital Management
  • Business Process Management
  • Schedule Management
  • Document Management
  • Tutorial

    • Interacting with aiM18 via webservices
Tutorial
GitHub (opens new window)
  • base

    • Authentication
    • Common JSON Objects
    • Core Services
    • Enduser-driven Business Intelligence
      • Get List of FORMAT
        • HTTP Request
        • Parameters
        • Result
      • Report Info
        • HTTP Request
        • Parameters
        • Result
      • Report Data
        • HTTP Request
        • Parameters
        • Result
      • Chart Widget Data
        • HTTP Request
        • Parameters
        • Result
      • Make Report data alive
        • HTTP Request
        • Parameters
      • Close Report data
        • HTTP Request
        • Parameters
      • Load Query Data
        • HTTP Request
        • Parameters
        • Result
      • Load report PDF file
        • HTTP Request
        • Parameters
        • Result
      • Load report Excel file
        • HTTP Request
        • Parameters
        • Result
    • Error Code Description
  • Business Process Management

    • Business Process Management
  • Schedule Management

    • Schedule Management
  • Document Management System

    • Document Management System
  • Enterprise Resource Planning

    • README for ERP
    • Master Data
    • Sales
    • Purchase
    • Stock
    • Consignment
    • Subcontract
    • Production
    • Retail
    • Retail Stored Value
    • Warehouse Management Solution
    • Retail and Third-Party Logistics
    • Trading and Finance
    • Accounting
    • Accounting EBI
  • Human Capital Management

    • README for HCM
    • Attendance Management
    • Hong Kong Labour Law Compliance
    • Leave Management
    • Organization And Personnel Management
    • Payroll Management
    • PRC Labour Law Compliance
    • Appraisal Management
    • Attendance
    • Casual Labour
    • Personnel
    • Leave
    • Medical Claim Management
    • Payroll
    • Recruitment
    • Training & Sponsorship
  • Web Services
  • base
Multiable
2024-02-23
目录

Enduser-driven Business Intelligence

Version: 1.0 | Release Date: 3/9/2019

# Get List of FORMAT

Get format list of EBI

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("http://127.0.0.1:8080/jsf/rfws/ebiWidget/reportList?formatType=ebiFormat")
  .get()
  .addHeader("authorization", "Bearer MjZhZGNjMDctODVhZS00MmE0LWI3ZmEtNzRhMTQwZGZiNTY0")
  .addHeader("client_id", "C-SGF2aWQncyBhcHBsaWNhdGlvbjIwMTctMDItMTAxNjc=")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

# HTTP Request

GET http://[server]/jsf/rfws/ebiWidget/reportList?formatType=[formatType]

# Parameters

Name Type Description
authorization string(Header) Required. Access Token obtained via Oauth2
client_id string(Header) Required. When registered in [OAuth Applications], generated by the aiM18
needCount boolean(Query) Optional. Return count of total result rows or not (For page break)
searchText string(Query) Optional. Search input of user (For quick search)
formatType string(Query) Optional. Specific format type (There are three format types : ebiFormat/chart/pivot. aiM18 APP do not use pivot). If this value is empty, API will get all the ebiFormat/chart format
menuCode string(Query) Optional. Menu code of EBI (If you have got the menu code already)
offset int(Query) Optional. The first return row of the result (For page break)
rows int(Query) Optional. Total count of return rows in the result (For page break)

# Result

Type Location(error_id) Description
success Header Total rows of the result (Only return when needCount = true)
success Body SqlTable as JSON format, contains 4 columns : id, code, desc, formatType

# Report Info

GET Report Info for chosen FORMAT (And Prepare Report Data)

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("http://127.0.0.1:8080/jsf/rfws/ebiWidget/reportDto/127")
  .get()
  .addHeader("authorization", "Bearer MjZhZGNjMDctODVhZS00MmE0LWI3ZmEtNzRhMTQwZGZiNTY0")
  .addHeader("client_id", "C-SGF2aWQncyBhcHBsaWNhdGlvbjIwMTctMDItMTAxNjc=")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

The API returns ReportDto as JSON structured like this:

{
     "formatId": 1, //formatId
	 "formatType": "chart", //formatType
	 "description": "Employee List Chart",  //format description.
	 "contextId": 36518,  //Current Report Context ID
	 "reportTitle": "Report Title",  //Report Title 
	 "table": {TableDto}, //Table Report Dto 
	 "widgets":[{WidgetDto}, {WidgetDto}, …]  // Array,  all WidgetDto in this report
}

TableDto as JSON structured like this:

{
     "dataSize": 2345, //All Table Data Size, INT
	 "group": true, //IF table has group setting and group data
	 [{columnDto}, {columnDto}, …], //Array, list all columns
}

ColumnDto as JSON structured like this:

{
     "fieldType": "system", //value=system/udf/udfFormula. The field Type.
	 "dataType": "INT", //value=Auto, NCHAR, NVARCHAR, CLOB, INT,BIGINT, DECIMAL,BOOLEAN,REAL, DOUBLE, TIME, DATE, TIMESTAMP, BLOB, BINARY, OTHER
     "fieldType": "system", //value=system/udf/udfFormula. The field Type.
     "fieldType": "system", //value=system/udf/udfFormula. The field Type.
     "fieldType": "system", //value=system/udf/udfFormula. The field Type.
	 [{columnDto}, {columnDto}, …], //Array, list all columns
}

WidgetDto as JSON structured like this:

{
     "key": "12346-xudtds-23xuct", //The key of the chart
	 "chartType": "pie", //chart Type
	 "rightfull": true, //If the user has the visit right of the chart
}

# HTTP Request

GET http://[server]/jsf/rfws/ebiWidget/ebiWidget/reportDto/[formatId]

# Parameters

Name Type Description
authorization string(Header) Required. Access Token obtained via Oauth2
client_id string(Header) Required. When registered in [OAuth Applications], generated by the aiM18
formatId long(Path) Required. Specific Format ID
beId long(Query) Optional. Specific Business Entity ID
source string(Query) Optional. The source of current access (For audit only)

# Result

Type Location(error_id) Description
success Body ReportDto as JSON format.

# Report Data

GET Table Report Data

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("http://127.0.0.1:8080/jsf/rfws/ebiWidget/loadReport?formatId=127&rows=10")
  .get()
  .addHeader("authorization", "Bearer MjZhZGNjMDctODVhZS00MmE0LWI3ZmEtNzRhMTQwZGZiNTY0")
  .addHeader("client_id", "C-SGF2aWQncyBhcHBsaWNhdGlvbjIwMTctMDItMTAxNjc=")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

# HTTP Request

GET http://[server]/jsf/rfws/ebiWidget/loadReport?formatId=[formatId]&rows=[rows]

# Parameters

Name Type Description
authorization string(Header) Required. Access Token obtained via Oauth2
client_id string(Header) Required. When registered in [OAuth Applications], generated by the aiM18
contextId long(Query) Optional. Report's contextId (If this value is empty, system will rebuild context and return data)
formatId long(Query) Required. Format ID
beId long(Query) Optional. Business Entity ID, only needed when contextId is empty
source string(Query) Optional. Only needed when contextId is empty
offset int(Query) Optional. The first return row of the result (For page break)
rows int(Query) Optional. Total count of return rows in the result (For page break)

# Result

Type Location(error_id) Description
success Body SqlTable as JSON format

# Chart Widget Data

GET Chart Widget Data

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("http://127.0.0.1:8080/jsf/rfws/ebiWidget/loadChart?formatId=126")
  .get()
  .addHeader("authorization", "Bearer MjZhZGNjMDctODVhZS00MmE0LWI3ZmEtNzRhMTQwZGZiNTY0")
  .addHeader("client_id", "C-SGF2aWQncyBhcHBsaWNhdGlvbjIwMTctMDItMTAxNjc=")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

# HTTP Request

GET http://[server]/jsf/rfws/ebiWidget/loadChart?formatId=[formatId]"

# Parameters

Name Type Description
authorization string(Header) Required. Access Token obtained via Oauth2
client_id string(Header) Required. When registered in [OAuth Applications], generated by the aiM18
contextId long(Query) Optional. Report's contextId (If this value is empty, system will rebuild context and return data)
chartUnit string(Query) Optional. Report's chart key (There are many widgets in ebiFormat. The charUnit is used to specific widget. If charUnit is empty, system will get the result of the first widget)
formatId long(Query) Required. Format ID
beId long(Query) Optional. Business Entity ID, only needed when contextId is empty
source string(Query) Optional. Only needed when contextId is empty

# Result

Type Location(error_id) Description
success Body EChart as JSON format, which is able to initialize Echart

# Make Report data alive

Make Report data alive (Call this web service less than every 4 minutes. EBI modules call it every 3 minutes)

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("http://127.0.0.1:8080/jsf/rfws/q/combSet/keepOpen")
  .get()
  .addHeader("authorization", "Bearer MjZhZGNjMDctODVhZS00MmE0LWI3ZmEtNzRhMTQwZGZiNTY0")
  .addHeader("client_id", "C-SGF2aWQncyBhcHBsaWNhdGlvbjIwMTctMDItMTAxNjc=")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

# HTTP Request

GET http://[server]/jsf/rfws/q/combSet/keepOpen

# Parameters

Name Type Description
authorization string(Header) Required. Access Token obtained via Oauth2
client_id string(Header) Required. When registered in [OAuth Applications], generated by the aiM18
contextId long(Query) Optional. Report's contextId

# Close Report data

Close Report data

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("http://127.0.0.1:8080/jsf/rfws/q/combSet/closeTask")
  .post()
  .addHeader("authorization", "Bearer MjZhZGNjMDctODVhZS00MmE0LWI3ZmEtNzRhMTQwZGZiNTY0")
  .addHeader("client_id", "C-SGF2aWQncyBhcHBsaWNhdGlvbjIwMTctMDItMTAxNjc=")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

# HTTP Request

POST http://[server]/jsf/rfws/q/combSet/closeTask

# Parameters

Name Type Description
authorization string(Header) Required. Access Token obtained via Oauth2
client_id string(Header) Required. When registered in [OAuth Applications], generated by the aiM18
contextId long(Query) Optional. Report's contextId

# Load Query Data

Load Query Data

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("http://127.0.0.1:8080/jsf/rfws/ebiWidget/queryData/QuerySet/348")
  .get()
  .addHeader("authorization", "Bearer MjZhZGNjMDctODVhZS00MmE0LWI3ZmEtNzRhMTQwZGZiNTY0")
  .addHeader("client_id", "C-SGF2aWQncyBhcHBsaWNhdGlvbjIwMTctMDItMTAxNjc=")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

# HTTP Request

GET http://[server]/jsf/rfws/ebiWidget/queryData/[queryType]/[queryId]

# Parameters

Name Type Description
authorization string(Header) Required. Access Token obtained via Oauth2
client_id string(Header) Required. When registered in [OAuth Applications], generated by the aiM18
queryType string(Path) Required. Query type
queryId long(Path) Required. Query ID
beId long[](Query) Optional. Business Entity ID in query
option string(Query) Optional. Report option in EBI, Rows in which input parameter Data Type in [Query (SQL)] is not Lookup are permitted parameters. FilterGroupDto as JSON format. Here is a simple example. {"mode":"and","criterias":[{"field":"lastModifyDateFilter","operator":"EQUAL","value":"2023-01-01"},{"field":"createUserFilter","operator":"IN","value":["1", "2"]},{"field":"createDateFilter","operator":"LARGEROREQUAL","value":"2023-01-01"}]}. mode accepts one of the following values: and, or. field is Input Parameter Code in [Query(SQL)], operator accepts one of the following values: EQUAL, UNEQUAL, LARGERTHAN, LESSTHAN, LARGEROREQUAL, LESSOREQUAL, CONTAINS, DOSENOTCONTAIN, IN, NOTIN, STARTWITH, NOTSTARTWITH, ENDWITH, NOTENDWITH.
lookupFilter string(Query) Optional. Turbo Filter in EBI, Rows in which input parameter Data Type in [Query (SQL)] is Lookup are permitted parameters, parameter names are 'Lookup Type'. Map<String, FilterGroupDto> as JSON format. Here is a simple example. {"oldso":{"mode":"and","criterias":[{"field":"code","operator":"EQUAL","value":"SO001"}]},"pro":{"mode":"and","criterias":[{"field":"code","operator":"EQUAL","value":"PRO1"}]}}.
turboFilter string(Query) Optional. Turbo Filter in EBI, Rows in which input parameter Data Type in [Query (SQL)] is Lookup are permitted parameters, parameter names are 'Code'. Map<String, FilterGroupDto> as JSON format. Here is a simple example. {"soFilter": {"mode": "and","criterias": [{"field": "code","operator": "EQUAL","value": "SO001"}]},"proFilter": {"mode": "and","criterias": [{"field": "code","operator": "EQUAL","value": "PRO1"}]}}.
datafilter string(Query) Optional. Normal Filter in EBI, FilterGroupDto as JSON format. Here is a simple example. {"mode":"and","criterias":[{"field":"CUS_A_code","operator":"EQUAL","value":"CUS01"}]}. field is visible when hovering over the left panel of the EBI.
column string[](Query) Optional. Specific the reading columns. If this value is empty, result will contain all the columns.
offset int(Query) Optional. The first return row of the result
rows int(Query) Optional. Total count of return rows in the result

# Result

Type Location(error_id) Description
success Body SqlTable as JSON format

# Load report PDF file

Load report PDF file

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("http://127.0.0.1:8080/jsf/rfws/ebiExport/loadReportAsPDF?ebiFormatId=127")
  .get()
  .addHeader("authorization", "Bearer MjZhZGNjMDctODVhZS00MmE0LWI3ZmEtNzRhMTQwZGZiNTY0")
  .addHeader("client_id", "C-SGF2aWQncyBhcHBsaWNhdGlvbjIwMTctMDItMTAxNjc=")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

# HTTP Request

GET http://[server]/jsf/rfws/ebiExport/loadReportAsPDF?ebiFormatId=[ebiFormatId]

# Parameters

Name Type Description
authorization string(Header) Required. Access Token obtained via Oauth2
client_id string(Header) Required. When registered in [OAuth Applications], generated by the aiM18
ebiFormatId long(Query) Required. EBI format ID
fileName String(Query) Optional. Name of generated file (Do not need the suffix of file)

# Result

Type Location(error_id) Description
success Body Binary stream of the file

# Load report Excel file

Load report Excel file

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("http://127.0.0.1:8080/jsf/rfws/ebiExport/loadReportAsExcel?ebiFormatId=127")
  .get()
  .addHeader("authorization", "Bearer MjZhZGNjMDctODVhZS00MmE0LWI3ZmEtNzRhMTQwZGZiNTY0")
  .addHeader("client_id", "C-SGF2aWQncyBhcHBsaWNhdGlvbjIwMTctMDItMTAxNjc=")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

# HTTP Request

GET http://[server]/jsf/rfws/ebiExport/loadReportAsExcel?ebiFormatId=[ebiFormatId]

# Parameters

Name Type Description
authorization string(Header) Required. Access Token obtained via Oauth2
client_id string(Header) Required. When registered in [OAuth Applications], generated by the aiM18
ebiFormatId long(Query) Required. EBI format ID
fileName String(Query) Optional. Name of generated file (Do not need the suffix of file)

# Result

Type Location(error_id) Description
success Body Binary stream of the file
Last Updated: 2025/05/13, 07:58:58
Core Services
Error Code Description

← Core Services Error Code Description→

Theme by Vdoing | Copyright © 1990-2025 Multiable | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式