Adabas REST Interface

The Adabas REST Interface included in the package can be used to access data from any programming language that supports HTTP requests. The Adabas REST Interface provides an HTTP entry point to read (GET), create (POST), update (PUT) and delete (DELETE) Adabas record data. The read (GET) functionality is set up in advance to be used with query, search and sort parameters.

The server can deliver the response in two text formats, JSON and XML.

The data can be accessed in two ways. One way is to use a classic Adabas database reference with database ID, file number and field name. A second way is to use the Adabas Client for Java to view definitions, which in turn requires a map.

A standard request URL to read data has the following form:

http://<host name>:<port>/rest/<location reference>

A request to read JSON data out of database ID 24 and file 11 with ISN 1 would look like this:

http://localhost:8190/rest/db/24/11/1

This request will return JSON data that looks as follows:

{"Records":[{"A2":[{"AM":"44864858","AN":"1033"}],"A1":[{"AK":"89300","AL":"F","AI":["26 AVENUE RHIN ET
DA"],"AJ":"JOIGNY"}],"AA":"50005800","AB":[{"AC":"SIMONE","AD":"","AE":"ADAM"}],"AQ":[{"AT":[138],"AS":963,
"AR":"EUR"}],"A3":[{"AV":5,"AU":19}],"AG":"F","AH":712981,"AW":[{"AX":19990801,"AY":19990831}],"AF":"M","AZ
":["FRE","ENG"],"ISN":1,"AO":"VENT59","AP":"CHEF DE SERVICE"}],"NrRecords":1,"FileRecords":-1}

If the HTTP header entry "Accept: application/xml" is sent, the result will look like this:

<?xml version="1.0" encoding="UTF-8"?><Response><Record ISN="1"><Group sn="A2"><Field
sn="AN">1033</Field><Field sn="AM">44864858</Field></Group><Group sn="A1"><Multiple sn="AI"><Field
sn="AI">26 AVENUE RHIN ET DA</Field></Multiple><Field sn="AJ">JOIGNY</Field><Field
sn="AK">89300</Field><Field sn="AL">F</Field></Group><Group sn="A3"><Field sn="AU">19</Field><Field
sn="AV">5</Field></Group><Period sn="AQ"><Entry><Field sn="AR">EUR</Field><Field
sn="AS">963</Field><Multiple sn="AT"><Field sn="AT">138</Field></Multiple></Entry></Period><Period
sn="AW"><Entry><Field sn="AX">19990801</Field><Field sn="AY">19990831</Field></Entry></Period><Multiple
sn="AZ"><Field sn="AZ">FRE</Field><Field sn="AZ">ENG</Field></Multiple><Field
sn="AA">50005800</Field><Group sn="AB"><Field sn="AC">SIMONE</Field><Field sn="AE">ADAM</Field><Field
sn="AD"></Field></Group><Field sn="AG">F</Field><Field sn="AH">712981</Field><Field sn="AF">M</Field><Field
sn="AO">VENT59</Field><Field sn="AP">CHEF DE SERVICE</Field></Record></Response>

A set of filter, search and modification functions is provided with the package.