Services
This section handle the services management.
POST /console/ServiceHandler
This method is used to create, start, stop and delete any of the edinn services.
Request parameters:
- action [mandatory]: which action you want to do: 0-create, 1-start, 2-stop, 3-delete.
- serviceName [mandatory]: the Id of the service.
- serviceDisplayName: the name of the service.
- company [mandatory]: the company Id.
- host [mandatory]: the IP or name of the host.
- account [mandatory]: the user name of the windows system.
- password [mandatory]: the windows system user password.
- directory [mandatory if action is 0]: the directory of the service executable.
- startType [mandatory if action is 0]: determines if the start method is manual or atomatic.
- session [mandatory]: the Id of the active session.
Response:
- status: returns "0" on success, and an error code in any other case.
- data: returns "0" on succes, and an error description in any other case.
- message: "success" or a descriptive information of the error in any other case.
Example:
Content-Type: application/json Request: /console/ServiceHandler?action=1&company=0000000001&serviceName=edinnM2_Central_0000000001&session=TIlB31jdRNBSEp4IwQT9QiwzX54q6LUsEztbwYiJXGsOoE0YGCUbAB4urUI8&host=192.168.1.100&account=admin=1234 Reponse (success): { "status": "0", "data": "0", "message": "Success" } |
GET /console/ServiceHandler
This method is used to get the status or the configuration of the service.
Request parameters:
- action [mandatory]: which action you want to do: 0-status, 1-consfiguration.
- serviceName [mandatory]: the Id of the service.
- company [mandatory]: the company Id.
- host [mandatory]: the IP or name of the host.
- account [mandatory]: the user name of the windows system.
- password [mandatory]: the windows system user password.
- session [mandatory]: the Id of the active session.
Response:
- status: returns "0" on success, and an error code in any other case.
- data: return the code of the status on succes, and an error description in any other case.
- message: "success" or a descriptive information of the error in any other case.
Example:
Content-Type: application/json Request: /console/ServiceHandler?user=LocalSystem&password=&host=&company=0000000001&session=O1ggOxp8AbNdS3gOdNUxri7XjzXIuSIIO5LIEpBZDddsE9BR1EFjUpg57qwB&serviceName=edinnM2_Central_0000000001&action=0 Reponse (success): { "status": "0", "data": "0", "message": "Success" } |