Service controller function
This API function is designed to control Syncplify.me Server!'s system services.
Possible commands: start, stop, restart, status.
Request
Method |
URL |
POST |
/smserver/smsadm.serviceCtrl |
RAW |
POST /smserver/smsadm.login HTTP/1.1 Cache-Control: no-cache Connection: Keep-Alive Pragma: no-cache Content-Type: application/json; charset=UTF-8 Accept: */* Authorization: Bearer XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
[ { "command" : "start", "vserver" : "default", "machineid" : "Z5ENP7AZMPRERDQHUEWBSICAKI" } ] |
Explained |
command: start vserver: virtual server that you wish to start machineid: machine onto which the command shall be executed (same as NodeID of the virtual server) |
Response
Method |
URL |
RAW |
Accept-Encoding: synlz,gzip Content-Length: 41 Content-Type: application/json; charset=UTF-8 Date: Thu, 28 Jan 2016 22:57:55 GMT Server: Microsoft-HTTPAPI/2.0 Server-InternalState: 15
{"result":[ { "Result" : 1, "sstart" : true } ],"id":772674711} |
Explained |
Result: 1 = success any other value different from 1 = error
sstart: true or false, whether the service was started successfully or not ResultMsg: a friendly message (success or error message) explaining what happened |
Request
Method |
URL |
POST |
/smserver/smsadm.serviceCtrl |
RAW |
POST /smserver/smsadm.login HTTP/1.1 Cache-Control: no-cache Connection: Keep-Alive Pragma: no-cache Content-Type: application/json; charset=UTF-8 Accept: */* Authorization: Bearer XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
[ { "command" : "stop", "vserver" : "default", "machineid" : "Z5ENP7AZMPRERDQHUEWBSICAKI" } ] |
Explained |
command: stop vserver: virtual server that you wish to stop machineid: machine onto which the command shall be executed (same as NodeID of the virtual server) |
Response
Method |
URL |
RAW |
Accept-Encoding: synlz,gzip Content-Length: 41 Content-Type: application/json; charset=UTF-8 Date: Thu, 28 Jan 2016 22:57:55 GMT Server: Microsoft-HTTPAPI/2.0 Server-InternalState: 15
{"result":[ { "Result" : 1, "sstop" : true } ],"id":772674711} |
Explained |
Result: 1 = success any other value different from 1 = error
sstop: true or false, whether the service was stopped successfully or not ResultMsg: a friendly message (success or error message) explaining what happened |
Request
Method |
URL |
POST |
/smserver/smsadm.serviceCtrl |
RAW |
POST /smserver/smsadm.login HTTP/1.1 Cache-Control: no-cache Connection: Keep-Alive Pragma: no-cache Content-Type: application/json; charset=UTF-8 Accept: */* Authorization: Bearer XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
[ { "command" : "restart", "vserver" : "default", "machineid" : "Z5ENP7AZMPRERDQHUEWBSICAKI" } ] |
Explained |
command: restart vserver: virtual server that you wish to restart machineid: machine onto which the command shall be executed (same as NodeID of the virtual server) |
Response
Method |
URL |
RAW |
Accept-Encoding: synlz,gzip Content-Length: 41 Content-Type: application/json; charset=UTF-8 Date: Thu, 28 Jan 2016 22:57:55 GMT Server: Microsoft-HTTPAPI/2.0 Server-InternalState: 15
{"result":[ { "Result" : 1, "sstart" : true "sstop" : true } ],"id":772674711} |
Explained |
Result: 1 = success any other value different from 1 = error
sstop: true or false, whether the service was stopped successfully or not sstart: true or false, whether the service was started successfully or not ResultMsg: a friendly message (success or error message) explaining what happened |
Request
Method |
URL |
POST |
/smserver/smsadm.serviceCtrl |
RAW |
POST /smserver/smsadm.login HTTP/1.1 Cache-Control: no-cache Connection: Keep-Alive Pragma: no-cache Content-Type: application/json; charset=UTF-8 Accept: */* Authorization: Bearer XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
[ { "command" : "status", "vserver" : "default", "machineid" : "Z5ENP7AZMPRERDQHUEWBSICAKI" } ] |
Explained |
command: status vserver: virtual server that you wish to read the status of machineid: machine onto which the command shall be executed (same as NodeID of the virtual server) |
Response
Method |
URL |
RAW |
Accept-Encoding: synlz,gzip Content-Length: 41 Content-Type: application/json; charset=UTF-8 Date: Thu, 28 Jan 2016 22:57:55 GMT Server: Microsoft-HTTPAPI/2.0 Server-InternalState: 15
{"result":[ { "Result" : 1, "status" : 1 } ],"id":772674711} |
Explained |
Result: 1 = success any other value different from 1 = error
status: integer, can have the following values: {*** 0 = Error opening service ***} {*** 1 = SERVICE_STOPPED ***} {*** 2 = SERVICE_START_PENDING ***} {*** 3 = SERVICE_STOP_PENDING ***} {*** 4 = SERVICE_RUNNING ***} {*** 5 = SERVICE_CONTINUE_PENDING ***} {*** 6 = SERVICE_PAUSE_PENDING ***} {*** 7 = SERVICE_PAUSED ***}
ResultMsg: a friendly message (success or error message) explaining what happened |