Retrieve API Management logs

POST /apim/get_api_log/{env_org}

Overview

This API retrieves the API Management log information.

Ultra Task logs include additional time information, such as:
  • recv_time
  • start_time
  • reply_time

Prerequisites

  • Org admin (Environment 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.

Example: control-plane-name.snaplogic.com

Where control-plane-name is the control plane you are using. For example,
  • elastic
  • uat
  • emea
org Required. The name of the SnapLogic Environment/Org.

Query Parameters

None.

Request Header

Specify Basic for authorization and application/json for content type.

 Authorization: Basic {your_encoded_security_credentials}
Content-Type: application/json

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

Response Body

The following diagram illustrates when the time stamps are logged during the processing of a task request.
Diagram showing when the time stamps are logged

 {
  "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.
  • criterion1. Always the same value as invoker_snode.
  • criterion2. Always the same value as request_url.
  • criterion3. Always null.
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.