# Infor XA REST API: expose XA through IBM i Integrated Web Services or ION

> Source: https://netray.co/erp-help/infor-xa-rest-api-ion-and-ibm-i-web-services
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## Short answer

Infor XA has no single built-in REST API. Practical routes are IBM i Integrated Web Services (IWS), which turns RPG or SQL routines into REST endpoints on the same machine, and Infor ION where your environment supports it. For reads, SQL-backed services are straightforward. For writes, call XA's own programs so business rules run.

## Kind

how-to

## System

infor-xa

## Erp

Infor XA (MAPICS XA, IBM i)

## Module

Integration / REST

## Query

infor xa rest api

## Alternate Queries

- infor xa api
- mapics rest api ibm i
- infor xa integration ion

## Applies To

Infor XA on IBM i. IWS requires a supported IBM i release; ION connectivity depends on your licence and XA version.

## Steps

### Expose an XA function as REST

**Items:**

- Decide whether the service is read-only (SQL) or a write (calling an XA program).
- For reads, create an SQL view or stored procedure over the XA files with only the columns you need.
- Open the IBM i Integrated Web Services Server and create a service from the stored procedure or program.
- Choose REST, define the URI, method and JSON mapping.
- Assign a service user profile with least authority and the right library list.
- Secure with TLS and authentication, and restrict by network.
- Test with curl or Postman against a test partition or library.
- Log requests and errors, and put a gateway or ION in front for external consumers.

## Sections

### Option 1: IBM i Integrated Web Services

**Body:**

IWS is part of IBM i and can publish RPG, COBOL or SQL procedures as REST or SOAP services without writing a separate web application. You describe the service, the program or procedure behind it and the parameter mapping, and IWS handles HTTP and JSON.

It is a good fit for small, well-defined functions such as item lookup, order status or on-hand quantity. Keep each service narrow.

**Code:**

-- SQL procedure that IWS can publish
CREATE OR REPLACE PROCEDURE XALIB.GET_ITEM (IN P_ITEM CHAR(15))
  LANGUAGE SQL RESULT SETS 1
BEGIN
  DECLARE C1 CURSOR FOR
    SELECT ITNBR, ITDSC FROM XALIB.ITEMMASTER WHERE ITNBR = P_ITEM;
  OPEN C1;
END;

-- Call
curl -u svc:*** https://ibmi.example.com:8443/web/services/getItem?p_item=ABC-100

Table and column names above are illustrative. Use the real XA file and field names from your library.

### Option 2: Infor ION

**Body:**

If you license Infor OS and ION, you can connect XA through the available connection points and expose APIs through ION API gateway. This helps when other Infor products are in play and you want central security, monitoring and routing. Whether an XA connector exists for your release should be confirmed with Infor.

### Writes and safety

**Body:**

XA files carry relationships that its programs maintain. Writing with SQL INSERT or UPDATE can leave orders, inventory and costing out of step. For writes, call the XA program or API that performs the transaction, add idempotency keys and queue requests. For reads, use a replica or a read-only profile.

## Pitfalls

- Publishing writes by direct file updates.
- Using a powerful profile for the web service.
- Exposing IWS directly to the internet.
- Returning entire tables instead of narrow, paged results.
- Treating example field names as the real XA schema.

## Ai Angle

These endpoints are also the interface an AI agent needs: narrow read tools first, write tools only with human approval. Netray builds the agent layer over IWS or ION-exposed XA services and runs the model on your own hardware.

## Faq

### Does Infor XA have a native REST API?

**Answer:** Not as a single product feature that we can point to for every release. Use IBM i Integrated Web Services or ION where supported, and check with Infor for your version.

### Is IWS free?

**Answer:** It ships with IBM i, but it needs a supported OS level and configuration. Confirm licensing with IBM.

### Can I read XA data without any API?

**Answer:** Yes, with SQL over ODBC or JDBC to the IBM i for read-only needs, using a limited profile.

### How do I authenticate callers?

**Answer:** Use TLS with basic or token authentication at a gateway, map it to a least-privilege IBM i profile, and restrict by network.

## Search terms

infor xa rest api, mapics rest api, ibm i integrated web services, infor xa api, infor xa ion, ibm i rest service rpg, infor xa integration, mapics integration

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
