Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

POST /apim/get_api_log/{org}

Overview

This API retrieves the API Management log information.

Prerequisites

  • Org Admin permissions

Request

Appsplus panel macro confluence macro
data{"features":["rounded"],"title":"","titleColor":"#FFFFFF","titleColorBG":"#0052CC","titleSize":16,"titleBold":false,"titleItalic":false,"titleUnderline":false,"link":"","linkIcon":false,"linkTab":false,"lozenge":"Hot stuff","lozengeColor":"#172B4D","lozengeColorBG":"#fff0b3","height":200,"panelPadding":12,"panelColor":"#172B4D","panelColorBG":"#dedede","borderColor":"#4C9AFF","borderRadius":3,"borderStyle":"solid","borderWidth":1,"icon":"editor/info","iconPrimary":"#FFFFFF","iconSecondary":"#0052CC","newMacro":false}

POST https://{pod_path}/api/1/rest/public/apim/get_api_log/{org}

Path Parameters

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.

Appsplus panel macro confluence macro
data{"features":["rounded"],"title":"","titleColor":"#FFFFFF","titleColorBG":"#0052CC","titleSize":16,"titleBold":false,"titleItalic":false,"titleUnderline":false,"link":"","linkIcon":false,"linkTab":false,"lozenge":"Hot stuff","lozengeColor":"#172B4D","lozengeColorBG":"#fff0b3","height":200,"panelPadding":12,"panelColor":"#172B4D","panelColorBG":"#dedede","borderColor":"#4C9AFF","borderRadius":3,"borderStyle":"solid","borderWidth":1,"icon":"editor/info","iconPrimary":"#FFFFFF","iconSecondary":"#0052CC","newMacro":false}

Authorization: Basic {your_encoded_security_credentials}

Content-Type: application/json

Request Body

Appsplus panel macro confluence macro
data{"features":["rounded"],"title":"","titleColor":"#FFFFFF","titleColorBG":"#0052CC","titleSize":16,"titleBold":false,"titleItalic":false,"titleUnderline":false,"link":"","linkIcon":false,"linkTab":false,"lozenge":"Hot stuff","lozengeColor":"#172B4D","lozengeColorBG":"#fff0b3","height":200,"panelPadding":12,"panelColor":"#172B4D","panelColorBG":"#dedede","borderColor":"#4C9AFF","borderRadius":3,"borderStyle":"solid","borderWidth":1,"icon":"editor/info","iconPrimary":"#FFFFFF","iconSecondary":"#0052CC","newMacro":false}

{
"start_ts" : ...
"end_ts" : ...
}

Key

Type

Description

start_ts

integer

Returns log entries since the specified time. Time must be provided as Unix time in seconds.

end_ts

integer

Returns log entries before the specified time. Time must be provided as Unix time in seconds.

Default: The current time.

Note

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

Response

Response

Header

Key

Description

X-SL-StatusCode

Status code indicating the results of the request.

Learn more: HTTP Status Code Registry

Response Body

Code Block
{
  "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

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.

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

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.