Get Unformatted Policy

Get information of organization’s unformatted storage policy, including storage policy ID, update time and retention

Request Format

GET https://{apigw-address}/tsdb-policy/v2.1/policies/unformatted/detail

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 organization ID>>

Response Parameters

Name

Data Type

Description

data

JSONObject

The detailed information of the storage policy. See Storage Policy Struct

Storage Policy Struct

Name

Data Type

Description

policyId

String

Storage Policy ID.

retention

String

Data Storage Time.

updateTime

String

Update Time of Storage Policy.

Sample

{
     "policyId": "yourPolicyId",
     "updateTime": "2021-09-14T02:18:54.000+08:00",
     "retention": "6M"
}

Error Code

For the description of error codes, see Common Error Codes.

Sample

Request Sample

url: https://{apigw-address}/tsdb-policy/v2.1/policies/unformatted/detail?orgId=yourOrgId

method: GET

Return Sample

{
     "code": 0,
     "msg": "OK",
     "submsg": null,
     "data": {
          "policyId": "yourPolicyId",
          "updateTime": "2021-09-14T02:18:54.000+08:00",
          "retention": "6M"
     }
}

Java SDK Sample

import com.envision.apim.poseidon.config.PConfig;
import com.envision.apim.poseidon.core.Poseidon;

public class Sample {
    private static final String API_GATEWAY_URL = "https://{apigw-address}";

    public static void main(String[] args) {
        Poseidon poseidon = Poseidon.config(
                PConfig.init()
                        .appKey("AccessKey of your APP")
                        .appSecret("SecretKey of your APP")
        ).method("GET");
        String resp = poseidon.url(API_GATEWAY_URL + "/tsdb-policy/v2.1/policies/unformatted/detail")
                .queryParam("orgId", "yourOrgId")
                .sync();

        System.out.println(resp);
    }
}