IBMi/AS400 AWS Gateway
Connection
POST https://{gateway-stage-url}/admin/connections
Use this endpoint for creating new connection
Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
connectionName | String | Required | Unique name of connection in application |
endpoint | String | Required | IBMi endpoint |
userId | String | Required | Username that can connect to IBMi |
password | String | Required | Encrypted password for IBMi user |
libraryList | String | Optional | Comma separated list of libraries that needs to be added to user library list |
libraryListMode | String | Optional | Mode of adding new libraries: ADD_FIRST, ADD_LAST, REPLACE |
jobTrace | Boolean | Optional | When true connector adds Job Metadata as separate section in response of IBMi operations |
secureConnection | Boolean | Required | When true connector tries to establish secure TLS connection with IBMi endpoint |
status | String | Optional | Connection status:OPEN, CLOSED |
licenseFileProtocol | String | Required | Transport protocol for license file. Supported transport protocols: HTTP/HTTPS, S3, FTP, FILE, CLASSPATH |
Connection Pool Properties | Connection Pool Configuration | Optional | Manage IBMi connection pool |
TLS Properties | TLS Configuration | Optional | Manage TLS if secure connection is used |
FILE Transport Protocol | FILE Configuration | Optional | Manage FILE Protocol for License/TLS |
CLASSPATH Transport Protocol | CLASSPATH Configuration | Optional | Manage CLASSPATH for License/TLS |
S3 Transport Protocol | S3 Configuration | Optional | Manage S3 for License/TLS |
FTP Transport Protocol | FTP Configuration | Optional | Manage FTP for License/TLS |
HTTP/HTTPS Protocol | HTTP/HTTPS Configuration | Optional | Manage HTTP/HTTPS for License/TLS |
Connection Pool Configuration
Parameter | Type | Mandatory | Description |
---|---|---|---|
operationType | Integer | Optional | Type of operation that connection should perform: 2 - AS400.COMMAND,3 - AS400.DATAQUEUE. Default value: 2 |
preStartCountDataQueue | Integer | Optional | Preconnect a specified number of connections for DataQueue operations. Default value: 2 |
preStartCountCommand | Integer | Optional | Preconnect a specified number of connections for Command operations. Default value: 2 |
maxConnections | Integer | Optional | Maximum number of connection. A value is -1 indicating no limit to the number of connections. Default value: 10 |
maxInactivity | Integer | Optional | Maximum amount of inactive time before an available connection is closed (ms). A value of -1 indicates that there is no limit. Default value: 60 min |
maxLifetime | Integer | Optional | Maximum life time for an available connection (ms). A value of -1 indicates that there is no limit. Default value: 24h |
maxUseCount | Integer | Optional | Maximum number of times a connection can be used before it is replaced in the pool. A value of -1 indicates that there is no limit. Default value: -1 |
maxUseTime | Integer | Optional | Maximum amount of time a connection can be in use before it is closed and returned to the pool (ms). A value is -1 indicating that there is no limit. Default value: -1 |
pretestConnections | Boolean | Optional | IBMi connections are pretested before they are allocated to requesters. Default value: true |
runMaintenance | Boolean | Optional | Maintenance thread cleanups expired connections: Default value: true |
cleanupInterval | Integer | Optional | Time interval for how often the maintenance thread is run (ms). Default value: 5 min |
threadUsed | Boolean | Optional | When true connector creates additional threads for various purposes: communication with host server or running connection pool maintenance. Default value: true |
Socket Properties | Socket Configuration | Optional | Socket properties that this IBMi Connection Pool specifies |
Socket Configuration
Parameter | Type | Mandatory | Description |
---|---|---|---|
keepAlive | Boolean | Optional | Turn on socket keepAlive. Default value: true |
loginTimeOut | Integer | Optional | Timeout for login (ms). Default value: 3 min |
receiveBufferSize | Integer | Optional | Maximum receive window for a TCP connection. Default value: 1000 |
sendBufferSize | Integer | Optional | Transfer rate from a sender. Default value: 1000 |
soLinger | Integer | Optional | Linger-on-close timeout (ms): Default value: 0 |
soTimeout | Integer | Optional | Timeout on blocking socket operations (ms). Default value: 3 min |
tcpNoDelay | Boolean | Optional | When true connector using TCP optimization that increases the efficiency of a network application system by decreasing the number of packets that must be sent. Default value: false |
TLS Configuration
Parameter | Type | Mandatory | Description |
---|---|---|---|
tlsFileName | String | Required | TLS file name. Connector will use the same path as for license |
truststorePassword | String | Required | Encrypted password for TLS file |
tlsIsInsecure | Boolean | Optional | When true TLS context truststore is insecure |
tlsKeystoreConfigured | Boolean | Optional | When true keystore is configured |
tlsTruststoreConfigured | Boolean | Optional | When true truststore is configured |
FILE Protocol Configuration
Parameter | Type | Mandatory | Description |
---|---|---|---|
filePath | String | Required | Location of license and TLS files |
licenseFileName | String | Required | Name of license file |
CLASSPATH Protocol Configuration
Parameter | Type | Mandatory | Description |
---|---|---|---|
licenseFileName | String | Required | Name of license file located relative to CLASSPATH |
S3 Protocol Configuration
Parameter | Type | Mandatory | Description |
---|---|---|---|
licenseFileName | String | Required | Name of license file |
s3Bucket | String | Required | Name of S3 bucket in AWS |
s3Region | String | Required | AWS Region for provided bucket |
s3AccessKey | String | Required | Encrypted access key to S3 |
s3SecretKey | String | Required | Encrypted secret key to S3 |
FTP Protocol Configuration
Parameter | Type | Mandatory | Description |
---|---|---|---|
ftpHost | String | Required | FTP server host |
licenseFileName | String | Required | Name of license file |
ftpDirPath | String | Required | License file location in FTP server |
ftpUsername | String | Required | Username that can connect to FTP server |
ftpPassword | String | Required | Encrypted password to connect with provided username |
HTTP HTTPS Protocol Configuration
Parameter | Type | Mandatory | Description |
---|---|---|---|
httpUrl | String | Required | HTTP server address |
licenseFileName | String | Required | Name of license file |
httpDirPath | String | Required | License file location in HTTP |
httpUsername | String | Required | Username that can connect with HTTP |
httpPassword | String | Required | Encrypted password to connect with provided username |
Request example
https://x.x.x.x/test/admin/connections
Request body example
{
"connectionName":"test"
"endpoint":"x.x.x.x",
"userId":"awsdemo",
"password":"ZQpDdYBxRS/LbUsTw09fLuQAB2aGiLe+CA465HF2/weDUCKUH1bw/zZLmxGBS2w=",
"libraryList":"AWSDEMO",
"libraryListMode": "ADD_LAST",
"jobTrace": false,
"secureConnection":true,
"tlsFileName":"awsdemo.truststore",
"truststorePassword":"ZQpDdYBxRS/LbUsTw09fLuQAB2aGiLe+CA465HF2/weDUCKUH1bw/zZLmxGBS2w=",
"tlsIsInsecure":"false",
"tlsKeystoreConfigured":"false",
"tlsTruststoreConfigured":"true",
"filePath":"/aws-demo/license",
"licenseFileName": "as400-license.lic",
"licenseFileProtocol":"FILE"
}
Response example
{
"message": "Connection: 'test' created."
}
PUT https://{gateway-stage-url}/admin/connections/{connection-name}
Use this endpoint for updating existing connection
Parameters are the same as create request
Request example
https://x.x.x.x/test/admin/connections/test
Request body example
{
"connectionName":"test-updated"
"endpoint":"x.x.x.x",
"userId":"awsdemo",
"password":"ZQpDdYBxRS/LbUsTw09fLuQAB2aGiLe+CA465HF2/weDUCKUH1bw/zZLmxGBS2w=",
"libraryList":"AWSDEMO",
"libraryListMode": "ADD_FIRST",
"jobTrace": false,
"secureConnection":true,
"tlsFileName": "awsdemo.truststore",
"truststorePassword":"ZQpDdYBxRS/LbUsTw09fLuQAB2aGiLe+CA465HF2/weDUCKUH1bw/zZLmxGBS2w=",
"tlsIsInsecure":"false",
"tlsKeystoreConfigured":"false",
"tlsTruststoreConfigured":"true",
"filePath":"/aws-demo/license",
"licenseFileName":"as400-license.lic",
"licenseFileProtocol":"FILE",
}
Response example
{
"id": 2,
"name": "test-updated",
"endpoint": "x.x.x.x",
"userId": "awsdemo",
"libraryList": "AWSDEMO",
"libraryListMode": "ADD_FIRST",
"jobTrace": false,
"licenseUrl": "FILE:/aws-demo/license/as400-license.lic",
"operationType": 2,
"cleanupInterval": 300000,
"maxConnections": 10,
"maxInactivity": 3600000,
"maxlifeTime": 86400000,
"maxUseCount": -1,
"maxUseTime": -1,
"pretestConnections": true,
"preStartCountDataQueue": 2,
"preStartCountCommand": 2,
"runMaintenance": true,
"threadUsed": false,
"keepAlive": true,
"loginTimeout": 180000,
"receiveBufferSize": 1000,
"sendBufferSize": 1000,
"soLinger": 0,
"soTimeout": 180000,
"tcpNoDelay": false,
"secureConnection": true,
"status": "OPEN",
"tlsIsInsecure": false,
"tlsTruststoreConfigured": true,
"tlsKeystoreConfigured": false,
"tlsFileName": "awsdemo.truststore",
"licenseFileName": "as400-license.lic",
"isap": "",
"ccsid": 0
}
DELETE https://{gateway-stage-url}/admin/connections/{connection-name}
Use this endpoint to close and delete existing connection
Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Connection name that has to be deleted |
Request example
https://x.x.x.x/test/admin/connections/test
Response example
{
"message": "Connection: 'test' deleted."
}
POST https://{gateway-stage-url}/admin/connections/{connection-name}/close
Use this endpoint to close connection without releasing
Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Connection name that has to be closed |
Request example
https://x.x.x.x/test/admin/connections/test/close
Response example
{
"message": "Connection: 'test' closed."
}
POST https://{gateway-stage-url}/admin/connections/{connection-name}/reopen
Use this endpoint to reopen closed connection
Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Connection name that has to be reopened |
Request example
https://x.x.x.x/test/admin/connections/test/reopen
Response example
{
"message": "Connection: 'test' opened."
}
GET https://{gateway-stage-url}/admin/connections/{connection-name}
Use this endpoint to get connection details
Parameters
Parameters | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Connection name whose details need get |
Request example
https://x.x.x.x/test/admin/connections/test
Response example
{
"id": 2,
"name": "test",
"endpoint": "x.x.x.x",
"userId": "awsdemo",
"libraryList": "AWSDEMO",
"libraryListMode": "ADD_FIRST",
"jobTrace": false,
"licenseUrl": "FILE:/aws-demo/license/as400-license.lic",
"operationType": 2,
"cleanupInterval": 300000,
"maxConnections": 10,
"maxInactivity": 3600000,
"maxlifeTime": 86400000,
"maxUseCount": -1,
"maxUseTime": -1,
"pretestConnections": true,
"preStartCountDataQueue": 2,
"preStartCountCommand": 2,
"runMaintenance": true,
"threadUsed": false,
"keepAlive": true,
"loginTimeout": 180000,
"receiveBufferSize": 1000,
"sendBufferSize": 1000,
"soLinger": 0,
"soTimeout": 180000,
"tcpNoDelay": false,
"secureConnection": true,
"status": "OPEN",
"tlsIsInsecure": false,
"tlsTruststoreConfigured": true,
"tlsKeystoreConfigured": false,
"tlsFileName": "awsdemo.truststore",
"licenseFileName": "as400-license.lic",
"isap": "",
"ccsid": 0
}
GET https://{gateway-stage-url}/admin/connections
Use this endpoint to get all connections
Request example
https://x.x.x.x/test/admin/connections
Response example
[
{
"id": 2,
"name": "test-updated",
"endpoint": "x.x.x.x",
"userId": "awsdemo",
"libraryList": "AWSDEMO",
"libraryListMode": "ADD_FIRST",
"jobTrace": false,
"licenseUrl": "FILE:/aws-demo/license/as400-license.lic",
"operationType": 2,
"cleanupInterval": 300000,
"maxConnections": 10,
"maxInactivity": 3600000,
"maxlifeTime": 86400000,
"maxUseCount": -1,
"maxUseTime": -1,
"pretestConnections": true,
"preStartCountDataQueue": 2,
"preStartCountCommand": 2,
"runMaintenance": true,
"threadUsed": false,
"keepAlive": true,
"loginTimeout": 180000,
"receiveBufferSize": 1000,
"sendBufferSize": 1000,
"soLinger": 0,
"soTimeout": 180000,
"tcpNoDelay": false,
"secureConnection": true,
"status": "OPEN",
"tlsIsInsecure": false,
"tlsTruststoreConfigured": true,
"tlsKeystoreConfigured": false,
"tlsFileName": "awsdemo.truststore",
"licenseFileName": "as400-license.lic",
"isap": "",
"ccsid": 0
}
]
Data Queue Poller
POST https://{gateway-stage-url}/admin/connections/{connection-name}/dqpoller
Use this endpoint to create new DQPoller
Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Connection name that new Data Queue poller will use for reading messages |
pollerName | String | Required | Unique name if Data Queue in application |
dqName | String | Required | DataQueue name in IBMi |
libraryName | String | Required | Data Queue library name where Data Queue located |
messageBroker | String | Required | Name of message broker where will place messages from DataQueue. Supported brokers: JMS, SNS |
messageBrokerProperties | Message Broker Properties | Required | Properties of message broker chosen in messageBroker |
threadCount | Integer | Required | Number of Data Queue Listener threads. Default value: 4 |
dqKey | String | Optional | Must be specified for keyed data queues and blank for non-keyed data queues. For reading any message from data queue, enter "" |
dqSearchType | String | Optional | Must be specified for keyed data queues. For reading any message from data queue, enter greater than or equal. Supported Data Queue search types: equal, not equal, less than, less than or equal, greater than, greater than or equal |
dqPeek | Boolean | Required | When true keep message in Data Queue. Default value: false |
dqFormatFileName | String | Optional | Allows treating data queue entry as an externally defined data structure. When defined, the connector will dynamically retrieve the record format from the specified IBMi file, and parse the received data queue entry into the map of field name / value pairs |
dqFormatFileLibrary | String | Optional | When format file is specified, the format file library can also be specified, otherwise the format file will be located based on the connection library list |
dqFormatExceptionAction | String | Optional | Action that connector will make after failed transformation into format file. Supported actions: discard, place back into queue. Default value: discard |
Message Broker Properties
Configure one kind of property below relates to chosen message broker
Parameter | Type | Mandatory | Description |
---|---|---|---|
jmsProperties | JMS Properties | Optional | Configuration properties for JMS |
snsProperties | SNS Properties | Optional | Configuration properties for SNS |
JMS Properties
Parameter | Type | Mandatory | Description |
---|---|---|---|
connectionFactory | String | Required | Use connection factory for specified JMS broker. Supported JMS brokers: ActiveMQ, Artemis |
url | String | Required | JMS broker url |
userName | String | Required | Encrypted JMS username |
password | String | Required | Encrypted JMS password |
queueName | String | Optional | Queue name where messages will publish |
topicName | String | Optional | Topic name where messages will publish |
SNS Properties
Parameter | Type | Mandatory | Description |
---|---|---|---|
snsTopicName | String | Required | SNS Topic ARN where messages will publish |
accessKey | String | Required | Encrypted AWS access key |
secretKey | String | Required | Encrypted AWS secret key |
region | String | Required | SNS Topic region |
Request example
https://x.x.x.x/test/admin/connections/test/dqpoller
Request body example
{
"pollerName":"poller",
"dqName":"AWSQUEUE",
"libraryName":"DEMOAWS",
"messageBroker": "JMS",
"messageBrokerProperties" : {
"jmsProperties" : {
"connectionFactory": "ActiveMQ",
"url": "tcp://localhost:61616",
"userName": "FXDHm4BmeS2H/jtGe8XXZ/kOMqfwVDVMX4jIYpAqZ6rmUg+sfV8bcnXrStPs",
"password": "FXDHm4BmeS2H/jtGe8XXZ/kOMqfwVDVMX4jIYpAqZ6rmUg+sfV8bcnXrStPs",
"topicName": "AWSTopic"
}
},
"dqKey": 12,
"dqFormatFileName":"",
"dqFormatFileLibrary": "",
"dqSearchType": "equal"
}
Response example
{
"message": "DQPoller: 'poller' has been registered."
}
PUT https://{gateway-stage-url}/admin/connections/{connection-name}/dqpoller/{poller-name}
Use this endpoint to update existing DQPoller
Parameters are the same as create request
Additional URI Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Connection name where Data Queue poller was registered |
poller-name | String | Required | Data Queue poller name that should be updated |
Request example
https://x.x.x.x/test/admin/connections/test/dqpoller/poller
Request body example
{
"pollerName":"poller-updated",
"dqName":"AWSQUEUE",
"libraryName":"DEMOAWS",
"messageBroker": "SNS",
"messageBrokerProperties" : {
"snsProperties" : {
"snsTopicName": "arn:aws:sns:us-east-2:XXXXXXXXXX:AWSDQTopic",
"accessKey" : "PNShIz3PSZHiB9VM6NftAe08sqdTFdhfjdB+dwmlxECGLqiCYKSs/dfzfcwVXMpXXXXXXMkN4mh",
"secretKey" : "MZjlF8lr0ArXNsT5yerKBG4BFeKOwjbXXXXXalMtYO+4hWhk1HJNsUEKDKDfTpTMdbNAR/X/XTNJTxy7r8DOYsZlM=",
"region" : "us-east-2"
}
},
"dqKey": 12,
"dqFormatFileName":"",
"dqFormatFileLibrary": "",
"dqSearchType": "equal"
}
Response example
{
"connectionName": "test",
"pollerName": "poller-updated",
"dqName": "AWSQUEUE",
"libraryName": "DEMOAWS",
"dqKey": 12,
"messageBrokerProperties" : {
"snsProperties" : {
"snsTopicName": "arn:aws:sns:us-east-2:XXXXXXXXXX:AWSDQTopic",
"accessKey" : "PNShIz3PSZHiB9VM6NftAe08sqdTFdhfjdB+dwmlxECGLqiCYKSs/dfzfcwVXMpXXXXXXMkN4mh",
"secretKey" : "MZjlF8lr0ArXNsT5yerKBG4BFeKOwjbXXXXXalMtYO+4hWhk1HJNsUEKDKDfTpTMdbNAR/X/XTNJTxy7r8DOYsZlM=",
"region" : "us-east-2"
}
},
"dqFormatFileName": "",
"dqFormatFileLibrary": "",
"dqFormatExceptionAction": "discard",
"dqWaitTime": null,
"dqPeek": false,
"dqSearchType": "equal",
"threadCount": 4,
"status": "ACTIVE",
}
DELETE https://{gateway-stage-url}/admin/connections/{connection-name}/dqpoller/{poller-name}
Use this endpoint to delete existing DQPoller
Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Connection name where Data Queue poller was registered |
poller-name | String | Required | Data Queue poller name that should be deleted |
Request example
https://x.x.x.x/test/admin/connections/test/dqpoller/poller
Response example
{
"message": "DQ Poller: 'poller' deleted."
}
GET https://{gateway-stage-url}/admin/connections/{connection-name}/dqpoller/{poller-name}
Use this endpoint to get Data Queue poller details
Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Connection name where Data Queue poller was registered |
Request example
https://x.x.x.x/test/admin/connections/test/dqpoller/poller
Response example
{
"connectionName": "test",
"pollerName": "poller",
"dqName": "AWSQUEUE",
"libraryName": "DEMOAWS",
"dqKey": 12,
"messageBrokerProperties" : {
"snsProperties" : {
"snsTopicName": "arn:aws:sns:us-east-2:XXXXXXXXXX:AWSDQTopic",
"accessKey" : "PNShIz3PSZHiB9VM6NftAe08sqdTFdhfjdB+dwmlxECGLqiCYKSs/dfzfcwVXMpXXXXXXMkN4mh",
"secretKey" : "MZjlF8lr0ArXNsT5yerKBG4BFeKOwjbXXXXXalMtYO+4hWhk1HJNsUEKDKDfTpTMdbNAR/X/XTNJTxy7r8DOYsZlM=",
"region" : "us-east-2"
}
},
"dqFormatFileName": "",
"dqFormatFileLibrary": "",
"dqFormatExceptionAction": "discard",
"dqWaitTime": null,
"dqPeek": false,
"dqSearchType": "equal",
"threadCount": 4,
"status": "ACTIVE",
}
GET https://{gateway-stage-url}/admin/connections/{connection-name}/dqpoller
Use this endpoint to get all Data Queue pollers registered in defined connection
Parameters
Parameter | String | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Connection name where Data Queue pollers were registered |
Request example
https://x.x.x.x/test/admin/connections/test/dqpoller
Response example
[
{
"connectionName": "test",
"pollerName": "poller-updated",
"dqName": "AWSQUEUE",
"libraryName": "DEMOAWS",
"dqKey": 12,
"messageBrokerProperties" : {
"snsProperties" : {
"snsTopicName": "arn:aws:sns:us-east-2:XXXXXXXXXX:AWSDQTopic",
"accessKey" : "PNShIz3PSZHiB9VM6NftAe08sqdTFdhfjdB+dwmlxECGLqiCYKSs/dfzfcwVXMpXXXXXXMkN4mh",
"secretKey" : "MZjlF8lr0ArXNsT5yerKBG4BFeKOwjbXXXXXalMtYO+4hWhk1HJNsUEKDKDfTpTMdbNAR/X/XTNJTxy7r8DOYsZlM=",
"region" : "us-east-2"
}
},
"dqFormatFileName": "",
"dqFormatFileLibrary": "",
"dqFormatExceptionAction": "discard",
"dqWaitTime": null,
"dqPeek": false,
"dqSearchType": "equal",
"threadCount": 4,
"status": "ACTIVE",
}
]
Program Call
POST https://{gateway-stage-url}/admin/connections/{connection-name}/program-calls
Use this endpoint to create new program call
Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Connection name that new Program Call will use for execution |
programName | String | Required | Name of program call in IBMi |
programLibrary | String | Required | Library where program located in IBMi |
libraryList | String | Optional | Comma separated list if libraries that needs to be added to the user library list |
libraryListMode | String | Optional | Mode of adding new libraries: ADD_FIRST, ADD_LAST, REPLACE. Default value: ADD_FIRST |
procedureName | String | Optional | Name of service program procedure |
procedureReturnsValue | Boolean | Optional | Indicator if the service program procedure returns a value. Default value: false |
threadSafe | Boolean | Optional | Indicator if the program is thread safe. Default value: false |
programCallParameters | Program Call Parameter[] | Optional | List of definitions and value references of program parameters included in params key in request |
Program Call Parameter
Parameter | Type | Mandatory | Description |
---|---|---|---|
parameterName | String | Required | Parameter name in IBMi Program Call |
sourceFieldName | String | Optional | Must be defined for parameters with IN and INOUT usage. Parameter name in program call execution request. Defined as $['name of parameter in request'] |
dataType | String | Required | Supported AS400 parameter data type |
length | Integer | Required | Parameter length. Default value: 0 |
decimalPositions | Integer | Required | Number of decimal positions. Default value: 0 |
usage | String | Required | Defined using parameter in program call. For input parameters IN, output - OUT, for parameters those used as input and output - INOUT |
count | Integer | Required | Amount of parameter in program call result. Default value: 1 |
dataStructureElements | Program Call Parameter | Optional | Defined for STRUCTURE parameter. Default value: empty array [] |
Request example
https://x.x.x.x/test/admin/connections/test/program-calls
Request body example
{
"programName":"POSTORDSP",
"programLibrary":"AWSDEMO",
"libraryList": "AWSDEMO",
"libraryListMode": "ADD_LAST",
"programCallParameters": {
"params": [
{
"parameterName": "orderId",
"sourceFieldName": "$['orderID']",
"dataType": "PACKED",
"length": 8,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "orderLines",
"sourceFieldName": "$['orderLines']",
"dataType": "PACKED",
"length": 4,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "orderLinesIn",
"sourceFieldName": "$['orderItemsIn']",
"dataType": "STRUCTURE",
"length": 0,
"decimalPositions": 0,
"usage": "INOUT",
"count": 10,
"dataStructureElements": [
{
"parameterName": "item",
"sourceFieldName": "$['item']",
"dataType": "STRING",
"length": 35,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "qty",
"sourceFieldName": "$['qty']",
"dataType": "PACKED",
"length": 11,
"decimalPositions": 3,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "price",
"sourceFieldName": "$['price']",
"dataType": "PACKED",
"length": 14,
"decimalPositions": 4,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
}
]
},
{
"parameterName": "orderLinesOut",
"sourceFieldName": "",
"dataType": "STRUCTURE",
"length": 0,
"decimalPositions": 0,
"usage": "OUT",
"count": 10,
"dataStructureElements": [
{
"parameterName": "item",
"sourceFieldName": "$['item']",
"dataType": "STRING",
"length": 35,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "qty",
"sourceFieldName": "$['qty']",
"dataType": "PACKED",
"length": 11,
"decimalPositions": 3,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "price",
"sourceFieldName": "$['price']",
"dataType": "PACKED",
"length": 14,
"decimalPositions": 4,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
}
]
}
]
},
"procedureName": "AWSDEMO",
"procedureReturnsValue": false,
"threadSafe":false
}
Response example
{
"message": "ProgramCall has been registered for program 'POSTORDSP'"
}
PUT https://{gateway-stage-url}/admin/connections/{connection-name}/program-calls/{program-call-name}
Use this endpoint to update existing program call
Parameters are the same as create request
Additional URI Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Name of connection where program call was registered |
program-call-name | String | Required | Name of program call that should be updated |
Request example
https://x.x.x.x/test/admin/connections/test/program-calls/POSTORDSP
Request body example
{
"programName":"POSTORDSP-UPDATED",
"programLibrary":"AWSDEMO",
"libraryList": "AWSDEMO",
"libraryListMode": "ADD_FIRST",
"programCallParameters": {
"params": [
{
"parameterName": "orderId",
"sourceFieldName": "$['orderID']",
"dataType": "PACKED",
"length": 8,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "orderLines",
"sourceFieldName": "$['orderLines']",
"dataType": "PACKED",
"length": 4,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "orderLinesIn",
"sourceFieldName": "$['orderItemsIn']",
"dataType": "STRUCTURE",
"length": 0,
"decimalPositions": 0,
"usage": "INOUT",
"count": 10,
"dataStructureElements": [
{
"parameterName": "item",
"sourceFieldName": "$['item']",
"dataType": "STRING",
"length": 35,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "qty",
"sourceFieldName": "$['qty']",
"dataType": "PACKED",
"length": 11,
"decimalPositions": 3,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "price",
"sourceFieldName": "$['price']",
"dataType": "PACKED",
"length": 14,
"decimalPositions": 4,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
}
]
},
{
"parameterName": "orderLinesOut",
"sourceFieldName": "",
"dataType": "STRUCTURE",
"length": 0,
"decimalPositions": 0,
"usage": "OUT",
"count": 10,
"dataStructureElements": [
{
"parameterName": "item",
"sourceFieldName": "$['item']",
"dataType": "STRING",
"length": 35,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "qty",
"sourceFieldName": "$['qty']",
"dataType": "PACKED",
"length": 11,
"decimalPositions": 3,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "price",
"sourceFieldName": "$['price']",
"dataType": "PACKED",
"length": 14,
"decimalPositions": 4,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
}
]
}
]
},
"procedureName": "AWSDEMO",
"procedureReturnsValue": false,
"threadSafe":false
}
Response example
{
"id": 2,
"programName": "POSTORDSP-UPDATED",
"programLibrary": "AWSDEMO",
"libraryList": "AWSDEMO",
"libraryListMode": "ADD_FIRST",
"programCallParameters": {
"params": [
{
"parameterName": "orderId",
"sourceFieldName": "$['orderID']",
"dataType": "PACKED",
"length": 8,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "orderLines",
"sourceFieldName": "$['orderLines']",
"dataType": "PACKED",
"length": 4,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "orderLinesIn",
"sourceFieldName": "$['orderItemsIn']",
"dataType": "STRUCTURE",
"length": 0,
"decimalPositions": 0,
"usage": "INOUT",
"count": 10,
"dataStructureElements": [
{
"parameterName": "item",
"sourceFieldName": "$['item']",
"dataType": "STRING",
"length": 35,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "qty",
"sourceFieldName": "$['qty']",
"dataType": "PACKED",
"length": 11,
"decimalPositions": 3,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "price",
"sourceFieldName": "$['price']",
"dataType": "PACKED",
"length": 14,
"decimalPositions": 4,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
}
]
},
{
"parameterName": "orderLinesOut",
"sourceFieldName": "",
"dataType": "STRUCTURE",
"length": 0,
"decimalPositions": 0,
"usage": "OUT",
"count": 10,
"dataStructureElements": [
{
"parameterName": "item",
"sourceFieldName": "$['item']",
"dataType": "STRING",
"length": 35,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "qty",
"sourceFieldName": "$['qty']",
"dataType": "PACKED",
"length": 11,
"decimalPositions": 3,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "price",
"sourceFieldName": "$['price']",
"dataType": "PACKED",
"length": 14,
"decimalPositions": 4,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
}
]
}
]
},
"procedureName": "AWSDEMO",
"procedureReturnsValue": false,
"threadSafe": false
}
DELETE https://{gateway-stage-url}/admin/connections/{connection-name}/program-calls/{program-call-name}
Use this endpoint to delete existing program call
Parameters
Parameters | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Name of connection where program call was registered |
program-call-name | String | Required | Name of program call that should be deleted |
Request example
https://x.x.x.x/test/admin/connections/test/program-calls/POSTORDSP
Response example
{
"message": "ProgramCall: 'POSTORDSP' deleted."
}
GET https://{gateway-stage-url}/admin/connections/{connection-name}/program-calls/{program-call-name}
Use this endpoint to get Program Call details
Parameters
Parameters | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Name of connection where program call was registered |
program-call-name | String | Required | Name of program call that details needed |
Request example
https://x.x.x.x/test/admin/connections/test/program-calls/POSTORDSP
Response example
{
"id": 3,
"programName": "POSTORDSP",
"programLibrary": "AWSDEMO",
"libraryList": "AWSDEMO",
"libraryListMode": "ADD_LAST",
"programCallParameters": {
"params": [
{
"parameterName": "orderId",
"sourceFieldName": "$['orderID']",
"dataType": "PACKED",
"length": 8,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "orderLines",
"sourceFieldName": "$['orderLines']",
"dataType": "PACKED",
"length": 4,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "orderLinesIn",
"sourceFieldName": "$['orderItemsIn']",
"dataType": "STRUCTURE",
"length": 0,
"decimalPositions": 0,
"usage": "INOUT",
"count": 10,
"dataStructureElements": [
{
"parameterName": "item",
"sourceFieldName": "$['item']",
"dataType": "STRING",
"length": 35,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "qty",
"sourceFieldName": "$['qty']",
"dataType": "PACKED",
"length": 11,
"decimalPositions": 3,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "price",
"sourceFieldName": "$['price']",
"dataType": "PACKED",
"length": 14,
"decimalPositions": 4,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
}
]
},
{
"parameterName": "orderLinesOut",
"sourceFieldName": "",
"dataType": "STRUCTURE",
"length": 0,
"decimalPositions": 0,
"usage": "OUT",
"count": 10,
"dataStructureElements": [
{
"parameterName": "item",
"sourceFieldName": "$['item']",
"dataType": "STRING",
"length": 35,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "qty",
"sourceFieldName": "$['qty']",
"dataType": "PACKED",
"length": 11,
"decimalPositions": 3,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "price",
"sourceFieldName": "$['price']",
"dataType": "PACKED",
"length": 14,
"decimalPositions": 4,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
}
]
}
]
},
"procedureName": "AWSDEMO",
"procedureReturnsValue": false,
"threadSafe": false
}
GET https://{gateway-stage-url}/admin/connections/{connection-name}/program-calls
Use this endpoint to get all program calls registered in defined connection
Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Name of connection where program calls were registered |
Request example
https://x.x.x.x/test/admin/connections/test/program-calls
Response example
[
{
"id": 3,
"programName": "POSTORDSP",
"programLibrary": "AWSDEMO",
"libraryList": "AWSDEMO",
"libraryListMode": "ADD_LAST",
"programCallParameters": {
"params": [
{
"parameterName": "orderId",
"sourceFieldName": "$['orderID']",
"dataType": "PACKED",
"length": 8,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "orderLines",
"sourceFieldName": "$['orderLines']",
"dataType": "PACKED",
"length": 4,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "orderLinesIn",
"sourceFieldName": "$['orderItemsIn']",
"dataType": "STRUCTURE",
"length": 0,
"decimalPositions": 0,
"usage": "INOUT",
"count": 10,
"dataStructureElements": [
{
"parameterName": "item",
"sourceFieldName": "$['item']",
"dataType": "STRING",
"length": 35,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "qty",
"sourceFieldName": "$['qty']",
"dataType": "PACKED",
"length": 11,
"decimalPositions": 3,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "price",
"sourceFieldName": "$['price']",
"dataType": "PACKED",
"length": 14,
"decimalPositions": 4,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
}
]
},
{
"parameterName": "orderLinesOut",
"sourceFieldName": "",
"dataType": "STRUCTURE",
"length": 0,
"decimalPositions": 0,
"usage": "OUT",
"count": 10,
"dataStructureElements": [
{
"parameterName": "item",
"sourceFieldName": "$['item']",
"dataType": "STRING",
"length": 35,
"decimalPositions": 0,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "qty",
"sourceFieldName": "$['qty']",
"dataType": "PACKED",
"length": 11,
"decimalPositions": 3,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
},
{
"parameterName": "price",
"sourceFieldName": "$['price']",
"dataType": "PACKED",
"length": 14,
"decimalPositions": 4,
"usage": "INOUT",
"count": 1,
"dataStructureElements": []
}
]
}
]
},
"procedureName": "AWSDEMO",
"procedureReturnsValue": false,
"threadSafe": false
}
]
Connector Operations
Execute Command Call
POST https://{gateway-stage-url}/api/connections/{connection-name}/command-call
Use this endpoint to execute command call
Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Connection name where command call has to be executed |
commandName | String | Required | IBMi command line |
Request example
https://x.x.x.x/test/api/connections/test/command-call
Request body example
{
"commandName": "CHGJOB"
}
Response example
{
"message": "Command call: 'CHGJOB' executed successfully."
}
Execute program call
POST https://{gateway-stage-url}/api/connections/{connection-name}/program-calls/{program-call-name}
Use this endpoint to execute program call
Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Connection name where program call was registered |
program-call-name | String | Required | Unique name of program call in application |
Program Call Parameters Values | ------ | Required | Program Call Parameters values definition. Parameter key must be the same as in sourceField when program call was configured |
Request example
https://x.x.x.x/test/api/connections/test/program-calls/POSTORDSP
Request body example
{
"orderID": 12345,
"orderLines": 3,
"orderItemsIn": [
{
"item": "ITEM1",
"qty": 123.45,
"price": 321.45
},
{
"item": "ITEM2",
"qty": 234.45,
"price": 987.45
},
{
"item": "ITEM3",
"qty": 235.98,
"price": 123.95
}
]
}
Response example
{
"message": {
"orderId": 12445,
"orderLines": 3,
"orderLinesIn": [
{
"item": "ITEM1",
"qty": 123.450,
"price": 321.4500
},
{
"item": "ITEM2",
"qty": 234.450,
"price": 987.4500
},
{
"item": "ITEM3",
"qty": 235.980,
"price": 123.9500
},
{
"item": "",
"qty": 0.000,
"price": 0.0000
},
{
"item": "",
"qty": 0.000,
"price": 0.0000
},
{
"item": "",
"qty": 0.000,
"price": 0.0000
},
{
"item": "",
"qty": 0.000,
"price": 0.0000
},
{
"item": "",
"qty": 0.000,
"price": 0.0000
},
{
"item": "",
"qty": 0.000,
"price": 0.0000
},
{
"item": "",
"qty": 0.000,
"price": 0.0000
}
],
"orderLinesOut": [
{
"item": "ITEM1out",
"qty": 143.450,
"price": 331.4500
},
{
"item": "ITEM2out",
"qty": 254.450,
"price": 997.4500
},
{
"item": "ITEM3out",
"qty": 255.980,
"price": 133.9500
},
{
"item": "",
"qty": 0.000,
"price": 0.0000
},
{
"item": "",
"qty": 0.000,
"price": 0.0000
},
{
"item": "",
"qty": 0.000,
"price": 0.0000
},
{
"item": "",
"qty": 0.000,
"price": 0.0000
},
{
"item": "",
"qty": 0.000,
"price": 0.0000
},
{
"item": "",
"qty": 0.000,
"price": 0.0000
},
{
"item": "",
"qty": 0.000,
"price": 0.0000
}
]
}
}
Publish message into Data Queue
POST https://{gateway-stage-url}/api/connections/{connection-name}/data-queue/{library-name}/_
{data-queue-name}_
Use this endpoint to publish message into Data Queue
Headers
Parameter | Type | Mandatory | Description |
---|---|---|---|
dataQueueKey | String | Optional | Must be specified for keyed data queues and blank for non-keyed data queues |
formatFileName | String | Optional | When defined, the connector expects the JSON string to be passed as Data Queue Entry. The connector will dynamically retrieve the record format from the specified IBMi file, parse the JSON string passed into the processor, into a binary byte array that can be interpreted on IBM i side as a data structure. The JSON string must have a list of elements with element name matching the format file column name, and associated value |
formatFileLibrary | String | Optional | When format file is specified, the format file library can also be specified, otherwise the format file will be located based on the connection library list |
Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Name of the connection from which operation will be executed |
library-name | String | Required | Name of library where data queue specified |
data-queue-name | String | Required | Data queue name where new message should be placed |
dataQueueEntry | String | Required | Data queue message in JSON format that should be placed into Data Queue |
Request example
https://x.x.x.x/test/api/connections/test/data-queue/DEMOAWS/AWSQUEUE
Headers example
Key | Value |
---|---|
dataQueueKey | 12 |
formatFileName | |
formatFileLibrary |
Request body example
{
"dataQueueEntry": "Hello world!"
}
Response example
{
"message": "'Hello world!' has been posted into data queue."
}
Read message from Data Queue
GET https://{gateway-stage-url}/api/connections/{connection-name}/data-queue/{library-name}/{data-queue-name}
Use this endpoint to read message from Data Queue
Headers
Parameter | Type | Mandatory | Description |
---|---|---|---|
dataQueueKey | String | Optional | Must be specified for keyed data queues and blank for non-keyed data queues. For reading any message from data queue, enter ' ' |
formatFileName | String | Optional | When defined, the connector will dynamically retrieve the record format from the specified IBMi file, and parse the received data queue entry into the map of field name / value pairs |
formatFileLibrary | String | Optional | When format file is specified, the format file library can also be specified, otherwise the format file will be located based on the connection library list |
formatExceptionAction | String | Optional | Action that connector will made after failed transformation into format file. Supported actions: discard, place back into queue. Default value: discard |
searchType | String | Optional | Must be specified for keyed data queues. For reading any message from data queue, enter greater or equal. Supported Data Queue search types: equal, not equal, less than, less than or equal, greater than, greater than or equal |
waitTime | String | Optional | Waiting time for a message to be read from the data queue |
peek | Boolean | Required | When true keep message in Data Queue |
Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
connection-name | String | Required | Name of the connection from which operation will be executed |
library-name | String | Required | Name of library where data queue specified |
data-queue-name | String | Required | Data queue name to read message from |
Request example
https://x.x.x.x/test/api/connections/test/data-queue/DEMOAWS/AWSQUEUE
Headers example
Key | Value |
---|---|
dataQueueKey | 12 |
peek | false |
searchType | equal |
formatFileName | |
formatFileLibrary | |
dqFormatExceptionAction |
Response example
{
"message": "Hello world|"
}
Encryption
POST https://{gateway-stage-url}/admin/encryption
Use this endpoint to encrypt your credentials for connections
Parameters
Can be defined any amount of parameters these must be encrypted
Request example
https://x.x.x.x/test/admin/encryption
Request body example
{
"password":"awsdemo",
"secretKey":"aws",
"accessKey" : "demo"
}
Response example
{
"password": "/B3qR888gg8l3XKA0z/mdTDfYkW8KOQk41llLsr0olhiYcXy/12t3ATe0ryJtyw=",
"secretKey": "tCMRsFRfTmzMtMf+xh22dIYmgFX89kHEb4a92vIg0pe10Wmr2gmIfzHuJA==",
"accessKey": "2JsYMjy1qx33y2Rcn0t/TUQjL16NbgWNJmNFZjCAaU44IEf9xOOc2OVu19s="
}