RegisterProductSchema
    • PDF

    RegisterProductSchema

    • PDF

    Article summary

    Summary

    This API registers a user-defined schema in Cloud Insight.

    Request

    API URL

    URL: https://cw.apigw.ntruss.com/cw_fea/real/cw/api/schema
    Method: POST
    

    Request header

    The request headers specified in common settings are required.

    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}
    

    Request Body

    Parameter NameRequirement statusTypeRestrictionsDescription
    prodNameYStringProduct name
    fieldsYList<FieldDto>Schema definition of the product

    Example

    Request example

    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"
              ]
          }
        }
      ]
    }
    

    Reference:

    1. The default value of the dimension and metric fields is false, and the API may ignore parameters that have a value of false.

    2. For metric fields, the aggregation is designated at each interval. If aggregation is not in the field element, then the aggregation method is automatically designated for each interval.

    3. mbrNo is a reserved word and can't be used as a dimension name.

    Response example

    The API returns HTTP code 200, as well as a simple response including the product key (cw_key) in JSON format, when registration is completed without any errors. The product key is needed to update or delete a schema and is used for transmitting or querying data.

    {
      "cw_key": "xxxxxxxxxxxxxxxxxx"
    }
    

    Was this article helpful?

    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.