AIS Call APIs

To make AIS calls from JavaScript, use the available APIs in the e1pagehelper.js. See the tables below for more information about the available APIs.

The following example shows a data service request with aggregation. This example demonstrates the callAISService API, using the DATA_SERVICE constant.

The first parameter is a JSON object defining the input message sent to AIS.

The second parameter is the DATA_SERVICE constant to indicate the request is a data request.

The final parameter is a JavaScript callback function accepting the response of the AIS call as input. This function will execute once a response is returned from the AIS call. More examples of callAISService can be found in the example JET applications included with the JET Development Template.

Example - Data Service Request Using Aggregation from P90CG530_CaseDistribution Application

    var groupingCol = null;
    
    /* group by status or assigned to */
    if (self.savedGroupByValue() == 'assignee')
    {
        groupingCol = "F1755.AN8";        
    }
    else if (self.savedGroupByValue() == 'status')
    {
        groupingCol = "F1755.CLST"; 
    }
    
    var savedQuery = self.savedQueryValue;
    if(savedQuery == 'AllRecords')
    {
        savedQuery = '';
    }
    
    var input = 
    {
        aliasNaming : true, 
        outputType : "GRID_DATA", 
        findOnEntry : "TRUE", 
        maxPageSize : LocalJetVariables.maxPageSize, 
        query : 
        {
            autoFind : true, autoClear : true,
            complexQuery : [{query : 
                    {condition : [{value : [{content : '2', specialValueId : "LITERAL"}], 
                                  controlId : "F1755.STAW", operator : "EQUAL"}],
                        matchType : "MATCH_ALL"},
                        andOr : "AND"}]
        },
        
        queryObjectName : savedQuery, 
        targetName : "V1755O", 
        targetType : "view", 
        dataServiceType : "AGGREGATION", 
        aggregation : 
        {
            aggregations : [{column : groupingCol, aggregation : "COUNT"}], 
            groupBy : [{column : groupingCol}], 
            orderBy : [{column : groupingCol, 
            direction : "ASC"}]
        }
    };
    
    if(self.hasVersions){
        input.version =  self.savedVersionValue;
    }
    
    /* add adhoc query if specified to complex query defined above */
    if(self.adhocQuery)
    {
         var adhocQ = {query: {condition: self.adhocQuery.condition, 
                               matchType: self.adhocQuery.matchType}, 
                       andOr : "AND"};
         input.query.complexQuery.push(adhocQ);
    }
    
    self.currentGroupByValue = self.savedGroupByValue();
    
    /* call AIS data service based on the above defined input */
    callAISService(input, DATA_SERVICE, function (response)
    {
        // consume response here
    }

For more information, see REST API for JD Edwards EnterpriseOne AIS Server.

E1 Page Helper AIS Services

Service Name Constant REST API

In E1Pagehelper Release

FORM_SERVICE Form Service 9.2.0.2
DATA_SERVICE Data Service 9.2.0.2
BATCH_FORM_SERVICE Batch Form Service 9.2.0.2
APP_STACK_SERVICE Application Stack Service 9.2.0.2
PO_SERVICE Processing Option Service 9.2.0.2
LOG_SERVICE Logging Service 9.2.0.2
JARGON_SERVICE Logging Service 9.2.0.2
PREFERENCE_SERVICE Preference Service 9.2.0.2
WATCHLIST_SERVICE Watchlist Service 9.2.1.0
UDO_GETALL_SERVICE UDO Service 9.2.1.0
UDO_GETKEY_SERVICE UDO Service 9.2.1.0
MEDIA_OBJECT_TEXT Media Object Service – Get Text 9.2.1.0
MEDIA_OBJECT_UPDATETEXT Media Object Service – Update Text 9.2.2.6
MEDIA_OBJECT_ADDTEXT Media Object Service – Add Text 9.2.3.0
MEDIA_OBJECT_DELETE Media Object Service - Delete 9.2.3.0
MEDIA_OBJECT_LIST Media Object Service - List 9.2.3.0
SETTINGS Default Config Service 9.2.1.4
CAPABILITIES Default Config Service 9.2.1.4
DISCOVER_SERVICE Orchestration Discovery Service 9.2.2.1
DISCOVER_NOTIFICATIONS Notification Service - List 9.2.2.1
REPORT_EXECUTE Report Service - Execute 9.2.2.6
REPORT_DISCOVER Report Service - Discover 9.2.2.6
REPORT_STATUS Report Service – Get Status 9.2.2.6
MEDIA_OBJECT_UPLOAD Media Object Service - Upload 9.2.7.0
MEDIA_OBJECT_DOWNLOAD Media Object Service - Download 9.2.7.0
EXTERNAL_REST External Service - REST 9.2.7.0
EXTERNAL_REST_REPORT External Service – REST Report 9.2.7.0
EXTERNAL_FTP_REPORT External Service – FTP Report 9.2.7.0
GET_OBJECT_LIST Utilities Service 9.2.7.0
OPEN_API_CATALOG Swagger 2.0 9.2.7.0
OPEN_API_CATALOG3 OpenAPI 3.0 9.2.7.0
NOTIFICATION Notification Service - Execute 9.2.7.0
DATA_SERVICE_NEXT Data Service – Next Record 9.2.7.0
APP_STACK_NEXT Application Stack Service – Next Record 9.2.7.0
EXTERNAL_OPEN_API External Service – Open API 9.2.7.0
BUSINESS_FUNCTION_SERVICE Business Function Service - Execute 9.2.7.0
DISCOVER_BUSINESS_FUNCTION Business Function Service - Discover 9.2.7.0
MEDIA_OBJECT_ADD_URL Media Object Service – Add URL 9.2.7.0
MESSAGE_SERVICE Message Service 9.2.7.0
NOTIFICATION_SUBSCRIPTIONS Message Service – Get Subscriptions 9.2.7.0
SCHEDULER Scheduler Service 9.2.7.0
TASK_AUTHORIZATION Task Authorization Service 9.2.7.0

E1 Page Helper AIS APIs

API Method Description Inputs Outputs Release
callAISService Call a JSON based AIS Service defined with one of the constants.

JSON Object,

Service Constant,

Callback

Callback passed in will be called with JSON Object response of the AIS REST API 9.2.0.2
callAISServiceV2 Call the V2 endpoint of a JSON based AIS Service defined with one of the constants.

JSON Object,

Service Constant,

Callback

Callback passed in will be called with JSON Object response of the AIS REST API 9.2.2.6
callAISServiceV3 Call the V3 endpoint of a JSON based AIS Service defined with one of the constants.

JSON Object,

Service Constant,

Callback

Callback passed in will be called with JSON Object response of the AIS REST API 9.2.7.0
callAISServiceGetPath Call a path parameter based AIS Service with GET method.

Service Constant, Version,

Array of path parameters (strings), Callback

Callback passed in will be called with JSON Object response of the AIS REST API 9.2.7.0
callAISServicePath Call JSON and path parameter based AIS Service with GET method.

JSON Object,

Service Constant, Version,

Array of path parameters (strings), Callback

Callback passed in will be called with JSON Object response of the AIS REST API 9.2.7.0
callAISServiceFileUpload Call AIS multipart upload service (Media Object Upload)

JSON Object,

Files from file picker,

Service Constant,

Version, Callback

Callback passed in will be called with JSON Object response of the AIS REST API 9.2.7.0
callAISServiceFileDownload Call AIS download service (Media Object Download)

JSON Object,

File name for download,

Service Constant,

Version, Callback

Callback passed in will be called with JSON Object response of the AIS REST API 9.2.7.0
SimpleGetDataService

Call AIS Simple Get Data service Simple Table Query v2

Or

Simple View Query v2

Use new operator to create a new function with parameters.

isTable (boolean),

tableOrView,

allowCache,

fields, filters, filterType, limit, outputType, sorts

Call the execute method on the new function object passing callback. Callback passed in will be called with JSON Object response of the AIS REST API 9.2.7.0
SimpleGetFormService

Call AIS Simple Get Form service

Simple Form Service Query v2

or

Simple Form Service Query with Version v2

Use new operator to create a new function with parameters.

appId, formId, appVersion, allowCache, fields, filters, filterType, limit, outputType, sorts

Call the execute method on the new function object passing callback. Callback passed in will be called with JSON Object response of the AIS REST API 9.2.7.0
callAISDataServiceNext Executes next page link from data service response.

Links,

Callback

Callback passed in will be called with JSON Object response of the AIS REST API 9.2.7.0
callAISAppStackNext Executes next page link from app stack response.

Links,

Callback

Callback passed in will be called with JSON Object response of the AIS REST API 9.2.7.0
callAISOrchestration Executes the orchestration requested.

Orchestration,

JSON Object,

Callback

Callback passed in will be called with JSON Object response of the AIS REST API 9.2.0.2
callAISOrchestrationV2 Executes the orchestration requested.

Orchestration,

JSON Object,

Callback

Callback passed in will be called with JSON Object response of the AIS REST API 9.2.2.6
callAISOrchestrationUploadFiles Execute the orchestration requested with Multipart request to upload files. JSON Object, Files from file picker, orchestration, callback Callback passed in will be called with JSON Object response of the AIS REST API 9.2.7.0
callAISOrchestrationDownloadFile Execute the orchestration requested and download expected file output. JSON Object, orchestration, callback Callback passed in will be called. For success, file will be downloaded in browser. If failure JSON Object will have failure details. 9.2.7.0

callAISOrchestrationUploadAndDownloadFiles

Execute the orchestration requested sending files in and downloading expected file output. JSON Object, Files from file picker, orchestration, callback Callback passed in will be called. For success, file will be downloaded in browser. If failure JSON Object will have failure details. 9.2.7.0