V2.1 Delete Product


Delete a product.


This API is available in EnOS 2.1.0 and above.

Operation Permissions


Before invoking this API, ensure that the service account has been authorized the policy that includes the following service(s) and action permission(s). For how to authorize the service account, see Managing Service Accounts.


Required Service

Required Operation Permission

Product

Delete

Prerequisite

Ensure that there are no devices under the product before deleting.

Request Format

POST https://{apigw-address}/connect-service/v2.1/products?action=delete

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

productKey

Query

Mandatory

String

The product key.

Response Parameters

Name

Data Type

Description

data

String

The product key of the deleted product.

Error Codes

Code

Message

Description

11404

Product cannot be found

The productKey does not exist.

11619

Existing Device Restrictions

There are devices under the product to be deleted.

Samples

Request Sample

url: https://{apigw-address}/connect-service/v2.1/products?action=delete&orgId=yourOrgId&productKey=yourProductKey
method: POST

Return Sample

{
    "code":0,
    "msg":"OK",
    "requestId":"ef6a7fbb-0834-45fb-b1d4-6bd2dc25796f",
    "data":"atC41UIe"
}

SDK Samples


You can access the SDK samples for Connection Service on GitHub: