HTTP SDK
    • PDF

    HTTP SDK

    • PDF

    Article Summary

    Available in Classic and VPC

    You can transfer log data in JSON format to Effective Log Search & Analytics 2.0's collecting server by using HTTPS protocol.

    Log transferring information

    Check the following items to transfer logs in HTTPS/JSON format:

    API URL
    Call method
    Request body(JSON format) and field
    Log transfer examples

    API URL

    Use the following address when transferring logs to the Effective Log Search & Analytics 2.0 server in HTTPS:

    https://elsa-v2-col.ncloud.com/_store
    

    Call method

    Use PUT or POST method as the call method.

    Request body and field

    Write the request body in JSON format as follows:

    {
        "txtToken": "2xxxx10e221b4d06a870a06e9c5axxxx",
        "projectName": "72356c50401b8e20_testproject",
        "projectVersion": "1.0.0",
        "body": "This log message come from HTTPS client.",
        "host": "localhost",
        "logType": "nelo2-log"
    }
    

    Fields that can be entered in the request body in JSON format are as follows:

    FieldTypeRequirement statusDescription
    txtTokenstringRequiredThe txtToken registered to NELO when the project was created (refer to View project details)
    projectNamestringRequiredThe project key registered to NELO when the project was created (refer to View project details)
    projectVersionstringRequiredProject version (Default: 1.0.0)
    • Only English letters, numbers, hyphens (-), periods (.), and underscores (_) can be entered
    bodystringRequiredLog message
    • Uses UTF-8, and spaces cannot be used
    hoststringOptionsLog transfer location (Default: TCP's peer-address)
    logTypestringOptionsIdentifies log type (Default: nelo2-log)
    Note
    • To apply a symbol file, the version of the symbol file should be identical to the projectVersion key value.
    • logTime and sendTime parameters are used in the system of Effective Log Search & Analytics 2.0 service. Entering both parameters does not make them both apply.

    HTTP SDK log transfer examples

    PUT and POST method is only supported when transferring HTTPS logs. Refer to the following log transfer examples by method to transfer logs.
    Check if all transfer information, such as API URL and field, is correct before transferring logs so that the log transfer does not fail.

    POST method example

    The following is an example of using POST method.

    $ curl -XPOST 'https://elsa-v2-col.ncloud.com/_store' -d '{
        "txtToken": "2xxxx10e221b4d06a870a06e9c5axxxx",
        "projectName": "72356c50401b8e20_testproject",
        "projectVersion": "1.0.0",
        "body": "This log message come from HTTPS client.",
        "host": "localhost",
        "logType": "nelo2-log"
    }'
    

    PUT method example

    The following is an example of using PUT method.

    $ curl -XPUT 'https://elsa-v2-col.ncloud.com/_store' -d '{
        "txtToken": "2xxxx10e221b4d06a870a06e9c5axxxx",
        "projectName": "72356c50401b8e20_testproject",
        "projectVersion": "1.0.0",
        "body": "This log message come from HTTPS client.",
        "host": "localhost",
        "logType": "nelo2-log"
    }'
    

    Was this article helpful?

    What's Next
    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.