--- title: "HTTP SDK 사용 방법" slug: "elsa-elsa-1-5-1" tags: ["effective log search & analytics", "SDK 사용 가이드"] updated: 2026-09-17T09:07:51Z published: 2026-09-17T09:07:51Z 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`** | 프로젝트 아이디. 프로젝트 아이디를 확인하는 방법은 [프로젝트 조회하기](/docs/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의 시스템에서 사용합니다. 두 가지 키를 사용 시 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" }' ```