Update Unformatted Policy

Update the data storage time of organization’s unformatted storage policy.

Note

To avoid the lack of system resources and system instability, the interface for modifying the storage time will not be available after 2.3 CU5, please contact the system administrator if you are required to update it.

Request Format

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

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>>
retention Query Mandatory String Data storage time. All supported retention include 1M, 3M, 6M, 1y, 2y, 3y, 5y, 10y, 15y, 20y.

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/update?orgId=yourOrgId&retention=3M

method: GET

Return Sample

{
  "code": 0,
  "msg": "OK",
  "submsg": null,
  "data": null
}

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").header("Content-Type", "application/json");

        String resp = poseidon.url(API_GATEWAY_URL + "/tsdb-policy/v2.1/policies/unformatted/update")
                .queryParam("orgId", "yourOrgId")
                .queryParam("retention", "3M")
                .sync();

        System.out.println(resp);
    }
}