Download Atom Log operation
You can use the Download Atom Log operation to request and download Atom logs.
Because large Atom logs can take some time to download, the Boomi Enterprise Platform API provides an asynchronous technique for downloading Atom logs:
-
You send a Runtime Log request to the Boomi Enterprise Platform API that specifies the Runtime ID and the date of the logged events.
-
The Enterprise platform returns a Log Download object that contains a URL with a unique Atom log ID.
-
You open the URL to download the log.
Atom logs purge 30 days after creation.
You must have the Runtime Management privilege to download Atom logs. If you have the Runtime Management Read Access privilege, you cannot perform this action.
Atom Log object
The Atom Log object is specified in a CREATE operation to request the download of a Runtime log.
| Name | Type | Description |
|---|---|---|
| atomId | string | The ID of the Runtime. |
| logDate | string | The date of the logged events. |
| includeBin | string | If true, binary files are included in the download. The default is false. |
| GET | QUERY | CREATE | UPDATE | EXECUTE | DELETE |
|---|---|---|---|---|---|
| Not supported | Not supported | Supported | Not supported | Not supported | Not supported |
RESTish implementation
Send an HTTP POST to:
https://api.boomi.com/api/rest/v1/accountId/AtomLog
where accountId is the ID of the authenticating account for the request.
The following example requests the download of a log containing events dated February 5, 2016, on the Atom whose ID is 3456789a-bcde-f0123-4567-89abcdef012.
XML request:
<AtomLog xmlns="http://api.platform.boomi.com/" atomId="3456789a-bcde-f012-3456-789abcdef012"
logDate="2016-02-05" includeBin="true"/>
For a JSON request, send the request with the following HTTP header:
Content-Type: application/json
JSON request:
{
"atomId" : "3456789a-bcde-f012-3456-789abcdef012",
"logDate" : "2016-02-05",
"includeBin" : true
}
SOAP Implementation
The following example requests the download of a log containing events dated February 5, 2016, on the Atom whose ID is 3456789a-bcde-f0123-4567-89abcdef012.
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.platform.boomi.com/">
<soapenv:Header>
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>ATOMSPHERE_USER_NAME</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">
ATOMSPHERE_PASSWORD
</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<api:create>
<object xsi:type="api:AtomLog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
atomId="3456789a-bcde-f012-3456-789abcdef012" logDate="2016-02-05" includeBin="true">
</object>
</api:create>
</soapenv:Body>
</soapenv:Envelope>
Log Download object
The Log Download object is the response to a Runtime Log request.
| Name | Type | Description |
|---|---|---|
| statusCode | string | The status code as one of the following: - 202 — status message: Beginning download. - 504 — status message: Atom is unavailable. |
| message | string | The status message. |
| url | string | (statusCode 202 only) The URL for the download. |
RESTish implementation
The following is the RESTish XML response to the example Atom Log request shown previously:
<bns:LogDownload statusCode="202" message="Beginning download."
url="http://localhost:8081/account/account-123456/api/download/AtomLog-89abcdef-0123-4567-89ab-cdef01234567"
xmlns:bns="http://api.platform.boomi.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
Here is the JSON-formatted response to the example Atom Log request shown above:
{
"@type" : "LogDownload",
"url" : "http://localhost:8081/account/account-123456/api/download/AtomLog-89abcdef-0123-4567-89ab-cdef01234567",
"message" : "Beginning download.",
"statusCode" : 202
}
SOAP implementation
The following is the SOAP response to the example Atom Log request shown previously:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<bns:createResponse xmlns:bns="http://api.platform.boomi.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<bns:result xsi:type="bns:LogDownload" statusCode="202" message="Beginning download."
url="http://localhost:8081/account/account-123456/api/download/AtomLog-89abcdef-0123-4567-89ab-cdef01234567"/>
</bns:createResponse>
</S:Body>
</S:Envelope>
Download request responses
The download URL specified in a Log Download response, such as http://localhost:8081/account/account-123456/api/download/AtomLog-89abcdef-0123-4567-89ab-cdef01234567, is valid for a single request. The following are the possible responses to an HTTP request to open a download URL:
-
200 (OK) - The download is complete and the log is in the response body.
All subsequent requests to open the download URL returns 404 (Not Found).
-
202 (Accepted) - The download is in progress.
You might receive multiple 202 responses before a final download response is returned.
-
204 (No Content) - Log data is not available.
All subsequent requests to open the download URL returns 404 (Not Found).
-
404 (Not Found) - A 200, 204, or 504 response was returned from a previous request to open this URL.
-
504 (Gateway Time-out) - The Runtime is unavailable. It might have timed out.
All subsequent requests to open the download URL returns 404 (Not Found).