Bulk Delete Tenants

Delete multiple tenants at the same time.

Request URL

DELETE {base_url}/uc-tenant/api/v1/tenants/batch-delete

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String The access token used for authentication.

Format: Bearer {access_token}.

Body parameters
Parameter Required Type Description
ids Yes Array<Integer> The IDs of the tenants to delete.
Note: You can obtain the IDs using the Query Tenants interface.

Response parameters

Parameter Type Description
requestId String The unique ID of the request, which can be used to quickly locate the request.
code String The HTTP status code of the request.
  • 200: Request succeeded.
  • Non-200 value: Request failed.
message String The status message of the request.
detailMessage String The detailed error information.

When the request is successful, this parameter returns empty.

result Object<Deletion_Result> The deletion result.
Deletion_Result
Parameter Type Description
successCount Integer The number of tenants deleted successfully.
failedCount Integer The number of tenants that failed to be deleted.
failures Array<Failure_Item> The list of tenants that fail to be deleted, with failure reasons.
Failure_Item
Parameter Type Description
tenantId String The ID of the tenant that failed to be deleted.
tenantName String The name of the tenant that failed to be deleted.
errorCode String The error code of the failure.
errorMessage String The description of the failure reason.

Example

Request example

DELETE /uc-tenant/api/v1/tenants/batch-delete HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1wbGVAb3V0bG9vay5jb20iLCJhcHBfa2V5Ijoic2xOdnQzaHc1NXB2Vm5HRlNhR2ZOVTNmMWxYQ3lpa08iLCJncmFudF90eXBlIjoib3BlbmFwaSIsImNsaWVudF9leHQiOnsiZGVzY3JpcHRpb24iOiLnrKzkuInmlrnlkIjkvZzkvJnkvLTlupTnlKgiLCJwYXJ0bmVyIjoi56S65L6L5ZCI5L2c5LyZ5Ly0In0sImNsaWVudF90eXBlIjoib3BlbmFwaSIsImV4cCI6MTc5MTk4NTEyOSwiaWF0IjoxNzkxOTYzNTI5LCJqdGkiOiI4OWEzZGNjZi0xODUwLTQ4ODQtOGFmOS1mNGFmY2I2MzljNWIiLCJjbGllbnRfaWQiOiJub3ZvLW9wZW4tcGxhdGZvcm0iLCJ1c2VyX2V4dCI6eyJyb2xlSWRzIjpbM10sInN0eXBlIjoiQURNSU4iLCJ0ZW5hbnRDb2RlIjpudWxsLCJ0eXBlIjoiUF9BQ0NPVU5UIiwidXNlcklkIjozMDc2OTEzNjQ0OTE1OTk4NzIwLCJlbWFpbCI6ImRpc3RyaWJ1dG9yZXhhbXBsZUBvdXRsb29rLmNvbSIsInVzZXJuYW1lIjoiZGlzdHJpYnV0b3JleGFtcGxlQG91dGxvb2suY29tIiwidWNJZCI6MzA3NjkxMzY0NDg5MDgzMjg5Nn19.M6uGO4Ocer4JKJLJ5ZIafLRIs5yqPMa0Y_RIiwQTb2bWsr5DViU0jgbjca91VukjmGNplQV0U0QoX17I6Y6EhytUkHWTjW1FkEWJiu7CPCob_qDcta9RyT-Hio36HViBsoU1fewmFyufrl5Li1KLxnuREIWklyImMH4-JJwsni7-19l537NIog150PtePm5RalOLCcvE0a4DbD9MV7aPaHaBfWhxXgZJvAB_13tG_ELkVny7Mpwcui-b1kGeis9gWL878M0ZpIJ20OHk578BeL60PDh3IiInYeQMrmCT2p04KQqDyFI6KuIz85I85a6bJKa9ntzJJv3q-s9lBZuELw
Content-Type: application/json
{
  "ids": [
    "2110275024254992385",
    "2110275026322784258"
  ]
}

Response example

HTTP/1.1 200 OK
{
  "result": {
    "successCount": 2,
    "failedCount": 0,
    "failures": []
  },
  "requestId": "df5b4bfd090459a00cdcd76b02238f6d",
  "code": "200",
  "message": "SUCCESS"
}