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
COREIRST endPointExecutionTimeOnly
{
  "command": "endPointExecutionTimeOnly",
  "env": "xxx"
}
Modify/Consume API
COREIRST getCustomerBankAccountInfo API0000003
{
  "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"
    }
  ],
  "command": "getCustomerBankAccountInfo",
  "env": "xxx"
}
Modify/Consume API
COREIRST getListOfAPIs API0000001
{
  "env": "xxx",
  "payload": [
    {
      "apiCommand": "",
      "apiLibrary": "COREIRST"
    }
  ],
  "command": "getListOfAPIs"
}
Modify/Consume API
COREIRST getListOfCustomers API0000005
{
  "payload": {
    "pageNumber": 10,
    "pageSize": 10
  },
  "env": "xxx",
  "command": "getListOfCustomers"
}
Modify/Consume API
COREIRST getTableLayout API0000002
{
  "payload": [
    {
      "table": "RST00001T",
      "schema": "COREIRST"
    },
    {
      "table": "RST00002T",
      "schema": "COREIRST"
    }
  ],
  "env": "xxx",
  "command": "getTableLayout"
}
Modify/Consume API
COREIRST getWeatherCondition API0000006
{
  "env": "xxx",
  "command": "getWeatherCondition",
  "payload": [
    {
      "cityState": "Mobile"
    },
    {
      "cityState": "Lexington"
    }
  ]
}
Modify/Consume API