SendData
    • PDF

    SendData

    • PDF

    Article Summary

    개요

    JSON 데이터를 Cloud Insight Collector로 보냅니다.

    요청

    API URL

    URL: https://cw.apigw.ntruss.com/cw_collector/real/data
    URL: https://cw.apigw.ntruss.com/cw_collector/real/ (Deprecated)
    Method: POST
    

    요청 헤더

    공통설정에 명시된 요청헤더가 필요합니다.

    Content-Type: application/json
    x-ncp-apigw-signature-v2: {generated signature}
    x-ncp-apigw-timestamp: {current timestamp}
    x-ncp-iam-access-key: {your iam access key}
    
    참고

    싱가포르 리전(SGN)에서 데이터 전송시에는 header에 X-NCP-REGION_NO=7 추가가 필요합니다.
    싱가포르 리전(SGN)에서 데이터 전송시 위와 같은 header가 없을 경우 데이터 aggregation 및 event가 정상적으로 동작하지 않을 수 있습니다.

    요청 바디

    {
      "cw_key": "string",
      "data": {
          actual JSON data
      }
    }
    
    • 또는 아래와 같이 JSON 데이터 배열을 전송하십시오.
    {
        "cw_key": "string",
        "data": [
            {
    			actual JSON data
            },
            {
    			actual JSON data
            },
            {
    			actual JSON data
            }
        ]
    }
    

    예시

    요청예시

    다음은 상품 키가 "xxxxxxxxxxxxxxxxxx" 이며 스키마가 아래와 같은 구조를 가진 Custom Product로 데이터를 보내는 예시입니다.

    • Dimension : instanceId
    • Metric : cpu, sessionCount, trafficIn
    POST /cw_collector/real/data
    Host: cw.apigw.ntruss.com
    Content-Type: application/json
    x-ncp-apigw-signature-v2: {generated signature}
    x-ncp-apigw-timestamp: {current timestamp}
    x-ncp-iam-access-key: {your iam access key}
    
    {
      "cw_key": "xxxxxxxxxxxxxxxxxx",
      "data": {
          "cpu": 1.5,
          "sessionCount": 1290,
          "trafficIn": 12984721,
          "instanceId": "2194837"
      }
    }
    

    참조:

    1. cw_key가 없는 레코드는 무시되고 폐기됩니다.
    2. 레코드가 있는 데이터 요소에는 정의 된 하나 이상의 Metric 필드 또는 Dimension 필드가 포함될 수 있습니다.

    응답예시

    오류없이 전송이 완료된 경우 HTTP code 200과 아래와 같은 JSON 형식의 응답이 리턴됩니다.

    {
      "result": "success",
      "dataId": -1,
      "message": ""
    }
    

    이 문서가 도움이 되었습니까?

    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.