目录

Overview

The app server calls this API to query the progress of the data deletion task in HUAWEI Analytics Kit.

Scenario

After the app server calls the interface that creates a user data deletion task, the Analytics Kit server will asynchronously delete the data. The app server needs to periodically query the export task status so that it can download the exported data for the end user in a timely manner.

Restrictions

Interface Prototype

Protocol

HTTP GET

Direction

HUAWEI Analytics Kit server -> Developer callback API server

URL

GET https://<URI>/analytics/gdpr/user_deletion_tasks/v2

Data Format

Request: Content-Type: application/json

Response: Content-Type: application/json

Request

Table1 Request body
ParameterMandatory/OptionalTypeDescription

aaid

Optional

string

User device ID, which can be obtained through the getAAID interface on the device side.

Response

Table2 Response body
ParameterTypeDescription

result_code

String

Result code. For details, please refer to Result Codes.

result_msg

String

Response description.

task_list

TaskList

Task list.

Table3 TaskList parameters
ParameterMandatory/OptionalTypeDescription

request_id

Mandatory

String

Request ID.

request_time

Mandatory

DateTime

Request time.

status

Mandatory

String

Task status:

  • DELETING: deleting

  • PENDING: waiting for deletion

  • DELETED: deletion succeeded

  • IDMAPPING_NOT_FOUND: ID mapping not found

  • IDMAPPING_DEL_FAILED: ID mapping deletion failed

status_time

Optional

DateTime

Last status update time.

Response Example

  1. HTTP/1.1 200 OK
  2. Content-Type: application/json; charset=UTF-8
  3. Connection: Close
  4. Content-Length: xxxx
  5. {
  6. "result_code":"0",
  7. "result_msg":"success",
  8. "task_list":[{
  9. "request_id":"12345678",
  10. "request_time":"datetime",
  11. "status":" DELETING ",
  12. "status_time":"datetime"
  13. }]
  14. }

Result Codes

Status CodeResult CodeResponse CodeDescriptionSuggestion

200

0

Success

Request succeeded.

-

400

10020

invalidParameter

Invalid parameter.

Check and correct the parameter value.

400

10008

tooFrequentRequest

API requests are too frequent.

Display a message indicating that data export query requests are excessively frequent and asking the user to try again later.

Call Example

  1. GET /analytics/gdpr/user_deletion_tasks/v2?aaid=sample-aaid HTTP/1.1
  2. Content-Type: application/json; charset=UTF-8
  3. Content-Length: xxxx
  4. Accept: application/json
  5. Authorization: Bearer 78C2395236BBF4262CAE4F1172E327C2929AD63EAA0395961A49DEBC3B6F8339
  6. x-product-id: sample-productid
  7. x-app-id: sample-appid