Query or Aggregate Tables and Views v1
/jderest/dataservice
Request
- application/json
-
jde-AIS-Auth(optional): string
Token
-
jde-AIS-Auth-Device(optional): string
Device Name
-
jde-AIS-MonitorOnStart(optional): boolean
Monitor on Start
-
jde-AIS-MonitorRequest(optional): string
Monitor RequestAllowed Values:
[ "monitorRequest", "monitorRequestIO" ]
object
-
aggregation(optional):
object AggregationInfo
Provide information about the requested aggregation.
-
aliasNaming(optional):
boolean
Specify whether alias names should be used for field names. A value of true prevents Data Dictionary overrides from changing the field names.
-
allowCache(optional):
boolean
Specify whether cache should be used if available for the transaction.
-
batchDataRequest(optional):
boolean
A flag to indicate if this is a batch data request (used for data requests only).
-
cacheTime(optional):
integer(int32)
Override the default server Cache Time To Live in milliseconds.
-
dataServiceType(optional):
string
Allowed Values:
[ "BROWSE", "COUNT", "AGGREGATION" ]
The type of data service request to execute. -
deviceName(optional):
string
An identifier for the device making the service call. If not provided, the requesting IP address is used.
-
environment(optional):
string
Specify the environment to use for login. If not specified, the default environment configured for the AIS Server will be used.
-
findOnEntry(optional):
string
Allowed Values:
[ "true", "false" ]
Indicates that the Find button should be pressed. -
forceUpdate(optional):
boolean
If cache is enabled, this tells the request to ignore the cache and execute the request.
-
formActions(optional):
array formActions
An array of actions to be performed in a specified order on a particular form.
-
formServiceDemo(optional):
string
Allowed Values:
[ "true", "false" ]
Request only a demo version of the form to view all the fields without actual data. -
having(optional):
object Having
The details of the having clause to be applied to an aggregation request.
-
includeTimings(optional):
boolean
Specify whether timing information should be included in the response. The timing information shows how long the formservice/dataservice ran and the total processing time.
-
jasserver(optional):
string
The HTML (JAS) Server to use for login. If not specified, the default HTML Server configured for the AIS Server will be used.
-
maxPageSize(optional):
string
The maximum number of records that should be returned. The default value is 100. A value of 'No Max' will return all records.
-
outputType(optional):
string
Allowed Values:
[ "<blank>", "VERSION1", "GRID_DATA", "VERSION2" ]
The format of the output. The original (VERSION1) format is used by default. Other valid values are GRID_DATA and VERSION2. -
password(optional):
string
The JD Edwards EnterpriseOne password, which is required if other authentication methods are not being used.
-
psToken(optional):
string
Used for logging in with psToken. Primarily used by the HTML Server to establish a session with the AIS Server.
-
query(optional):
object Query
The query portion of a data service or form service request.
-
queryObjectName(optional):
string
The object name of a saved query to be executed on the form.
-
returnControlIDs(optional):
string
The returnControlIDs string is bar delimited, without a starting or ending bar. Form fields are just a single value. Grid fields are indicated with a grid id, followed by a bracketed list of grid columns. Subform fields are indicated with subform id underscore field id. For example: 33|34|17[24,26,28]|50_45|50_53|50_9[35,39,41]
-
role(optional):
string
The role to use for login. If not specified, the default role configured for the AIS Server will be used.
-
setDirtyOnly(optional):
boolean
Specify whether to delete the data currently stored in the cache for the request. This does not execute the request. This forces the next execution to fetch from the database.
-
showActionControls(optional):
boolean
Specify whether action controls such as buttons, row, and form exits should be included in the response.
-
targetName:
string
The name of the table or business view for the request.
-
targetType(optional):
string
Allowed Values:
[ "table", "view" ]
The object type of the target. -
token(optional):
string
The AIS token, which is required if other authentication methods are not being used.
-
username(optional):
string
JD Edwards EnterpriseOne username, which is required if other authentication methods are not being used.
-
variableNames(optional):
string
A list of variable names to correspond to the returnControlIDs. Used by Orchestrator only.
object
-
aggregations:
array aggregations
The list of aggregations requested.
-
currency(optional):
object CurrencyProcessing
Details for instructing the service to format the results for currency (currency decimals).
-
groupBy(optional):
array groupBy
The list of fields to group the results by.
-
orderBy(optional):
array orderBy
The list fields to order the results by.
array
-
Array of:
object FSREvent
An individual action to perform on a form.
object
-
condition(optional):
array condition
The list of conditions in the having clause.
object
-
autoClear(optional):
boolean
Specify whether the system should clear any filter field or QBE values before executing the query.
-
autoFind(optional):
boolean
Specify whether the system should automatically find records matching the query.
-
complexQuery(optional):
array complexQuery
The array of complex query fragments if this is a compex query.
-
condition(optional):
array condition
The array of complex query fragments if this is a complex query.
-
matchType(optional):
string
Allowed Values:
[ "MATCH_ALL", "MATCH_ANY" ]
The match type for the query.
array
-
Array of:
object AggregationItem
Information provided for the aggregation of a specific column.
object
-
asIfCurrency(optional):
string
If you would like different currencies in the table to be converted to a single currency, indicate it here. You must have conversion rates in the currency conversion table for the currencies involved.
-
asIfDate(optional):
string
Specify the date to be used for the currency conversion. If not provided, today's date will be used.
-
currencyCode(optional):
string
If not using a specific type of processing, specify a specific currency code to use for formatting.
-
currencyCols(optional):
array currencyCols
Specify the columns to be formatted. You only need to add a column here once, even if you have several aggregations over that column. Identify each distinct column to which the currency processing should apply. If you do not identify currency columns here, then currency processing will be applied to all columns identified as currency columns in the data dictionary. A currency column is defined in the data dictionary with class CURRENCY.
-
keyCols(optional):
array keyCols
Specify the columns to be used as the key based on the type of processing. (For example for COMPANY processing, which field in the table will have the company value.)
-
roundingMode(optional):
integer(int32)
Rounding Mode override.
-
type(optional):
string
Allowed Values:
[ "CO", "CRCD", "MCU", "AID", "LT_CO_CRCD", "LT_CRCD", "STATIC" ]
The type of currency processing to use.
array
-
Array of:
object AggregationItem
Information provided for the aggregation of a specific column.
array
-
Array of:
object AggregationItem
Information provided for the aggregation of a specific column.
object
-
aggregation(optional):
string
Allowed Values:
[ "SUM", "MIN", "MAX", "AVG", "COUNT", "COUNT_DISTINCT", "AVG_DISTINCT", "SUM_DISTINCT" ]
The aggregation to perform. -
column:
string
The column to perform the aggregation over.
-
description(optional):
boolean
If this is set the associated description will be returned as part of the group by results.
-
direction(optional):
string
Allowed Values:
[ "ASC", "DESC" ]
If this is a group by, indicate the order. -
specialHandling(optional):
string
Allowed Values:
[ "USER", "CALQTR", "<SimpleDateFormatString>" ]
If this is a group by for a date field, indicate the simple date format for the dates. The result will be grouped and formated based on the input. 'USER': Uses the EnterpriseOne user's preferred date format. 'CALQTR': Uses the four digit year and one digit quarter format, for example 2020-1. SimpleDateFormat: Uses the simple date format that you supply, such as yyyy-MM-dd.
array
array
object
-
command(optional):
string
Allowed Values:
[ "SetQBEValue", "SetControlValue", "SetRadioButton", "SetComboValue", "DoAction", "SetCheckboxValue", "SelectRow", "UnSelectRow", "UnSelectAllRows", "SelectAllRows", "ClickGridCell", "ClickGridColumnAggregate", "NextGrid" ]
The command or action to perform. -
controlID(optional):
string
The control to perform the action on. This a form level object. It is not applicable to individual grid rows.
-
gridAction(optional):
object GridAction
Holds actions to perform on grid rows.
-
value(optional):
string
The value to use, if the action is to set a value.
object
-
gridID(optional):
string
The id of the grid (for example 1). This field is REQUIRED when using Grid Actions.
-
gridRowInsertEvents(optional):
array gridRowInsertEvents
The list of events for adding grid rows.
-
gridRowUpdateEvents(optional):
array gridRowUpdateEvents
The list of events for updating grid rows.
array
-
Array of:
object GridRowInsertEvent
Contains actions to apply to a newly added grid row.
array
-
Array of:
object GridRowUpdateEvent
The actions to apply to an existing grid row.
object
-
gridColumnEvents(optional):
array gridColumnEvents
The actions to apply to the new grid row.
array
-
Array of:
object GridColumnEvent
Action to be applied to a grid cell.
object
-
columnID:
string
The control id for the grid column. Pass only the column id here, a single number without separators. The grid must already be identified by including the gridID field at the root of GridAction.
-
command:
string
Allowed Values:
[ "SetGridCellValue", "SetGridComboValue", "ClickGridCell" ]
The operation to perform on the grid cell. -
value:
string
The value to use in the operation.
object
-
gridColumnEvents(optional):
array gridColumnEvents
The actions to perform on the existing grid row.
-
rowNumber(optional):
integer(int32)
The index of the existing grid row (zero based).
array
-
Array of:
object GridColumnEvent
Action to be applied to a grid cell.
array
-
Array of:
object HavingCondition
An individual having condition.
object
-
aggregation(optional):
string
The aggregation to apply the condition to.
-
controlId(optional):
string
The column the aggregation is applied to, to apply the having condition to.
-
operator:
string
Allowed Values:
[ "EQUAL", "NOT_EQUAL", "LESS", "LESS_EQUAL", "GREATER", "GREATER_EQUAL" ]
The operator in the condition to apply to the aggregated value. -
value:
array value
The value to filter with in the having condition.
array
-
Array of:
object HavingValue
The value to use within a having condition.
object
-
content(optional):
string
The value to be compared in the condition.
array
-
Array of:
object ComplexQueryFragment
The class used to join multiple queries into a complex query.
array
-
Array of:
object Condition
A condition within a query.
object
-
andOr(optional):
string
Allowed Values:
[ "AND", "OR" ]
The operation to append this query with. -
query(optional):
object Query
The query portion of a data service or form service request.
object
-
controlId:
string
The control or column the condition applies to.
-
dataType(optional):
string
-
operator:
string
Allowed Values:
[ "EQUAL", "NOT_EQUAL", "STR_START_WITH", "STR_END_WITH", "STR_CONTAIN", "LESS", "LESS_EQUAL", "GREATER", "GREATER_EQUAL", "STR_BLANK", "STR_NOT_BLANK", "BETWEEN", "LIST" ]
The operator for the condition. Operations supported are based on the data type. -
operatorString(optional):
string
-
value:
array value
The value(s) used for data comparison based on the operation.
array
-
Array of:
object QueryValue
The value used in a query comparison.
object
-
content(optional):
string
The value to be compared if it's a literal, or the value to be used in conjunction with the special value operation.
-
specialValueId(optional):
string
Allowed Values:
[ "LITERAL", "LOGIN_USER", "TODAY", "TODAY_PLUS_DAY", "TODAY_MINUS_DAY", "TODAY_PLUS_MONTH", "TODAY_MINUS_MONTH", "TODAY_PLUS_YEAR", "TODAY_MINUS_YEAR" ]
The special value id (see allowed values). Specify LITERAL if using the constant value only. -
specialValueString(optional):
string
Response
- application/json
- application/xml
200 Response
400 Response
403 Response
415 Response
500 Response
object
-
errorText(optional):
string
-
exception(optional):
string
The class of the exception if an exception was thrown.
-
exceptionId(optional):
string
ExceptionId, only if an exception record was written to the F980060
-
message(optional):
string
Details about the error.
-
status(optional):
string
Allowed Values:
[ "ERROR", "WARNING" ]
Status determined by exception handling -
timeStamp(optional):
string
The timestamp indicating the time the error message was returned.
-
type(optional):
string
Optional type of error
-
userDefinedErrorText(optional):
string
Optional error text added to an orchestration step.
Examples
Example Request VERSION2 Output
The following shows an example of a data request. The token value is from a prior call to the token request service to establish a session. The request includes a query and sorting order for three columns.
curl -i -X POST -H "Content-Type:application/json" http://ais_server_url/jderest/dataservice -d { "token" : "0448slzeSZXyg2hHkcQNdbhhcYA9INqoVWydJSxVK8SWi8=MDE5MDA4MTQ3NTYwODg5MTA3NjAzNTA5Mk15RGV2aWNlMTQ3ODEyMDQyNDYxNQ==", "deviceName" : "MyDevice", "aliasNaming" : true, "outputType" : "VERSION2", "targetName" : "F0101", "targetType" : "table", "dataServiceType" : "BROWSE", "maxPageSize" : "10", "returnControlIDs" : "F0101.AN8|F0101.ALPH|F0101.AT1", "query" : { "autoFind" : true, "condition" : [ { "value" : [ { "content" : "7000", "specialValueId" : "LITERAL" } ], "controlId" : "F0101.AN8", "operator" : "GREATER" } ] }, "aggregation" : { "orderBy" : [ { "column" : "F0101.AT1", "direction" : "ASC" }, { "column" : "F0101.ALPH", "direction" : "ASC" }, { "column" : "F0101.AN8", "direction" : "DESC" } ] } }
Example Response VERSION2 Output
The following example shows the contents of the response body.
{ "fs_DATABROWSE_F0101" : { "title" : "Data Browser - F0101 [Address Book Master]", "data" : { "gridData" : { "id" : 54, "titles" : { "F0101_AN8" : "Address Number", "F0101_ALPH" : "Alpha Name", "F0101_AT1" : "Sch Typ" }, "columnInfo" : { "F0101_AN8" : { "id" : 51, "dataType" : 9, "bsvw" : true, "title" : "Address Number", "visible" : true, "longName" : "mnAddressNumber_51", "qbeEnabled" : true }, "F0101_ALPH" : { "id" : 52, "dataType" : 2, "bsvw" : true, "title" : "Alpha Name", "visible" : true, "longName" : "sAlphaName_52", "qbeEnabled" : true }, "F0101_AT1" : { "id" : 53, "dataType" : 2, "bsvw" : true, "title" : "Sch Typ", "visible" : true, "longName" : "sSchTyp_53", "qbeEnabled" : true } }, "rowset" : [ { "rowIndex" : 0, "MOExist" : false, "F0101_AN8" : { "internalValue" : 10102, "value" : "10102" }, "F0101_ALPH" : { "internalValue" : "Allcott, Melissa", "value" : "Allcott, Melissa" }, "F0101_AT1" : { "internalValue" : "A", "value" : "A" } }, { "rowIndex" : 1, "MOExist" : false, "F0101_AN8" : { "internalValue" : 10108, "value" : "10108" }, "F0101_ALPH" : { "internalValue" : "Bryant, Kelly", "value" : "Bryant, Kelly" }, "F0101_AT1" : { "internalValue" : "A", "value" : "A" } }, { "rowIndex" : 2, "MOExist" : false, "F0101_AN8" : { "internalValue" : 10106, "value" : "10106" }, "F0101_ALPH" : { "internalValue" : "Dylan, Devin", "value" : "Dylan, Devin" }, "F0101_AT1" : { "internalValue" : "A", "value" : "A" } }, { "rowIndex" : 3, "MOExist" : false, "F0101_AN8" : { "internalValue" : 10105, "value" : "10105" }, "F0101_ALPH" : { "internalValue" : "Eckles, Jocelyn", "value" : "Eckles, Jocelyn" }, "F0101_AT1" : { "internalValue" : "A", "value" : "A" } }, { "rowIndex" : 4, "MOExist" : false, "F0101_AN8" : { "internalValue" : 10112, "value" : "10112" }, "F0101_ALPH" : { "internalValue" : "Harris, Eric", "value" : "Harris, Eric" }, "F0101_AT1" : { "internalValue" : "A", "value" : "A" } } ], "summary" : { "records" : 5, "moreRecords" : true } } }, "errors" : [ ], "warnings" : [ ] }, "stackId" : 2, "stateId" : 1, "rid" : "190f4c9e40ebbc11", "currentApp" : "DATABROWSE_F0101", "timeStamp" : "2016-11-02:21.04.53", "sysErrors" : [ ] }
Example Request GRID_DATA Output
The following shows an example of a data request. The token value is from a prior call to the token request service to establish a session. The request includes a query and sorting order for three columns.
curl -i -X POST -H "Content-Type:application/json" http://ais_server_url/jderest/dataservice -d { "token" : "0448slzeSZXyg2hHkcQNdbhhcYA9INqoVWydJSxVK8SWi8=MDE5MDA4MTQ3NTYwODg5MTA3NjAzNTA5Mk15RGV2aWNlMTQ3ODEyMDQyNDYxNQ==", "deviceName" : "MyDevice", "aliasNaming" : true, "outputType" : "GRID_DATA", "targetName" : "F0101", "targetType" : "table", "dataServiceType" : "BROWSE", "maxPageSize" : "10", "returnControlIDs" : "F0101.AN8|F0101.ALPH|F0101.AT1", "query" : { "autoFind" : true, "condition" : [ { "value" : [ { "content" : "7000", "specialValueId" : "LITERAL" } ], "controlId" : "F0101.AN8", "operator" : "GREATER" } ] }, "aggregation" : { "orderBy" : [ { "column" : "F0101.AT1", "direction" : "ASC" }, { "column" : "F0101.ALPH", "direction" : "ASC" }, { "column" : "F0101.AN8", "direction" : "DESC" } ] } }
Example Response GRID_DATA Output
The following example shows the contents of the response body for GRID_DATA output type.
{ "fs_DATABROWSE_F0101" : { "title" : "Data Browser - F0101 [Address Book Master]", "data" : { "gridData" : { "columns" : { "F0101_AN8" : "Address Number", "F0101_ALPH" : "Alpha Name", "F0101_AT1" : "Sch Typ" }, "rowset" : [ { "F0101_AT1" : "A", "F0101_AN8" : 10102, "F0101_ALPH" : "Allcott, Melissa" }, { "F0101_AT1" : "A", "F0101_AN8" : 10108, "F0101_ALPH" : "Bryant, Kelly" }, { "F0101_AT1" : "A", "F0101_AN8" : 10106, "F0101_ALPH" : "Dylan, Devin" }, { "F0101_AT1" : "A", "F0101_AN8" : 10105, "F0101_ALPH" : "Eckles, Jocelyn" }, { "F0101_AT1" : "A", "F0101_AN8" : 10112, "F0101_ALPH" : "Harris, Eric" } ], "summary" : { "records" : 5, "moreRecords" : true } } }, "errors" : [ ], "warnings" : [ ] }, "stackId" : 2, "stateId" : 1, "rid" : "ecdecdbd7f258cd6", "currentApp" : "DATABROWSE_F0101", "timeStamp" : "2016-11-02:21.07.07", "sysErrors" : [ ] }
Example Aggrigation Request
The following shows an example of an aggregation data request. This requests the average salary (SAL) from F060116 (returned in descending order) and the record count, where the average salary is greater than 50000. The token value is from a prior call to the token request service to establish a session.
curl -i -X POST -H "Content-Type:application/json" http://ais_server_url/jderest/dataservice -d { "token" : "044zvYQtpbBAd9os/GxkCDy9UmC+WJFGS38fx0KAmUve70=MDE5MDA4NTMwMTcyNDMwOTY5Mjk5NDY1Mk15RGV2aWNlMTQ3ODY0MDk1ODM1Mg==", "deviceName" : "MyDevice", "targetName" : "F060116", "targetType" : "table", "dataServiceType" : "AGGREGATION", "aggregation" : { "aggregations" : [ { "column" : "F060116.SAL", "aggregation" : "AVG" }, { "column" : "*", "aggregation" : "COUNT" } ], "groupBy" : [ { "column" : "F060116.HMCU" } ], "orderBy" : [ { "column" : "F060116.SAL", "aggregation" : "AVG", "direction" : "DESC" }] }, "having" : { "condition" : [ { "value" : [ { "content" : "50000", "specialValueId" : "LITERAL" } ], "controlId" : "F060116.SAL", "operator" : "GREATER", "aggregation" : "AVG" } ] } }
Example Aggrigation Response
The following example shows the contents of the response body for an aggregation request.
{ "ds_F060116" : { "output" : [ { "groupBy" : { "F060116.HMCU" : " 50" }, "F060116.SAL_AVG" : 260000.0, "COUNT" : 1 }, { "groupBy" : { "F060116.HMCU" : " 80180101" }, "F060116.SAL_AVG" : 183600.0, "COUNT" : 5 }, { "groupBy" : { "F060116.HMCU" : " 77" }, "F060116.SAL_AVG" : 77878.0, "COUNT" : 1 }, { "groupBy" : { "F060116.HMCU" : " 200" }, "F060116.SAL_AVG" : 63866.67, "COUNT" : 12 }, { "groupBy" : { "F060116.HMCU" : " 777" }, "F060116.SAL_AVG" : 52778.65, "COUNT" : 33 }, { "groupBy" : { "F060116.HMCU" : " 7071" }, "F060116.SAL_AVG" : 51957.68, "COUNT" : 19 } ] } }