Retrieve API Management Logs

This page is no longer maintained (Mar 29, 2023). For the most current information, go to https://docs.snaplogic.com/public-apis/post-apim-get-api-log-org.html.

 

POST /apim/get_api_log/{org}

 

Overview

This API retrieves the API Management log information.

Prerequisites

  • Org Admin permissions

 

Request

Path Parameters

Key

Description

Key

Description

pod_path

Required. The path to your SnapLogic pod.

Example: elastic.snaplogic.com

org

Required. The name of the SnapLogic Org.

Query Parameters

None.

Request Header

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

Request Body

Key

Type

Description

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.

Default: The current time.

The difference between start_ts and end_ts must be no more than one hour. Otherwise, an exception is thrown.

Response

Response Body

{ "response_map": { "log": [ { "log": { "auth_type": "...", "invoker_snode": "...", "request_time": ..., "roles": [], "remote_addr": "127.0.0.1", "processing_time": ..., "request_status_code": ..., "bytes_sent": null, "client": "127.0.0.1", "target_status_code": ..., "request_method": "...", "path_info": "...", "error": ..., "request_url": "..." }, "time": "..." }, ... ] }, "http_status_code": 200 }

 

Key

Type

Description

Key

Type

Description

log.auth_type

string

The authentication type of the request.

log.invoker_snode

string

The ID of the Triggered Task or Ultra Task that generated the log entry.

log.request_time

integer

The time when the request was received, as Unix time in milliseconds.

log.roles

array

The roles of the API consumer that sent the request.

log.remote_addr

string

The IP address of the API consumer.

log.processing_time

integer

The length of time to process the request, in milliseconds.

log.request_status_code

integer

The HTTP response code from the authentication and validation step of the request.

log.bytes_sent

integer

The length of the response sent to the client, in bytes.

log.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.

log.target_status_code

integer

The HTTP response code from the Pipeline execution.

log.request_method

string

The REST API method used in the request.

log.path_info

string

Additional path information at the end of the request URL.

log.error

Boolean

If true, an error occurred during the processing. Otherwise, the processing succeeded.

log.request_url

string

The URL used in the request.

time

string

The timestamp when the request was received, in UTC format.