Atom Counters object
The Atom Counters object represents the counters and their values associated with a particular Runtime.
The owner of an Runtime, Cloud, or Runtime cluster can retrieve a list of all counters for their container. You can also modify counters' values by adding, changing, or removing a container's counters.
Retrieving a list of counters is an asynchronous process:
- The client sends a GET request that specifies a list of all a container's counters to the Boomi Platform.
- The platform returns a counter token for the specified runtime, Runtime cluster, or Runtime cloud.
- The client sends one or more GET requests that include the counter token.
- The platform returns one of the following:
- Status code 202 while the request is in progress.
- Status code 200, with the the list of the Atom Counters, when the request is complete.
- The platform returns one of the following:
Structure
<AsyncOperationResult responseStatusCode="200">
<result type="AtomCounters>
<AtomCounters>
<atomId></atomId>
<Counters>
<counter>
<name>counter1</name>
<value></value>
</counter>
<Counter>
<name></name>
<value></value>
</Counter>
</Counters>
</AtomCounters>
</result>
</AsyncOperationResult>
| Field | Type | Description |
|---|---|---|
| AtomCounters | complex type | The full list of counters within the specified Runtime, Runtime cluster, or Cloud. |
| atomId | string | A unique ID assigned by the system to the Runtime. |
| name | string | The name of the counter. |
| value | string | The assigned value to the counter. |
Supported operations
| GET | QUERY | CREATE | UPDATE | EXECUTE | DELETE |
|---|---|---|---|---|---|
| Supported | Not supported | Not supported | Supported | Not Supported | Not Supported |
-
The UPDATE operation updates Atom Counters values for a specific Runtime. Using the UPDATE operation overrides all settings set on the current counter. Therefore, Boomi recommends that you include a full list of all counters you want to keep or update. If a current counter does not appear in the Atom Counter object, it deletes the counters upon calling the UPDATE operation.
-
The GET operation returns the current state of the counter names and values for the specified Runtime. The initial GET operation returns a token for the specified Runtime.
SOAP implementation
-
GET operation
Request to get token:
<soapenv:Body>
<api:asyncGet>
<api:objectType>AtomCounters</api:objectType>
<api:objectId>AtomID</api:objectId>
</api:asyncGet>
</soapenv:Body>Request to get results:
<soapenv:Body>
<api:asyncResult>
<api:token>tokenID</api:token>
</api:asyncResult>
</soapenv:Body>Response:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns4:asyncResultResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bns="http://api.platform.boomi.com/" xmlns:ns4="http://partner.api.platform.boomi.com/">
<ns4:results responseStatusCode="200">
<bns:result xsi:type="bns:AtomCounters" atomId="3456789a-bcde-f012-3456-789abcdef012">
<bns:counter name="RUN135counter" value="2"/>
</bns:result>
</ns4:results>
</ns4:asyncResultResponse>
</S:Body>
</S:Envelope> -
UPDATE operation
The following example updates the counter values for counters referenced, counter1 and counter2, for the Atom whose ID is f4b1776a-fcb2-46d6-905d-0b5858217005.
Request:
<api:update>
<object xsi:type="api:AtomCounters" atomId="f4b1776a-fcb2-46d6-905d-0b5858217005" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<api:counter name="counter1" value="4"/>
<api:counter name="counter2" value="5"/>
</object>
</api:update>Response:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<bns:updateResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bns="http://api.platform.boomi.com/">
<result xsi:type="bns:AtomCounters" atomId="f4b1776a-fcb2-46d6-905d-0b5858217005">
<bns:counter name="counter1" value="4"/>
<bns:counter name="counter2" value="5"/>
</result>
</bns:updateResponse>
</S:Body>
</S:Envelope>