Retrieve API Management logs
POST /apim/get_api_log/{env_org}
Overview
This API retrieves API Management log information.
recv_timestart_timereply_time
Prerequisites
- Environment (Org) admin permissions
Request
POST https://{controlplane_path}/api/1/rest/public/apim/get_api_log/{env_org}
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
Basic authentication
In the request header, specify Basic for authorization, add your credentials (Login and password of your SnapLogic user or service account), and specify application/json for content type.
For more details on accounts refer to Manage accounts.
Authorization: Basic {base64_encoded <email>:<password>}
Content-Type: application/json
Example of Basic authenthication using Postman
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. |
start_ts and end_ts must be no more than one hour. Otherwise, an exception is thrown.Response
Response body
{
"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 |
If Basic Authentication is used with the username and password, this field contains the username. If the API is accessed using a token value in the Task setting, this field is empty. Otherwise, this field contains the IP address of the application that consumes the API. |
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. |