Resubmit Data Deletion Job

When a data deletion job fails, resubmit the job by specifying the data deletion job ID.

Operation Permissions

Required Authorization

Required Operation Permission

Asset

Write

For more information about resources and required permission, see Policies, Roles and Permissions>>

Request Format

PUT https://{apigw-address}/tsdb-service/v2.1/data/resubmit

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

JobId

Query

Mandatory

String

The data deletion job ID that is return by the Submit Data Deletion Job API. Note that the status of the data deletion job must be Failed.

Response Parameters

Name

Data Type

Description

data

String

Returned status of the resubmitted data deletion job.

Error Codes

For description of error codes, see Common Error Codes.

Sample

Request Sample

url: https://{apigw-address}/tsdb-service/v2.1/data/resubmit?orgId=yourOrgId&JobId=yourJobId

method: PUT

Return Sample

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

Java SDK Sample

import com.alibaba.fastjson.JSONObject;
import com.envision.apim.poseidon.config.PConfig;
import com.envision.apim.poseidon.core.Poseidon;
import com.envision.apim.poseidon.request.PoseidonRequest;

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

    private static class Request extends PoseidonRequest {

        public void setBodyParams(String key, Object value) {
            bodyParams().put(key, value);
        }

        public void setMethod(String method) {
            this.method = method;
        }

        private String method;

        @Override
        public String baseUri() {
            return "";
        }

        @Override
        public String method() {
            return method;
        }
    }

    public static void main(String[] args) {
        //1. Click Application Registration in the left navigation of the EnOS Management Console.
        //2. Click the application that needs to call the API, and click Basic Information. accessKey and secretKey correspond to AccessKey and SecretKey in EnOS.
        Poseidon poseidon = Poseidon.config(
                PConfig.init()
                        .appKey("AccessKey of your APP")
                        .appSecret("SecretKey of your APP")
        ).method("PUT").header("Content-Type", "application/json");
        Request request = new Request();

        JSONObject response =  poseidon
                .url(API_GATEWAY_URL + "/tsdb-service/v2.1/data/resubmit")
                .queryParam("orgId", "yourOrgId")
                .queryParam("JobId", "yourJobId")
                .getResponse(request, JSONObject.class);
        System.out.println(response);
    }
}