Description

Enable or disable the REST or SOAP transport of a web application belonging to an ABL application.

HTTP Operation

PUT

URI

host_name:port/oemanager/applications/ABL_app_name/webapps/Web_app_name/transports/{soap|rest}/state

Content-Type

application/vnd.progress+json

Request body

{
  "STATE" : "{ENABLED | DISABLED}"
}

Response codes

200 Success
500 Unexpected Server Error

Command-line example (SOAP)

curl -X PUT -u username:password -v 
http://localhost:16680/oemanager/applications/oepas1/webapps/ROOT/transports/soap/state 
-d {"state":"ENABLED"}  -H "Content-Type: application/vnd.progress+json"

Response body example (SOAP)

{
   "operation":"SET SOAP TRANSPORT PROPERTIES",
   "outcome":"SUCCESS",
   "result":"",
   "errmsg":"",
   "versionStr":"v12.1.0 ( 2019-08-07 )",
   "versionNo":1
}

Command-line example (REST)

curl -X PUT -u username:password -v 
http://localhost:16680/oemanager/applications/oepas1/webapps/ROOT/transports/rest/state 
-d {"state":"DISABLED"} -H "Content-Type: application/vnd.progress+json"

Response body example (REST)

Check oemanager/applications/oepas1/webapps/ROOT/transports/rest/properties to ensure adapterEnabled is set to 0 or 1, depending on whether the state was disabled or enabled.

ABL HTTP client example (SOAP or REST)

Note: Substitute rest for soap in the URI below if you want to update state for the rest transport.
using Progress.Json.ObjectModel.*.
define variable resp as OpenEdge.Net.HTTP.IHttpResponse.
define variable jsonData as JsonObject.

jsonData = new Progress.Json.ObjectModel.JsonObject().
jsonData:Add('state', 'ENABLED').

resp = OpenEdge.Net.HTTP.ClientBuilder:Build():Client
   :Execute(OpenEdge.Net.HTTP.RequestBuilder
      :Put('http://localhost:16680/oemanager/applications/oepas1/webapps/ROOT/transports/soap/state', jsonData)
      :ContentType('application/vnd.progress+json') 
      :UsingBasicAuthentication(new OpenEdge.Net.HTTP.Credentials('PASOE Manager Application', 'username', 'password'))
      :Request
   ).