Worker object
You can use the Worker object to get information about and stop a specific Execution worker attached to a Runtime cloud.
Structure
<Worker
atomId=""
atomtName=""
workerId=""
status=""
stopReason=""
startTime=""
shutdownTime=""
endOfLifeTime=""
nodeId=""
state=""
/>
| Field | Type | Description |
|---|---|---|
atomId | string | The ID of the Runtime cloud. |
atomName | string | The name of the Runtime cloud. |
workerId | string | The ID of the Execution worker. |
status | string | The status of the Execution worker. Possible values are COMPLETE, COMPLETE_WARN, ABORTED, or STARTED. |
stopReason | string | The reason that the Execution worker stopped. |
startTime | dateTime yyyy-MM-dd'T'HH:mm:ss'Z' | The date and time that the Execution worker was started. |
shutdownTime | dateTime yyyy-MM-dd'T'HH:mm:ss'Z' | The date and time that the Execution worker was shut down. |
endOfLifeTime | dateTime yyyy-MM-dd'T'HH:mm:ss'Z' | The Time To Live set for the Execution worker. |
nodeId | string | The ID of the Runtime cloud node. |
state | string | The state of the Execution worker. Possible values are ACTIVE or INACTIVE. |
Supported operations
| GET | QUERY | CREATE | UPDATE | EXECUTE | DELETE |
|---|---|---|---|---|---|
| |
Using the GET operation
The ordinary GET operation returns a single Worker object based on the supplied workerId.
Using the QUERY operation
You can use the following fields as QUERY filters for the Worker object:
| Field | Allowed Values |
|---|---|
| atomId | Required (must be valid, non-deleted) |
| workerId | Optional |
| state | Optional (if present, allowed values should be ACTIVE, INACTIVE) |
If specified atomId does not have the Workers feature enabled (such as a Runtime or Runtime cluster, or a private Cloud with workers disabled), the query will return 0 results.
The operator allowed for the Worker object filter is:
- EQUALS
The maximum number of results returned per QUERY response is 100. Response includes a queryToken element, which means there are more than 100 results to retrieve. The Query paging topic describes how to use a queryMore call to retrieve more results.
Using the UPDATE operation
The UPDATE operation is used to stop any of the ACTIVE execution workers running on the authenticated account. You can stop only one worker at a time by passing the workerID in the request. You also need to pass the state of the worker in the request. Currently only state supported in INACTIVE.
RESTish implementation
-
GET operation Send an HTTP GET to
https://api.boomi.com/api/rest/v1/{accountId}/Worker/{workerId}where
{accountId}is the ID of the authenticating account for the request and{workerId}is the ID of the Execution worker you are attempting to GET.XML response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bns:Worker xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bns="http://api.platform.boomi.com/"
atomId="f9ded3fb-fd7e-4b60-93a6-411994723590"
workerId="worker-334a26c4-d6e2-42d8-918c-5caee9bcbd57-2023.11.09"
status="COMPLETE_WARN"
stopReason="Manually stopped"
startTime="2023-11-09 09:14:58 EST"
shutdownTime="2023-11-09 09:27:36 EST"
endOfLifeTime="2023-11-10 09:14:58 EST"
nodeId="atom02[worker-334a26c4-d6e2-42d8-918c-5caee9bcbd57-2023.11.09]"
state="INACTIVE"
atomName="TestCloud1"
/>For a JSON response, send the request with the Accept: application/json HTTP header:
JSON response:
{
"@type": "Worker",
"atomId": "f9ded3fb-fd7e-4b60-93a6-411994723590",
"atomtName": "TestCloud1",
"workerId": "worker-334a26c4-d6e2-42d8-918c-5caee9bcbd57-2023.11.09",
"status": "COMPLETE_WARN",
"stopReason": "Manually stopped",
"startTime": "2023-11-09 09:14:58 EST",
"shutdownTime": "2023-11-09 09:27:36 EST",
"endOfLifeTime": "2023-11-10 09:14:58 EST",
"nodeId": "atom02[worker-334a26c4-d6e2-42d8-918c-5caee9bcbd57-2023.11.09]",
"state": "INACTIVE",
} -
QUERY operation
Send an HTTP POST to
https://api.boomi.com/api/rest/v1/{ACCOUNT_ID}/Worker/querywhere
{accountId}is the ID of the authenticating account for the request.XML request:
<QueryConfig xmlns="http://api.platform.boomi.com/">
<QueryFilter>
<expression operator="and" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="GroupingExpression">
<nestedExpression operator="EQUALS" property="atomId" xsi:type="SimpleExpression">
<argument>8477dd27-894c-4752-a3ca-3d7dd5f0cba3</argument>
</nestedExpression>
<nestedExpression operator="EQUALS" property="workerId" xsi:type="SimpleExpression">
<argument>worker-2b101433-4556-4566-b8cf-24491a6e7c66-2024.01.11</argument>
</nestedExpression>
</expression>
</QueryFilter>
</QueryConfig>XML response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bns:QueryResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bns="http://api.platform.boomi.com/" numberOfResults="1">
<bns:result xsi:type="bns:Worker" atomId="8477dd27-894c-4752-a3ca-3d7dd5f0cba3" workerId="worker-2b101433-4556-4566-b8cf-24491a6e7c66-2024.01.11" status="COMPLETE" stopReason="Normal Shutdown" startTime="2024-01-11 18:24:00 GMT" shutdownTime="2024-01-11 18:26:02 GMT" endOfLifeTime="2024-01-12 18:24:00 GMT" nodeId="TestJMXLocalNode0[worker-2b101433-4556-4566-b8cf-24491a6e7c66-2024.01.11]" state="INACTIVE" atomName="TestJMXLocal"/>
</bns:QueryResult>
For a JSON response, send the request with the Accept: application/json HTTP header:
JSON request:
{
"QueryFilter": {
"expression": {
"operator": "and",
"nestedExpression": [
{
"argument": [
"8477dd27-894c-4752-a3ca-3d7dd5f0cba3"
],
"operator": "EQUALS",
"property": "atomId"
},
{
"argument": [
"INACTIVE"
],
"operator": "EQUALS",
"property": "workerState"
}
]
}
}
}
JSON response:
{
"@type": "QueryResult",
"result": [
{
"@type": "Worker",
"atomId": "8477dd27-894c-4752-a3ca-3d7dd5f0cba3",
"workerId": "worker-2b101433-4556-4566-b8cf-24491a6e7c66-2024.01.11",
"status": "COMPLETE",
"stopReason": "Normal Shutdown",
"startTime": "2024-01-11 18:24:00 GMT",
"shutdownTime": "2024-01-11 18:26:02 GMT",
"endOfLifeTime": "2024-01-12 18:24:00 GMT",
"nodeId": "TestJMXLocalNode0[worker-2b101433-4556-4566-b8cf-24491a6e7c66-2024.01.11]",
"state": "INACTIVE",
"atomName": "TestJMXLocal"
},
{
"@type": "Worker",
"atomId": "8477dd27-894c-4752-a3ca-3d7dd5f0cba3",
"workerId": "worker-aabd17ab-f839-486d-9b0a-cc863474db13-2024.01.11",
"status": "COMPLETE",
"stopReason": "Normal Shutdown",
"startTime": "2024-01-11 18:24:00 GMT",
"shutdownTime": "2024-01-11 18:26:02 GMT",
"endOfLifeTime": "2024-01-12 18:24:00 GMT",
"nodeId": "TestJMXLocalNode0[worker-aabd17ab-f839-486d-9b0a-cc863474db13-2024.01.11]",
"state": "INACTIVE",
"atomName": "TestJMXLocal"
}
],
"numberOfResults": 2
}
-
UPDATE operation
Send an HTTP POST to:
https://api.boomi.com/api/rest/v1/{accountId}/Worker/{workerId}where
{accountId}is the ID of the authenticating account for the request and{workerId}is the ID of the Execution worker you want to update.The only accepted value for
stateisINACTIVE. The following example stops a specified Execution worker.XML request:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bns:Worker xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bns="http://api.platform.boomi.com/" workerId="worker-b31b7c5b-af72-4191-90ac-848abb4fa175-2024.01.18" state="INACTIVE"/>XML response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bns:Worker xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bns="http://api.platform.boomi.com/" workerId="worker-b31b7c5b-af72-4191-90ac-848abb4fa175-2024.01.18" state="INACTIVE"/>For a JSON request, send the request with the
Content-Type: application/jsonHTTP header:JSON request:
{
"@type": "Worker",
"workerId": "worker-173f65e7-aa53-4877-8574-d2db4fec1fce-2024.01.18",
"state": "INACTIVE"
}For a JSON response, send the request with the
Accept: application/jsonHTTP header:JSON response:
{
"@type": "Worker",
"workerId": "worker-173f65e7-aa53-4877-8574-d2db4fec1fce-2024.01.18",
"state": "INACTIVE"
}