Try OpenEdge Now
skip to main content
Administration
REST Administration : REST Web Application Administration : Managing REST Web applications : Constructing and debugging REST requests to access a REST Web service : Interpreting the RESTServices section
 
Interpreting the RESTServices section
The RESTServices section lists the JSON output for each REST service deployed in your REST Web application.
The following is a sample JSON output of two deployed REST services, pingService and BenefitService. It contains information that you require to invoke the BenefitService internal procedures, DeleteBenefits, UpdateBenefits, ReadBenefits, and CreateBenefits.
Note: This sample describes ONLY the UpdateBenefits procedure.
{
"AppServerStatus":{...},
"RESTServices":[
{
"http://localhost:8980/ping/rest/pingService":{...},
"http://localhost:8980/ping/rest/BenefitService":{
"Benefits":{
"Benefits..DeleteBenefits":{},
"Benefits..UpdateBenefits":{
"Method":" PUT",
"Resource-Path":"/Benefits",
"Http-Request-Type":"application/json",
"Http-Response-Type":"application/json",
"ABL-Resource-Name":"Benefits.cls",
"ABL-Resource-path":"WRKDIR\",
"Procedure-Type":"Internal Procedure",
"Input":[
{
"HTTP-Source":"http.body",
"ABL-Target":"dsBenefits",
"ABL-Type":"DATASET"
}
],
"Output":[
{
"HTTP-Target":"http.body",
"ABL-Source":"dsBenefits",
"ABL-Type":"DATASET"
}
]
},
"Benefits..ReadBenefits":{...},
"Benefits..CreateBenefits":{...}
}
}
}
]
}
Based on the sample JSON output discussed, the following describes the frequently used operations using examples:
*Constructing the URL to invoke an internal procedure
Review the JSON output for the Resource-Path and Method properties. Construct the URL as an HTTP PUT method by appending the value of the Resource-Path property to the base URL. The complete URL for accessing the UpdateBenefits procedure is http://localhost:8980/ping/rest/BenefitService/Benefits.
*Setting media types for your REST request
Review the Http-Request-Type and Http-Response-Type properties. Set your media type to the application/json format for your REST request.
*Sending a value to the ABL input parameter
Review the input section of the JSON output to understand how to send the input parameter values in your REST request to the ABL procedure.
To send values to the dsBenefits input parameter of the DATASET ABL type, send the JSON representation of the DATASET record in your HTTP request body.
*Receiving a value from the ABL output parameter
Review the output section of the JSON to understand how to receive the output parameter values in your REST response from the ABL procedure.
In the example given above, you receive the JSON representation of the dsBenefits output parameter in your HTTP response body.
You can also debug the REST Web application’s URL mappings and other definitions during REST Web application development in Progress Developer Studio for OpenEdge. For more information about defining mappings in a REST Web application, see the Progress Developer Studio for OpenEdge online help.