How to control the batch server
The batch server is now managed by the Syracuse platform. This means that you can access services in http or https mode, with a set of URLs that
controls it.
Any tool can be used with different syntaxes.
There are several ways of doing this, you can:
1. List the batch servers and then call an API to access them
2. Use a direct access to the batch server via its code name
Get the list of batch servers, if they are several.
With syrsrv[:port] being the server host name or address and the TCP port used for the Syracuse web server, the URL will be:
http[s]://syrsrv[:port]/api1/syracuse/collaboration/syracuse/batchServers?representation=batchServer.$query
Notes:
$resource
array contains the list of batch servers identified by the $key
value. The status
is also indicated in the feed.{"$url": "http:…","$descriptor": "batchServers","$startIndex": 1,"$itemsPerPage": 20,"$totalResults": 1,"$ui": "…","$resources": [{"$uuid": "d11235c9-90db-4951-b2bc-7fbf198e9650","$key": "d11235c9-90db-4951-b2bc-7fbf198e9650","$etag": 1,"$creUser": "admin","$creDate": "2016-11-08T16:44:42.852Z","$updUser": "admin","$updDate": "2018-02-21T07:29:15.185Z","$properties": {"maxDelay": {"$isDisabled": true},"killOverTime": {"$isDisabled": true},"execInterval": {"$isDisabled": true}},"$url": "…","$shortUrl": "…","status": "running","maxDelay": 0,"killOverTime": 30,"execInterval": 30,"auto": true,"code": "X3ERPV11","runtimes": [ …],…}
The $key
associated to a batch server identifies the instance. It replaces the word KEY in the following URLs.
This method is more direct. It has been developed for the Cloud and will work only in the latest version 11 and in version 12, because the resource status is only available in Cloud and V12.
It uses POST on the following APIs, with myserv:port being the server and service, and bcode being the code associated to the batch server, which is the Sage X3 solution name.
Note: For a Syracuse cluster, you can use any Syracuse server. This method also works if a load balancer is in front of multiple Syracuse servers.
Use one of the following requests:
The system will not launch more requests, but the ones in progress will continue running until completion.
Use one of the following requests:
Use one of the following requests:
Use one of the following requests:
The returned payload looks like this:
{"$uuid": "26739880-48a9-4e86-a8af-3aa1fa350c98",… additional global properties, followed by an array including all theerror/warning/info messages that have been sent since the batch serverstarted, from most recent to the last one, such as:"$diagnoses": [{"$severity": "error""$message": "2018-3-26 17:42:13: Cannot start the batch server"},{"$severity": "info","$message": "The batch controller X3ORAV1101 is running on host PO400126 (pid:15436) and can handle 7 queries."},{"$severity": "info","$message": "The server batch is running"}],…additional information about the batch server…}