Get Measurement Point TSDB Metadata

Get the TSDB storage policy corresponding to the model measurement point. A measurement point may have multiple storage policies, depending on its data type and usage. This API returns all the TSDB storage policy metadata in the current organization for the specified measurement point.

Request Format

GET https://{apigw-address}/tsdb-policy/v2.0/policies

Request Parameters (URI)

Name Location (Path/Query) Mandatory/Optional Data Type Description
orgId Query Mandatory String The organization ID which the asset belongs to. How to get orgId>>
modelIds Query Mandatory String The model ID. Supports the query of multiple model IDs, separated by commas. How to get modelId>>
measurepoints Query Optional String The measurement point ID. Supports the query of multiple measurement point IDs, separated by commas. How to get pointId>>

Response Parameters

Name Data Type Description
data List<JSONObject> The TSDB storage policy of the specified model and measurement points. For more information, see TSDB Policy Struct

TSDB Policy Struct

Name Data Type Description
modelId String The model ID.
tsdb_metadata List<JSONObject> The list of model measurement points. One measurement point can have multiple policies, and the policies are stored in arrays. For more information, see Policy Struct

Policy Struct

Sample

The following sample shows that the measurement point opentsdb_ai_point has the storage policies AI_RAW (AI raw data) and AI_NORMALIZED (AI minute-level normalized data):

"opentsdb_ai_point": [
  "AI_RAW",
  "AI_NORMALIZED"
]

Parameters

Name Data Type Description
point Arrary A list of measurement point storage policies.

Error Codes

For description of error codes, see Common Error Codes.

Sample 1

Request Sample

Measurement point is not specified:

url: https://{apigw-address}/tsdb-policy/v2.0/policies?orgId=yourOrgId&modelIds=yourModelIds

method: GET

Return Sample

{
  "status": 0,
  "requestId": null,
  "msg": "success",
  "submsg": "success",
  "data": [
    {
      "tsdb_metadata": {
        "opentsdb_di_point": [
          "DI"
        ],
        "opentsdb_pi_point": [
          "PI"
        ],
        "opentsdb_ai_point": [
          "AI_RAW",
          "AI_NORMALIZED"
        ],
        "opentsdb_generic_point": [
          "GENERIC"
        ]
      },
      "modelId": "opentsdb_model"
    }
  ]
}

Sample 2

Request Sample

Measurement point is specified:

url: https://{apigw-address}/tsdb-policy/v2.0/policies?orgId=yourOrgId&modelIds=yourModelIds&measurepoints=yourPointIds

method: GET

Return Sample

{
  "status": 0,
  "requestId": null,
  "msg": "success",
  "submsg": "success",
  "data": [
    {
      "tsdb_metadata": {
        "opentsdb_di_point": [
          "DI"
        ]
      },
      "modelId": "opentsdb_model"
    }
  ]
}

SDK Samples


You can access the Java SDK samples for TSDB policy service on GitHub.