Try OpenEdge Now
skip to main content
Web Services
Creating OpenEdge REST Web Services : REST Applications : JSON input and output message formats : JSON input (request) messages
 
JSON input (request) messages
Input messages are JSON objects named "request". This object contains properties that are mapped to ABL parameters defined as INPUT and INPUT-OUTPUT. The property names are identical to the parameter names they are being mapped to.
All ABL parameters types that are supported by OpenEdge REST applications and that can be represented as JSON objects are supported. This includes datasets and temp-tables. See the Input parameter mapping for more information about supported ABL parameter types.
The following is an example of an input message:
{"request":
  {"Param1":"String param",
   "Param2":true
   "Param3": [{
    "Country": "United Kingdom",
    "Name": "Just Joggers Limited",
     "Address": "Fairwind Trading Est",
     "Address2": "Shoe Lane",
     "City": "Ramsbottom",
     "State": "Sussex",
     "PostalCode": "BL0 9ND",
     "Contact": "George Lacey",
     "Phone": "070 682 2887",
     "SalesRep": "SLS",
     "CreditLimit": 22000.00,
     "Balance": 1222.11,
     "Terms": "Net30",
     "Discount": 20,
     "Comments": "This is a modified record",
     "Fax": "",
     "EmailAddress": ""
    }]
   }
}
In the above example, the REQUEST_BODY of the incoming message contains 3 parameters. They are a CHARACTER parameter with the name Param1, a LOGICAL parameter with the name Param2, and a DATASET parameter with the name Param3. To access these parameters, the AppServer procedure must have these parameters declared.