--- title: "HTTP SDK の使用方法" slug: "elsa-elsa-1-5-1" tags: ["effective log search & analytics"] updated: 2026-09-17T10:01:02Z published: 2026-09-17T10:01:02Z canonical: "guide.ncloud-docs.com/elsa-elsa-1-5-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://guide.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # HTTP SDK の使用方法 Classic/VPC環境で利用できます。 ## 概要 HTTPSプロトコルを使用して Effective Log Search & Analyticsにログを送信でき、以下のような JSON形式を使用します。 ``` { "projectName": "72356c50401b8e20_testproject", "projectVersion": "1.0.0", "body": "This log message come from HTTPS client.", "logLevel": "DEBUG", "logType": "WEB", "logSource": "https" } ``` ### パラメータ | パラメータ | タイプ | 必須 | 説明 | | --- | --- | --- | --- | | `projectName` | `string` | **`required`** | プロジェクト ID。プロジェクト IDを確認する方法は、[プロジェクトを照会する](/docs/ja/elsa-elsa-1-2#%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8%EC%A1%B0%ED%9A%8C%ED%95%98%EA%B8%B0)を参照します。 | | `projectVersion` | `string` | **`required`** | プロジェクトバージョン。デフォルト値は1.0.0であり、A~Z、a~z、0~9、ハイフン(-)、句点(.)、アンダースコア(_)のみ使用できます。 | | `body` | `string` | **`required`** | ログメッセージ。UTF-8を使用し、スペースは使えません。 | | `logSource` | `string` | `optional` | ログを識別するために使用し、送信しない場合のデフォルト値は「json」です。 | | `logType` | `string` | `optional` | ログを識別するために使用し、送信しない場合のデフォルト値は「nelo2-log」です。 | ### 注意 JSON/HTTPSで Effective Log Search & Analyticsにログを送信する場合、次のアドレスを使用します。 ``` https://elsa-col.ncloud.com/_store ``` `"logTime"`と `"sendTime"`は Effective Log Search & Analyticsのシステムで使用します。2つのキーを使用する場合、Effective Log Search & Analyticsで無視します。 HTTPSログの送信は PUTと POST方式のみサポートします。 ## ログ送信例 ### curlを使用して正常にログを送信した場合 #### POSTメソッドを使用してログを送信 ``` $ curl -XPOST 'https://elsa-col.ncloud.com/_store' -d '{ "projectName": "%YOUR_PROJECT_KEY%", "projectVersion": "1.0.0", "body": "this log message come from https client, and it is a simple sample.", "logLevel": "DEBUG", "logType": "WEB", "logSource": "https" }' ``` #### PUTメソッドを使用してログを送信 ``` $ curl -XPUT 'https://elsa-col.ncloud.com/_store' -d '{ "projectName": "%YOUR_PROJECT_KEY%", "projectVersion": "1.0.0", "body": "this log message come from https client, and it is a simple sample.", "logLevel": "DEBUG", "logType": "WEB", "logSource": "https" }' ``` ### ログ送信に失敗する場合 #### URLが間違っている場合(_storess -> _store) ``` $ curl -XPOST 'https://elsa-col.ncloud.com/_storess' -d '{ "projectName": "%YOUR_PROJECT_KEY%", "projectVersion": "1.0.0", "body": "this log message come from https client, and it is a simple sample.", "_xxx": "this is a invalid key" }' ``` #### 間違ったフィールドキーを使用した場合(_xxx) ``` $ curl -XPOST 'https://elsa-col.ncloud.com/_store' -d '{ "projectName": "%YOUR_PROJECT_KEY%", "projectVersion": "1.0.0", "body": "this log message come from https client, and it is a simple sample.", "_xxx": "this is a invalid key" }' ```