Edits a cache.
Syntax: POST /api/Connection/Edit/{cacheGroup}
{cacheGroup} indicates the cache group where the cache will be modified, for example, Default.
PowerScript code example:
For details about the parameters in the JSON string, view here.
Integer li_rc String ls_body , ls_json httpclient lhc_client lhc_client = create httpclient lhc_client.setrequestheader("Content-Type", "application/json;charset=UTF-8",true) ls_json='{"cachename":"C2","configuration":{"connectiontype":0,"host":"172.168.13.100","port":1433,"userid":"sa1","password":"sqltest","database":"appeonunittest","enablepooling":true,"minpoolsize":10,"maxpoolsize":50,"connectiontimeout":30,"commandtimeout":60,"dynamicconnection":false,"otheroptions":"","connectionlifetime":30,"securityoptions":"encrypt=false"}}' li_rc = lhc_client.sendrequest( "Post", "http://172.25.100.32:5000/api/Connection/Edit/Default", ls_json) if li_rc = 1 and lhc_client.getresponsestatuscode( ) = 200 then lhc_client.getresponsebody(ls_body) end if
When successful, it returns the response status code 200 and the following response body:
When failed, it returns 400 (bad request), 401 (unauthorized), or 500 (server error).
{ "isSucceeded": true, "errorMessage": "string" }