Push a Product Deletion Notification
Function
After the application calls the API for creating a rule triggering condition (resource is set to product and event to delete), the API for creating a rule action, and the API for modifying a rule triggering condition, and activates a rule, the platform pushes the result to the server specified by the rule when the product is deleted.
URI
POST /HTTP URL determined when the application creates the product deletion notification rule. The AMQP channel does not require the URL.
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
resource |
Yes |
String |
Parameter description: subscribed resource name. Set this parameter to product. |
event |
Yes |
String |
Parameter description: subscribed resource event. Set this parameter to delete. |
event_time |
Yes |
String |
Parameter description: UTC time when the resource event was generated. The value is in the format of yyyyMMdd'T'HHmmss'Z', for example, 20151212T121212Z. If necessary, convert the time to display in the local time zone format. |
event_time_ms |
No |
String |
Parameter description: UTC time when a resource event was generated. The value in the format of yyyy-MM-dd'T'HH:mm:ss.SSS'Z', for example, 2015-12-12T12:12:12.000Z. If necessary, convert the time to display in the local time zone format. |
request_id |
No |
String |
Parameter description: message ID, which is specified by the device or generated by the platform, and is used to trace the service process. |
notify_data |
Yes |
ProductDeleteNotifyData object |
Parameter description: message to push. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
body |
Yes |
DeletedProduct object |
Parameter description: message content. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
app_id |
No |
String |
Parameter description: resource space ID. |
product_id |
No |
String |
Parameter description: product ID, which uniquely identifies a product. It is allocated by the platform after the product is created on the platform. |
name |
No |
String |
Parameter description: product name. |
Response Parameters
None
Example Requests
Example of a product deletion notification.
Product deletion notification. { "resource" : "product", "event" : "delete", "event_time" : "20151212T121212Z", "event_time_ms" : "2015-12-12T12:12:12.000Z", "request_id" : "3fe58d5e-8697-4849-a165-7db128f7e776", "notify_data" : { "body" : { "product_id" : "5ba24f5ebbe8f56f5a14f605", "name" : "Thermometer", "app_id" : "jeQDJQZltU8iKgFFoW060F5SGZka" } } }
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot