Try OpenEdge Now
skip to main content
Web Services
Creating OpenEdge REST Web Services : Data Object Services : URIs for accessing Data Object Web applications, Services, and resources : Using a REST client to execute a Data Object operation
 
Using a REST client to execute a Data Object operation
Once you have constructed the correct URI for the REST resource that represents a given Data Object operation, you can specify it as part of the HTTP request to execute the operation from a REST client, such as Postman. However, a REST client requires four basic pieces of information to send an HTTP request:
1. URI — As described in the previous section
2. Media type — Always application/json for Data Object operations
3. HTTP verb — As specified for each Data Object operation:
*CreatePOST
*ReadGET (with a query parameter in the URI—see Data Object URIs for testing resources from REST clients)
*UpdatePUT (with no op-element in the URI—see Data Object URIs for testing resources from REST clients)
*DeleteDELETE
*SubmitPUT (with an op-element in the URI, similar to Invoke—see Data Object URIs for testing resources from REST clients)
*InvokePUT (for all Invoke operations, each of which is identified and distinguished from the others by the relative URI value annotated for the implementing ABL routine and specified as op-element in the URI—see Data Object URIs for testing resources from REST clients)
4. Other HTTP request components — Especially INPUT parameters to be included in the body of the HTTP request (described below)
Note that, other than the filter parameter that is passed as the op-element in the URI of a Data Object Read operation request (see see Data Object URIs for testing resources from REST clients), all other INPUT (and the input side of INPUT-OUTPUT) parameters passed to the implementing ABL routines for Data Object operations are passed in the body of the HTTP request. This includes the JSON object for an INPUT-OUTPUT temp-table or ProDataSet parameter that is passed for the Data Object Create, Update, Delete, and Submit operations, and a JSON object with properties for passing the values of any INPUT and INPUT-OUTPUT parameters for Data Object Invoke operations.
For the REST client, the input JSON objects specified for relational data must conform to the structure defined by OpenEdge for passing the JSON representations of temp-tables and ProDataSets, as appropriate. For more information, see OpenEdge Development: Working with JSON. Note that this structure is similar to the structure used to return the data for a Data Object Read operation (GET). For an Invoke operation, the property names in the simple JSON object must have the same case-sensitive names as the corresponding parameters defined in the implementing ABL routines.
Note also that for the Data Object Create, Update, and Delete operations, all of which have the same type of input JSON object for relational data, only the HTTP verb specified for the HTTP request distinguishes these Data Object operations from each other.