Search code examples
httpibm-midrangeiseries-navigator

Is it possible to run IBM i / AS400 commands from HTTP or some other external means?


I would like to call IBM commands on the AS400 from either some external API or REST endpoint. Does IBM i / AS400 provide anything like this?


Solution

  • There is a service program called XMLSERVICE which is included with any reasonably recent IBM i, and it is a fairly simple way for any client to communicate with the i, including issuing IBM i commands and receiving parameters back from IBM i programs. It accepts multiple "transport" methods, including HTTP and ODBC.

    There are wrappers for XMLSERVICE in various programming languages, such as Python, JavaScript (Node.js), PHP, and Ruby. If you are comfortable with any of these languages, or can find a version of itoolkit for the language of your choice, it is quite easy to use.

    If you cannot choose what method is going to be used on the client side, and are looking to set up something very standardized like a RESTful HTTP interface on the IBM i, then you can easily do that using one of numerous available options, including again Python and Node.js, both of which have been packaged by IBM and provided for free and easy installation.