Download shared web server log operation
You can use the Download shared web server log operation to programmatically retrieve the web server logs from your runtime or Runtime cloud attachment.
Because large shared web server logs can take time to download, the Boomi Enterprise Platform API provides an asynchronous technique for downloading them:
- The client sends a shared web server 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 shared web server log ID.
- The client opens the URL to download the log.
- The response returns the log file as compressed (zip) data.
The shared web server logs are available for 30 days by default unless the runtime is configured with a shorter purge history.
You must have the Runtime Management or Runtime Management Read Access privilege to download the shared web server logs.
Shared Web Server Log object
The CREATE operation specifies the Atom shared web server object in a request to download the shared web server log.
| Name | Type | Description |
|---|---|---|
| atomId | string | The ID of the Runtime. |
| logDate | date | The date of the logged events |
| GET | QUERY | CREATE | UPDATE | EXECUTE | DELETE |
|---|---|---|---|---|---|
Implementation
- REST
- SOAP
Send an HTTP POST to:
https://api.boomi.com/api/rest/v1/{accountId}/SharedWebServerLog
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 22, 2024, on the Runtime, whose ID is d80bb164-ac04-419d-8d0c-29c2b379394c.
XML request:
<SharedWebServerLog xmlns="http://api.platform.boomi.com/">
<atomId="d80bb164-ac04-419d-8d0c-29c2b379394c"/>
<logDate="2024-02-22"/>
</SharedWebServerLog>
For a JSON request, send the request with the following HTTP header:
Content-Type: application/json
JSON request:
{
"atomId" : "d80bb164-ac04-419d-8d0c-29c2b379394c",
"logDate" : "2024-02-22"
}
The following example requests the download of a log containing events dated February 22, 2024, on the Runtime, whose ID is d80bb164-ac04-419d-8d0c-29c2b379394c.
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:UsernameTokenwsu: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:PasswordType="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>
<objectxsi:type="api:SharedWebServerLog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<atomId="3456789a-bcde-f012-3456-789abcdef012"/>
<logDate="2016-02-05"/>
</object>
</api:create>
</soapenv:Body>
</soapenv:Envelope>
Log Download object
The Log Download object is the response to a shared web server log request.
| Field | 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. |
Implementation
- REST
- SOAP
The following is the RESTish XML response to the example shared web server log request shown previously:
<bns:LogDownload xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bns="http://api.platform.boomi.com/">
<url="https://api.boomi.com/account/boomi-internal/api/download/SharedWebServerLog-afb750f5-3b5e-4373-9415-b1f177f271a6"/>
<message="Beginning download."/>
<statusCode="202"/>
</bns:LogDownload>
Here is the JSON-formatted response to the example shared web server log request shown above:
{
"@type" : "LogDownload",
"url" : "https://api.boomi.com/account/account-123456/api/download/SharedWebServerLog-89abcdef-0123-4567-89ab-cdef01234567",
"message" : "Beginning download.",
"statusCode" : 202
}
The following is the SOAP response to the example shared web server Log request shown previously:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope">
<S:Body>
<bns:createResponse xmlns: xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:bns="http://api.platform.boomi.com/">
<resultxsi:type="bns:LogDownload"url="https://platform.boomi.com/account/boomi-internal/api/download/SharedWebServerLog-9d3276cb-aff5-4b22-bd5f-07ffa05a6968" message="Beginning download."statusCode="202"/>
</bns:createResponse>
</S:Body>
</S:Envelope>
Download request responses
The download URL specified in a Log Download response, such as https://api.boomi.com/account/account-123456/api/download/SharedWebServerLog-89abcdef-0123-4567-89ab-cdef01234567, is valid for a single request. These are the possible responses to an HTTP request to open a download URL:
| Status code | Description |
|---|---|
| 200 (OK) | The download is complete. The log is in the response body. All subsequent requests to open the download URL return 404 (Not Found). |
| 202 (Accepted) | The download is in progress. You might receive multiple 202 responses before you receive a final download response. |
| 204 (No Content) | The log data is not available. All subsequent requests to open the download URL return 404 (Not Found). |
| 404 (Not Found) | You received a 200, 204, or 504 response 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 return 404 (Not Found). |