AddRange
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.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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":1,"minpoolsize":0,"maxpoolsize":100,"connectiontimeout":30,"commandtimeout":60,"DynamicConnection":0,"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":1,"minpoolsize":0,"maxpoolsize":100,"connectiontimeout":30,"commandtimeout":60,"DynamicConnection":0,"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).
|
1 2 3 4 |
{ "isSucceeded": true, "errorMessage": "string" } |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest