Data Service

Last Updated on : 2024-06-05 03:15:10download

API description

Get the data overview.

API endpoint

action: data.statisticsSurvey

Request parameter

Parameter name Type Description Required
product_id String The product ID. If you do not set the parameter, all your product IDs will be returned. No

Response parameter

Parameter name Type Description
code Integer The response code. For more information, see Error codes.
success Boolean Indicates whether the operation is successful. Valid values:
  • true: succeeded.
  • false: failed.
msg String The error message that is returned if the API call fails. This parameter value is empty if the API call succeeds.
result Object The returned result.

If the value of result is null, it is not displayed.

Description of result

Parameter name Type Description
dev_active Object The overview of activated devices
App_register Object The overview of app devices.
user_feedback Object The overview of user feedback.
dev_fault Object The overview of device faults.
dev_live Object The overview of active devices.

Description of devActive

Parameter name Type Description
today_active String The number of devices activated today.
yesterday_active String The number of devices activated yesterday.
all_activate String The total number of devices activated.
near7_day_active String The number of devices activated within the seven-day period, starting from the present day and going back.
last7_day_active String The number of devices activated in the seven-day period preceding the current day.
compared_with_yesterday_active String The difference between the number of devices activated today and that of yesterday.

Description of AppRegister

Parameter name Type Description
today_add String The number of devices activated today.
yesterday_add String The number of devices activated yesterday.
all_add String The total number of devices activated.
today_live String The number of active devices today.
yesterday_live String The number of active devices yesterday.
compared_with_yesterday_add String The difference between the number of devices activated today and that of yesterday.
compared_with_yesterday_live String The difference between the number of active devices today and that of yesterday.

Description of userFeedback

Parameter name Type Description
today_feedback String The number of feedback records today.
yesterday_feedback String The number of feedback records yesterday.
all_feedback String The total number of feedback records.
product_feedback String The product feedback record.
App_feedback String The app feedback record.
compared_with_yesterday_feedback String The difference between the number of feedback records today and that of yesterday.
all_pending_feedback String The total number of feedback records to be handled.
product_pending_feedback String The number of product feedback records to be handled.
App_pending_feedback String The number of app feedback records to be handled.

Description of devFault

Parameter name Type Description
today_dev_fault String The number of failed devices today.
yesterday_dev_fault String The number of failed devices yesterday.
all_dev_fault String The total number of failed devices.
compared_with_yesterday_dev_fault String The difference between the number of failed devices today and that of yesterday.

Description of devLive

Parameter name Type Description
today_live String The number of active devices today.
yesterday_live String The number of active devices yesterday.
near7_day_live String The number of active devices within the seven-day period, starting from the present day and going back.
last7_day_live String The number of active devices in the seven-day period preceding the current day.
compared_with_yesterday_live String The difference between the number of active devices today and that of yesterday.
rate_of_today_live String The number of active devices today divided by cumulative activated devices.

Sample request

{
	"action": "data.statisticsSurvey",
	"params": {
		"product_id":"12345"
	}
}

Sample response

{
    "success": true,
    "t": 1545286977957,
    "result": {
        "user_feedback": {
            "all_feedback": "2",
            "compared_with_yesterday_feedback": "0%",
            "today_feedback": "0"
        },
        "dev_fault": {
            "all_dev_fault": "0",
            "yesterday_dev_fault": "0",
            "compared_with_yesterday_dev_fault": "0.00%",
            "today_dev_fault": "0"
        },
        "App_register": {
            "all_add": "7915",
            "compared_with_yesterday_live": "0.00%",
            "yesterday_add": "0",
            "today_add": "0",
            "compared_with_yesterday_add": "0.00%"
        },
        "dev_active": {
            "today_active": "0",
            "all_activate": "5237",
            "yesterday_active": "0",
            "compared_with_yesterday_active": "0.00%"
        }
    }
}

Error codes

The following table lists the error codes that might be returned when you make the API request. For more error codes, see Global Error Codes.

Error code Description
500 A system error has occurred while processing your request.
1106 Invalid permission.