Log Export
    • PDF

    Log Export

    • PDF

    Article summary

    The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.

    Description

    Export logs searched in Cloud Log Analytics to Object Storage.

    Request

    Request URL

    POST https://cloudloganalytics.apigw.ntruss.com/api/{regionCode}-v1/logs/search/export
    

    Request headers

    Header nameDescription
    x-ncp-apigw-timestampIt indicates the elapsed time in milliseconds since January 1, 1970 00:00:00 UTC
    Request is considered invalid if the timestamp differs from the current time by more than 5 minutes
    x-ncp-apigw-timestamp:{Timestamp}
    x-ncp-apigw-api-keyKey value issued from APIGW
    x-ncp-apigw-api-key:{API Gateway API Key}
    x-ncp-iam-access-keyAccess key ID value issued on NAVER Cloud Platform portal
    x-ncp-iam-access-key:{Account Access Key}
    x-ncp-apigw-signature-v2Signature encrypted with the access key ID value and secret key
    x-ncp-apigw-signature-v2:{API Gateway Signature}
    Content-TypeRequest body content type is specified as application/json
    Content-Type: application/json

    Request body

    Parameter nameParameter descriptionRequiredAvailable valuesData type
    keywordSearch keyword
    Search for all logs if not included
    Ne.g., error, userString
    logTypesLog type
    Search for all logs if not included
    Ne,g., SYSLOG, security_log, tomcatString
    timestampFromSearch start timeNe.g., 1593848345548 (timestamp)String
    timestampToSearch end timeNe.g., 1593848345548 (timestamp)String
    bucketnameName of the Object Storage bucket to run the export toYInput value can be obtained through the Get bucket list APIString

    Examples

    Request example

    POST https://cloudloganalytics.apigw.ntruss.com/api/{regionCode}-v1/classic/servers/collecting-infos
    HOST: cloudloganalytics.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-signature-v2: FJSBB4K3XnaGAvVe0Hzj3/2hfNWvgLHR1rQHW2Et2Rs=
    x-ncp-apigw-timestamp: 1593848345548
    x-ncp-iam-access-key: 11IKBWgQegM4DwiJL4mo
    
    {
      "keyword" : "account",
      "timestampFrom": "1593848345548",
      "timestampTo": "1593848345548",
      "interval": "4h",
      "pageNo": 1,
      "pageSize": 10,
      "bucketname" : "asdcx"
    }
    
    curl -X POST "https://cloudloganalytics.apigw.ntruss.com/api/{regionCode}-v1/logs/search/export" 
    -H "accept: application/json" 
    -H "Content-Type: application/json" 
    -H "x-ncp-iam-access-key: 11IKBWgQegM4DwiJL4mo" 
    -H "x-ncp-apigw-timestamp: 1594089845323" 
    -H "x-ncp-apigw-signature-v2: nQsshpBRlVkQTawEC4p49D/Y7pTfAe9UAPY4X0ALGH4=" 
    -d "{ \"keyword\" : \"account\",  \"timestampFrom\": \"1593848345548\", \"timestampTo\": \"1593848345548\", \"interval\": \"4h\", \"pageNo\": 1, \"pageSize\": 10, \"bucketname\" : \"asdcx\"}"
    

    Response example

    {
      "code": 0,
      "message": "The request has been successfully processed.",
      "result": true
    }
    

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.