Core-i™ Solutions

CoreiRST IBMi Server Consumable Sample SQLRPGLE API's

This list of sample API's was just pulled directly from the IBMi Core-i™ RST API library sitting on my IBMi lpar. This demonstration will show you just how easy it is to consume API's that live directly on the IBMi written in native IBMi code (RPG, COBOL, SQLRPGLE, etc.). CoreiRST implements an IBMi side middleware program that handles all the http communication, which segregates the traditional RPG development world from the off-platform http world. This leaves your RPG developers (or even admins) the simple capability of auto generating *PGM's (SQLRPGLE recommended) as powerful API's to inteface with off platform http requests.

The only required pieces of info a remote system needs to consume a Core-i™ RST API on IBMi is:
- URI endpoint (ie. https://yourIBMi.com/rest/rst00001r/)
- IBMi userProfile/Password (and/or certificate)
- http Request (ie. json string, or REST verb/noun: getCustomerBankAccountInfo/203)



API Library API Command IBM i Program Request Example Action
COREIRST endPointExecutionTimeOnly
{
  "env": "xxx",
  "command": "endPointExecutionTimeOnly"
}
Modify/Consume API
COREIRST getTableLayout API0000002
{
  "env": "xxx",
  "command": "getTableLayout",
  "payload": [
    {
      "schema": "COREIRST",
      "table": "RST00001T"
    },
    {
      "schema": "COREIRST",
      "table": "RST00002T"
    }
  ]
}
Modify/Consume API
COREIRST getCustomerBankAccountInfo API0000003
{
  "env": "xxx",
  "command": "getCustomerBankAccountInfo",
  "payload": [
    {
      "custNo": "200"
    },
    {
      "custNo": "201"
    },
    {
      "custNo": "202"
    },
    {
      "custNo": "203"
    },
    {
      "custNo": "204"
    },
    {
      "custNo": "205"
    },
    {
      "custNo": "500"
    },
    {
      "custNo": "501"
    },
    {
      "custNo": "502"
    },
    {
      "custNo": "503"
    },
    {
      "custNo": "504"
    },
    {
      "custNo": "505"
    }
  ]
}
Modify/Consume API
COREIRST getListOfCustomers API0000005
{
  "env": "xxx",
  "command": "getListOfCustomers",
  "payload": {
    "pageSize": 10,
    "pageNumber": 10
  }
}
Modify/Consume API
COREIRST getWeatherCondition API0000006
{
  "env": "xxx",
  "command": "getWeatherCondition",
  "payload": [
    {
      "cityState": "Mobile"
    },
    {
      "cityState": "Lexington"
    }
  ]
}
Modify/Consume API