Adds more than one cache at a time.
Syntax: POST /api/Connection/AddRange/{cacheGroup}
{cacheGroup} indicates the cache group where the cache will be added, 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":"C11","configuration":{"connectiontype":0,"host":"172.168.13.1","port":1433,"userid":"sa","password":"sqltest","database":"appeonunittest","enablepooling":true,"minpoolsize":0,"maxpoolsize":100,"connectiontimeout":30,"commandtimeout":60,"dynamicconnection":false,"otheroptions":"","connectionlifetime":30,"securityoptions":"encrypt=false"}},{"cachename":"C12","configuration":{"connectiontype":0,"host":"172.168.13.1","port":1433,"userid":"sa","password":"sqltest","database":"appeonunittest","enablepooling":true,"minpoolsize":0,"maxpoolsize":100,"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/AddRange/NewCacheGroup", 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" }