RegisterProductSchema
    • PDF

    RegisterProductSchema

    • PDF

    Article Summary

    개요

    Cloud Insight에서 사용자 정의 스키마를 등록합니다.

    요청

    API URL

    URL: https://cw.apigw.ntruss.com/cw_fea/real/cw/api/schema
    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}
    

    요청 바디

    파라미터명필수 여부타입제약사항설명
    prodNameYString상품의 이름
    fieldsYList<FieldDto>상품의 스키마 정의

    예시

    요청 예시

    POST /cw_fea/real/cw/api/schema
    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}
    
    Payload:
    
    {
      "prodName": "Custom/MyProduct",
      "fields": [
        {
          "dataType": "STRING",
          "name": "dimensionName",
          "dimension": true,
          "metric": false,
          "counter": false,
          "idDimension": true|false,
          "desc": "description"
        },
        {
          "dataType": "STRING|INTEGER|FLOAT|LONG",
          "name": "metricName",
          "dimension": false,
          "metric": true,
          "counter": false,
          "desc": "description",
          "aggregations": {
              "Min1": [
                "AVG",
                "SUM",
                "MIN",
                "MAX",
                "COUNT"
              ],
              "Min5": [
                "AVG",
                "SUM",
                "MIN",
                "MAX",
                "COUNT"
              ],
              "Min30": [
                "AVG",
                "SUM",
                "MIN",
                "MAX",
                "COUNT"
              ],
              "Hour2": [
                "AVG",
                "SUM",
                "MIN",
                "MAX",
                "COUNT"
              ],
              "Day1": [
                "AVG",
                "SUM",
                "MIN",
                "MAX",
                "COUNT"
              ]
          }
        }
      ]
    }
    

    참조:

    1. Dimension 및 Metric 필드의 경우 디폴트값은 false이며 false 인 경우 요청에서 무시할 수 있습니다.

    2. Metric 필드의 경우 각 간격에 대해 집계가 지정됩니다. 필드 요소에 aggregation 이 없는 경우 각 간격에 대해 집계 방법이 자동으로 지정됩니다.

    3. mbrNo 는 예약어로 Dimension 이름으로 사용할 수 없습니다.

    응답 예시

    오류없이 등록이 완료된 경우 HTTP code 200과 상품키(cw_key)를 포함한 간단한 JSON 형식의 응답이 리턴됩니다. 상품키는 스키마를 업데이트 혹은 삭제할 경우 필요하며, 데이터를 전송하고 조회할 때 사용됩니다.

    {
      "cw_key": "xxxxxxxxxxxxxxxxxx"
    }
    

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

    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.