UpdateProductSchema
    • PDF

    UpdateProductSchema

    • PDF

    Article summary

    Summary

    This API updates a user-defined schema.

    Request

    API URL

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

    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
    cw_keyYStringProduct's cw_key
    fieldsYList<FieldDto>Schema definition (defined in a field array) of a product

    Example

    Request example

    PUT /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",
      "cw_key":"xxxxxxxxxxxxxxxxxx",
      "fields": [
        {
          "dataType": "STRING",
          "name": "dimensionName",
          "dimension": true,
          "metric": false,
          "counter": false,
          "idDimension": true|false,
          "defaultMetric": false,
          "desc": "description"
        },
        {
          "dataType": "STRING|INTEGER|FLOAT|LONG",
          "name": "metricName",
          "dimension": false,
          "metric": true,
          "counter": false,
          "defaultMetric": true|false,
          "desc": "description",
          "aggregations": {
            "Min30": [
              "AVG",
              "SUM",
              "MIN",
              "MAX",
              "COUNT"
            ],
            "Hour2": [
              "AVG",
              "SUM",
              "MIN",
              "MAX",
              "COUNT"
            ],
            "Min2": [
              "AVG",
              "SUM",
              "MIN",
              "MAX",
              "COUNT"
            ],
            "Day1": [
              "AVG",
              "SUM",
              "MIN",
              "MAX",
              "COUNT"
            ],
            "Min5": [
              "AVG",
              "SUM",
              "MIN",
              "MAX",
              "COUNT"
            ],
            "Min1": [
              "AVG",
              "SUM",
              "MIN",
              "MAX",
              "COUNT"
            ]
          }
        }
      ]
    }
    

    Note: The difference between a schema registration and an update request is that the update requires the cw_key of the registered schema. An error is reported if the specified product is not found when updating a schema.

    Response example

    The API returns HTTP code 200 as well as the response in simple JSON format if the update is completed without any errors.

    {
        "msg": "ok"
    }
    

    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.