GetProductSchema
    • PDF

    GetProductSchema

    • PDF

    Article Summary

    Summary

    This API queries a user-defined schema.

    Request

    API URL

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

    Request header

    The request headers specified in common settings are required.

    x-ncp-apigw-signature-v2: {generated signature}
    x-ncp-apigw-timestamp: {current timestamp}
    x-ncp-iam-access-key: {your iam access key}
    

    Request Parameters

    When the API is called with prodName in the parameter, it returns a schema including the cw_key.

    Parameter NameRequirement statusTypeRestrictionsDescription
    cw_keyNStringProduct's cw_key
    prodNameYStringThe name of the user-defined schema begins with Custom/Product name

    Example

    Request example

    GET /cw_fea/real/cw/api/schema?prodName=Custom/MyProduct
    Host: cw.apigw.ntruss.com
    x-ncp-apigw-signature-v2: {generated signature}
    x-ncp-apigw-timestamp: {current timestamp}
    x-ncp-iam-access-key: {your iam access key}
    

    Response example

    The API returns HTTP code 200 as well as the schema in JSON format if the query is completed without any errors.

    {
      "prodName": "Custom/MyProduct",
      "secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "useCustomResource": false,
      "cw_key":"xxxxxxxxxxxxxxxxxx",
      "fields": [
        {
          "dataType": "STRING",
          "name": "dimensionName",
          "dimension": true,
          "metric": false,
          "counter": false,
          "idDimension": true,
          "desc": "description"
        },
        {
          "dataType": "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"
              ]
          }
        }
      ]
    }
    

    Was this article helpful?

    What's Next
    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.