Skip to content

Delete a User

API Overview

This API deletes a specified user.

API URL

POST Http://{anymetrics_host:anymetrics_port}/anymetrics/api/v1/user/delete

For how to obtain anymetrics_host:anymetrics_port, see Calling APIs

Request Parameters

Common Request Parameters (HEADERS)

Parameter Type Required Description
tenant-id String Yes Tenant ID,used to identify the tenant that contains the metric query content
auth-type String Yes Authentication method. Supports UIDTOKENACCOUNTAPIKEY
auth-value String Yes Authentication value corresponding to auth-type

Request Parameters

Parameter Type Required Max Length Description Example Value
userid String Yes 32 User ID of the user to delete account123

Response Parameters

Parameter Type Required Max Length Description Example Value
code String Yes 32 API response code 200
succeess boolean Yes Whether successful true
errorMsg String Yes 512 Error message NULL
detailErrorMsg String Yes 512 Error details returned when the request fails NULL
traceId String Yes 128 traceId fdde343f9ff2dcd70.292.16857691758642861
data String Yes 32 Returned userId 478209624953061376

Request Example

curl --location --request POST 'https://127.0.0.1:8083/anymetrics/api/v1/user/delete' \
--header 'auth-type: UID' \
--header 'tenant-id: tn_19487697' \
--header 'auth-value: 463663891121963008' \
--header 'Accept-Language: zh-CN' \
--data-raw '{
    "userId":"575645969954111488"
}'

Response Example

{
    "data": true,
    "success": true,
    "code": "200",
    "errorMsg": null,
    "detailErrorMsg": null,
    "traceId": "c397f866392e4a9e885c8a6c4f39fdb5.183.17466751062131005"
}