Get Data Deletion Details

Get the running result details of data deletion jobs (by specifying model ID or measurement ID).

Operation Permissions

Required Authorization

Required Operation Permission

Asset

Read

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

Request Format

GET https://{apigw-address}/tsdb-service/v2.1/data/delete-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>>

queryId

Query

Optional

String

Model ID or measurement ID. If not specified, get the details of all data deletion jobs that are submitted in the organization.

pageNo

Query

Optional

Integer

The request pages, starting from 1.

pageSize

Query

Optional

Integer

The number of records in each page, which must be greater than 0.

Response Parameters

Name

Data Type

Description

total

Integer

Total records that are returned.

pageNum

Integer

Number of the current page.

pageSize

Integer

Number of returned records in the page.

list

List<JSONObject>

The list of data deletion job running details. For more information, see list

list

Sample

{
  "id": "290537323067711488",
  "status": 2,
  "modelId": "yourModelId",
  "assetIds": "yourAssetIds",
  "measurement": "yourPointId",
  "startTime": "1615444301240",
  "endTime": "1615444301240",
  "launchTime": "2021-03-12T09:32:16.442+0000",
  "finishTime": "2021-03-12T09:32:46.418+0000",
  "operator": "user.name"
}

Parameters

Name

Data Type

Description

id

String

Data deletion job ID.

status

Integer

Running status of the data deletion job. 0: Committed; 1: Executing; 2: Finished; 3: Suspended; 4: Canceled; 5: Failed.

modelId

String

The model to which the deleted data belongs.

assetIds

String

The assets to which the deleted data belongs.

measurement

String

The measurement point to which the deleted data belongs.

startTime

String

The specified time range of the data to be deleted (start time).

endTime

String

The specified time range of the data to be deleted (end time).

launchTime

Long

Time when the data deletion job was launched.

finishTime

Long

Time when the data deletion job running was finished.

operator

String

ID of the user who submitted the 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/delete-detail?orgId=yourOrgId&queryId=yourModelID&pageSize=10&pageNo=1

method: GET

Return Sample

{
  "msg": "OK",
  "code": 0,
  "data": {
    "list": [
      {
        "id": "302037106667073536",
        "status": 2,
        "endTime": " 1615530701240",
        "modelId": "yourModelId",
        "assetIds": "yourAssetIds",
        "operator": "user.name",
        "startTime": "1615444301240",
        "finishTime": "2021-03-12T10:37:46.353+0000",
        "launchTime": "2021-03-12T10:37:16.383+0000",
        "measurement": "yourPointId"
      }
    ],
    "total": 2,
    "pageNum": 1,
    "pageSize": 10
  },
  "submsg": "success"
}

SDK Samples


You can access the `Java SDK Samples<https://github.com/EnvisionIot/sample-code-java/tree/EnOS2.4/tsdbdata>`__for TSDB data service on Github.