Retrieve API Management logs
POST https://{controlplane_path}/api/1/rest/public/apim/get_api_log/{env_org}
Retrieve API Management log information.
Ultra Task logs include additional time information, such as:
recv_timestart_timereply_time
Important: This page describes a Classic APIM API.
Prerequisites
- Environment (Org) admin permissions
Example
This example uses Basic authentication. For a JWT example, refer to Authentication.
curl -X 'POST' \
'https://elastic.snaplogic.com/api/1/rest/public/apim/get_api_log/acme' \
-H 'Authorization: Basic {base64_encoded email:password}' \
-H 'Content-Type: application/json' \
-d '{
"start_ts": 1700000000,
"end_ts": 1700003600
}'
Path parameters
| Key | Description |
|---|---|
controlplane_path |
Required. The path to the SnapLogic control plane:
elastic.snaplogic.com
For the UAT or EMEA control plane, substitute the name for elastic. For
example:
|
env_org |
Required. The name of the SnapLogic environment/Org. For example,
My-Dev-Env |
Query parameters
None.
Request header
Use the application/json content type with basic authentication (email
and password) or a JWT. For examples, refer to Authentication.
Request body
{
"start_ts" : ...
"end_ts" : ...
}
| Key | Type | Description |
|---|---|---|
start_ts |
integer | Returns log entries since the specified time. Provide time as Unix time in seconds. |
end_ts |
integer | Returns log entries before the specified time. Provide time as Unix time in seconds. |
Important: The difference between
start_ts and end_ts must be no more than one hour. Otherwise, an exception is thrown.Response
The following diagram shows when time stamps are logged during the processing of a task request.
Preprocessing includes execution of pre-flight rules.

{
"response_map": {
"log": [
{
"time": "...",
"service": "REQUEST_LOG",
"criterion1": "...",
"criterion2": "...",
"criterion3": "...",
"log": {
"remote_addr": "...",
"request_method": "...",
"request_url": "...",
"path_info": "",
"request_status_code": ...,
"target_status_code": ...,
"auth_type": "...",
"client": "...",
"roles": [ ... ],
"bytes_sent": ...,
"invoker_snode": "...",
"error": false,
"processing_time": ...,
"request_time": ...,
"request_processing_end_time": ...,
"recv_time": ...,
"start_time": ...,
"reply_time": ...,
"response_time": ...
},
"type": "JSON"
},
...
]
},
"http_status_code": 200
}
| Key | Type | Description |
|---|---|---|
time |
string | The earliest time when the task request was received by the FeedMaster (if it exists) or the JCC node, in UTC format.
Always the same as request_time.
|
service |
string | The SnapLogic service that processed the API call. Always REQUEST_LOG. |
criterion... |
string | The criteria used to categorize or group the results.
|
remote_addr |
string | The IP address of the API consumer. |
request_method |
string | The REST API method used in the request. |
request_url |
string | The path to the called API, without the host name. |
path_info |
string | Additional path information at the end of the API request URL. |
request_status_code |
integer | The HTTP response code from the authentication and validation step of the API request. |
target_status_code |
integer | The HTTP response code from the Pipeline execution. |
auth_type |
string | The authentication type of the API call. |
client |
string |
|
roles |
array | The roles of the API consumer that sent the API request. |
bytes_sent |
integer | The length of the response sent to the client, in bytes. |
invoker_snode |
string | The snode ID of the Triggered Task or Ultra Task that generated the log entry. |
error |
Boolean | If true, an error occurred during the task processing. Otherwise, the processing succeeded. |
processing_time |
integer | The length of time spent to process the API request, in milliseconds. |
request_time |
integer | The earliest time when the task request was received by the FeedMaster (if it exists) or the JCC node, as Unix time in milliseconds.
Always the same as time.
|
request_processing_end_time |
integer | The time when the preprocessing of the task request is completed, as Unix time in milliseconds. |
recv_time |
integer | Only for Ultra Tasks. The time when the FeedMaster adds a message to the queue to signal that the task is ready to be processed, as Unix time in milliseconds. |
start_time |
integer | Only for Ultra Tasks. The time when the JCC node picks up the message from the queue and starts processing the task, as Unix time in milliseconds. |
reply_time |
integer | Only for Ultra Tasks. The time when the processing of the task is completed and the JCC node notifies the FeedMaster, as Unix time in milliseconds. |
response_time |
integer | The time when the API response is sent to the client, as Unix time in milliseconds. |
type |
string | The format of the log information. Always JSON. |
Error handling
| HTTP status codes | Message | Resolution |
|---|---|---|
| 401 | Unauthorized | Verify your credentials and that you have Org admin permissions. |
| 404 | Not Found | Verify the Org name is correct and exists. |