Data Dashboard Service

Last Updated on : 2023-06-19 07:06:15

This topic describes the APIs available for use in the data service.

API operations

Request method API operation Description
GET /v1.0/statistics-datas-survey Get the data overview
GET /v1.0/apps/{schema}/users-active-datas Count the number of daily registered users of the app
GET /v1.0/apps/{schema}/users-live-datas Count the number of daily active users of the app
GET /v1.0/apps/{schema}/devices-survey Get an overview of app device data
GET /v1.0/devices/datas-survey Get an overview of the devices
GET /v1.0/devices/locations-live-datas Get regional distribution data of active devices
GET /v1.0/devices/locations-active-datas Get detailed regional distribution data of activated devices
GET /v1.0/devices/live-datas Count the number of daily active devices
GET /v1.0/devices/active-datas Count the number of daily activated devices
GET /v1.0/devices/accumulate-active-datas Count the data of cumulative daily activated devices
GET /v1.0/devices/live-datas-survey Get an overview of active device data
GET /v1.0/devices/active-datas-survey Get an overview of activated device data

Get the data overview

Description

Get the data overview.

API address

GET /v1.0/statistics-datas-survey

Request parameter

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

Return parameter

Parameter Type Description
code Integer See Global Error Codes.
success Boolean Indicates whether the operation is successful. Valid values:
  • true: succeeded
  • false: failed
msg String The message returned if the request fails. An empty value indicates a successful request.
result Object The returned result.

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

Result

Parameter Type Description
dev_active Object Overview of activated device data
App_register Object Overview of app user data
user_feedback Object Overview of user feedback
dev_fault Object Overview of device faults

DevActive

Parameter Type Description
today_active String The number of devices activated today
yesterday_active String The number of devices activated yesterday
all_activate String Total activated devices
near7_day_active String The number of devices activated in the last seven days
last7_day_active String The number of devices activated within the seven days starting from 14 days ago
compared_with_yesterday_active String The difference between the number of devices activated today and that of yesterday

AppRegister

Parameter Type Description
today_add String The number of users registered today
yesterday_add String The number of users registered yesterday
all_add String Total registered users
today_live String The number of active users today
yesterday_live String The number of active users yesterday
compared_with_yesterday_add String The difference between the number of users registered today and that of yesterday
compared_with_yesterday_live String The difference between the number of active users today and that of yesterday

UserFeedback

Parameter Type Description
today_feedback String The number of feedback records today
all_feedback String The total number of feedback records
compared_with_yesterday_feedback String The number of today’s newly increased feedback records compared with yesterday

DevFault

Parameter 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 number of today’s newly failed devices compared with yesterday

Sample request

GET /v1.0/statistics-datas-survey?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%"
        }
    }
}

Count the number of daily registered users of the app

Description

Count the number of daily registered users of the app.

API address

GET /v1.0/apps/{schema}/users-active-datas

Request parameter

Parameter Type Parameter type Required Description
schema String URI Yes App schema
date_type String URL Yes The time format. Valid values:
  • day: day
  • week: week
  • weeks: two weeks
  • month: month

Return parameter

Parameter Type Description
code Integer See Global Error Codes.
success Boolean Indicates whether the operation is successful. Valid values:
  • true: succeeded
  • false: failed
msg String The message returned if the request fails. An empty value indicates a successful request.
result Object The returned result.

Result

Parameter Type Description
Date Integer The number of daily registered users of the app

Sample request

GET /v1.0/apps/smart/users-active-datas?date_type=week

Sample response

{
    "success": true,
    "t": 1544422545848,
    "result": [
        {
            "20181203": 3
        },
        {
            "20181204": 2
        },
        {
            "20181205": 2
        },
        {
            "20181206": 2
        },
        {
            "20181207": 4
        },
        {
            "20181208": 2
        },
        {
            "20181209": 0
        }
    ]
}

Count the number of daily active users of the app

Description

Count the number of daily active users of the app.

API address

GET /v1.0/apps/{schema}/users-live-datas

Request parameter

Parameter Type Parameter type Required Description
schema String URI Yes App schema
date_type String URL Yes The time format. Valid values:
  • day: day
  • week: week
  • weeks: two weeks
  • month: month

Return parameter

Parameter Type Description
code Integer See Global Error Codes.
success Boolean Indicates whether the operation is successful. Valid values:
  • true: succeeded
  • false: failed
msg String The message returned if the request fails. An empty value indicates a successful request.
result Object The returned result.

Result

Parameter Type Description
Date Integer The number of daily active users of the app

Sample request

GET /v1.0/apps/smart/users-live-datas?date_type=week

Sample response

{
    "success": true,
    "t": 1544426282187,
    "result": [
        {
            "20181203": 10
        },
        {
            "20181204": 15
        },
        {
            "20181205": 16
        },
        {
            "20181206": 13
        },
        {
            "20181207": 9
        },
        {
            "20181208": 9
        },
        {
            "20181209": 15
        }
    ]
}

Get an overview of app device data

Description

Get an overview of app device data.

API address

GET /v1.0/apps/{schema}/devices-survey

Request parameter

Parameter Type Parameter type Required Description
schema String URI Yes App schema

Return parameter

Parameter Type Description
code Integer See Global Error Codes.
success Boolean Indicates whether the operation is successful. Valid values:
  • true: succeeded
  • false: failed
msg String The message returned if the request fails. An empty value indicates a successful request.
result Object The returned result.

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

Result

Parameter Type Description
today_add String The number of devices activated today under the current app
yesterday_add String The number of devices activated yesterday under the current app
all_add String Total activated devices under the current app
today_live String The number of active devices today under the current app
yesterday_live String The number of active devices yesterday under the current app
compared_with_yesterday_add String The number of devices activated today compared with that of yesterday under the current app
compared_with_yesterday_live String The number of active devices today compared with that of yesterday under the current app

Sample request

GET /v1.0/apps/smart/devices-survey

Sample response

{
    "success": true,
    "t": 1545286492204,
    "result": {
        "all_add": "7914",
        "compared_with_yesterday_live": "-30.00%",
        "yesterday_add": "0",
        "today_add": "0",
        "compared_with_yesterday_add": "0.00%",
        "yesterday_live": "14",
        "today_live": "7"
    }
}

Get an overview of the devices

Description

Get an overview of the devices.

API address

GET /v1.0/devices/datas-survey

Request parameter

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

Return parameter

Parameter Type Description
code Integer See Global Error Codes.
success Boolean Indicates whether the operation is successful. Valid values:
  • true: succeeded
  • false: failed
msg String The message returned if the request fails. An empty value indicates a successful request.
result Object The returned result.

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

Result

Parameter Type Description
dev_active Object Overview of activated device data
dev_fault Object Overview of device faults
dev_live Object Overview of active device data

DevActive

Parameter Type Description
today_active String The number of devices activated today
yesterday_active String The number of devices activated yesterday
all_activate String Total activated devices
near7_day_active String The number of devices activated in the last seven days
last7_day_active String The number of devices activated within the seven days starting from 14 days ago.
compared_with_yesterday_active String The difference between the number of devices activated today and that of yesterday

DevFault

Parameter 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 number of failed devices today compared with that of yesterday

DevLive

Parameter 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 in the last seven days
last7_day_live String The number of devices active within the seven days starting from 14 days ago
compared_with_yesterday_live String The number of today’s newly active devices compared with yesterday
rate_of_today_live String The number of active devices today divided by cumulative active devices

Sample request

GET /v1.0/devices/datas-survey?product_id=1234

Sample response

{
    "success": true,
    "t": 1545282358411,
    "result": {
        "dev_live": {
            "compared_with_yesterday_live": "1.02%",
            "today_live": "99",
            "yesterday_live": "102",
            "rate_of_today_live": "1.89%"
        },
        "dev_active": {
            "today_active": "0",
            "all_activate": "5237",
            "yesterday_active": "0",
            "compared_with_yesterday_active": "0.00%"
        }
    }
}

Get regional distribution data of active devices

Description

Get regional distribution data of active devices.

API address

GET /v1.0/devices/locations-live-datas

Request parameter

Parameter Type Parameter type Required Description
date_type String URL Yes The time format. Valid values:
  • day: day
  • week: week
  • weeks: two weeks
  • month: month
type String URL Yes
  • province: province
  • city: city
limit Integer URL Yes The returned result. The limit. Valid values: (0, 100].
productId String URL No The product ID. If you do not set this parameter, all your product IDs will be returned.

Return parameter

Parameter Type Description
code Integer See Global Error Codes.
success Boolean Indicates whether the operation is successful. Valid values:
  • true: succeeded
  • false: failed
msg String The message returned if the request fails. An empty value indicates a successful request.
result Object The returned result.

Result

Parameter Type Description
percentage String The number of active devices in the region divided by the total number of active devices
name String The name of the region
value Integer The number of active devices in the region

Sample request

GET /v1.0/devices/locations-live-datas?date_type=week&productId=123&type=province&limit=3

Sample response

{
    "success": true,
    "t": 1544413487580,
    "result": [
        {
            "percentage": "32.31%",
            "name": "Others",
            "value": 42
        },
        {
            "percentage": "8.46%",
            "name": "Taipei",
            "value": 11
        },
        {
            "percentage": "6.92%",
            "name": "Beijing",
            "value": 9
        }
    ]
}

Get detailed regional distribution data of activated devices

Description

Get detailed regional distribution data of activated devices.

API address

GET /v1.0/devices/locations-active-datas

Request parameter

Parameter Type Parameter type Required Description
date_type String URL Yes The time format. Valid values:
  • day: day
  • week: week
  • weeks: two weeks
  • month: month
type String URL Yes Valid values:
  • country: country (only available outside of China)
  • `province`: province
  • `city`: city
  • | | limit | Integer | URL | Yes | The returned result. The limit. Valid values: (0, 100]. | | productId | String | URL | No | The product ID. If you do not set this parameter, all your product IDs will be returned. |

    Return parameter

    Parameter Type Description
    code Integer See Global Error Codes.
    success Boolean Indicates whether the operation is successful. Valid values:
    • true: succeeded
    • false: failed
    msg String The message returned if the request fails. An empty value indicates a successful request.
    result Object The returned result.

    Result

    Parameter Type Description
    percentage String Regional activations divided by total activations
    name String The name of the region
    value Integer The total number of activated devices in the region

    Sample request

    GET /v1.0/devices/locations-active-datas?date_type=week&productId=123&type=province&limit=3
    

    Sample response

    {
        "success": true,
        "t": 1544411872724,
        "result": [
            {
                "percentage": "25.00%",
                "name": "Hunan Province",
                "value": 2
            },
            {
                "percentage": "25.00%",
                "name": "Others",
                "value": 2
            }
        ]
    }
    

    Count the number of daily active devices

    Description

    Count the number of daily active devices.

    API address

    GET /v1.0/devices/live-datas
    

    Request parameter

    Parameter Type Parameter type Required Description
    date_type String URL Yes The time format. Valid values:
    • day: day
    • week: week
    • weeks: two weeks
    • month: month
    product_id String URL No The product ID. If you do not set the parameter, all your product IDs will be returned.

    Return parameter

    Parameter Type Description
    code Integer See Global Error Codes.
    success Boolean Indicates whether the operation is successful. Valid values:
    • true: succeeded
    • false: failed
    msg String The message returned if the request fails. An empty value indicates a successful request.
    result Object The returned result.

    Result

    Parameter Type Description
    Date Integer The number of active devices today

    Sample request

    GET /v1.0/devices/live-datas?date_type=week&product_id=123
    

    Sample response

    {
        "success": true,
        "t": 1544411339830,
        "result": [
            {
                "20181203": 106
            },
            {
                "20181204": 107
            },
            {
                "20181205": 109
            },
            {
                "20181206": 105
            },
            {
                "20181207": 106
            },
            {
                "20181208": 108
            },
            {
                "20181209": 132
            }
        ]
    }
    

    Count the number of daily activated devices

    Description

    Count the number of daily activated devices.

    API address

    GET /v1.0/devices/active-datas
    

    Request parameter

    Parameter Type Parameter type Required Description
    date_type String URL Yes The time format. Valid values:
    • day: day
    • week: week
    • weeks: two weeks
    • month: month
    product_id String URL No The product ID. If you do not set the parameter, all your product IDs will be returned.

    Return parameter

    Parameter Type Description
    code Integer See Global Error Codes.
    success Boolean Indicates whether the operation is successful.
    • true: succeeded
    • false: failed
    msg String The message returned if the request fails. An empty value indicates a successful request.
    result Object The returned result.

    Result

    Parameter Type Description
    Date Integer The number of devices activated today

    Sample request

    POST /v1.0/devices/active-datas?date_type=week&product_id=123
    

    Sample response

    {
        "success": true,
        "t": 1544410649442,
        "result": [
            {
                "20181203": 0
            },
            {
                "20181204": 3
            },
            {
                "20181205": 1
            },
            {
                "20181206": 0
            },
            {
                "20181207": 1
            },
            {
                "20181208": 2
            },
            {
                "20181209": 2
            }
        ]
    }
    

    Count the data of cumulative daily activated devices

    Description

    Count the data of cumulative daily activated devices.

    API address

    GET /v1.0/devices/accumulate-active-datas
    

    Request parameter

    Parameter Type Parameter type Required Description
    date_type String URL Yes The time format. Valid values:
    • day: day
    • week: week
    • weeks: two weeks
    • month: month
    product_id String URL No The product ID. If you do not set the parameter, all your product IDs will be returned.

    Return parameter

    Parameter Type Description
    code Integer See Global Error Codes.
    success Boolean Indicates whether the operation is successful. Valid values:
    • true: succeeded
    • false: failed
    msg String The message returned if the request fails. An empty value indicates a successful request.
    result Object The returned result.

    Result

    Parameter Type Description
    Date Integer The number of devices activated today

    Sample request

    GET /v1.0/devices/accumulate-active-datas?date_type=week&product_id=123  
    

    Sample response

    {
        "success": true,
        "t": 1544409913646,
        "result": [
            {
                "20181203": 5770
            },
            {
                "20181204": 5773
            },
            {
                "20181205": 5774
            },
            {
                "20181206": 5774
            },
            {
                "20181207": 5775
            },
            {
                "20181208": 5777
            },
            {
                "20181209": 5778
            }
        ]
    }
    

    Get an overview of active device data

    Description

    Get an overview of active device data.

    API address

    GET /v1.0/devices/live-datas-survey
    

    Request parameter

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

    Return parameter

    Parameter Type Description
    code Integer See Global Error Codes.
    success Boolean Indicates whether the operation is successful. Valid values:
    • true: succeeded
    • false: failed
    msg String The message returned if the request fails. An empty value indicates a successful request.
    result Object The returned result.

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

    Result

    Parameter 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 in the last seven days
    last7_day_live String The number of devices active within the seven days starting from 14 days ago
    compared_with_yesterday_live String The number of today’s active devices compared with yesterday
    rate_of_today_live String The number of active devices today divided by cumulative active devices

    Sample request

    GET /v1.0/devices/live-datas-survey?product_id=123
    

    Sample response

    {
        "success": true,
        "t": 1545278810104,
        "result": {
            "near7_day_live": "108",
            "last7_day_live": "129",
            "today_live": "99",
            "yesterday_live": "102",
            "rate_of_today_live": "1.89%"
        }
    }
    

    Get an overview of activated device data

    Description

    Get an overview of activated device data.

    API address

    GET /v1.0/devices/active-datas-survey
    

    Request parameter

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

    Return parameter

    Parameter Type Description
    code Integer See Global Error Codes.
    success Boolean Indicates whether the operation is successful. Valid values:
    • true: succeeded
    • false: failed
    msg String The message returned if the request fails. An empty value indicates a successful request.
    result Object The returned result.

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

    Result

    Parameter Type Description
    today_active String The number of devices activated today
    yesterday_active String The number of devices activated yesterday
    all_activate String Total activated devices
    near7_day_active String The number of devices activated in the last seven days
    last7_day_active String The number of devices activated within the seven days starting from 14 days ago
    compared_with_yesterday_active String The difference between the number of devices activated today and that of yesterday

    Sample request

    GET /v1.0/devices/active-datas-survey?product_id=123
    

    Sample response

    {
        "success": true,
        "t": 1545278901275,
        "result": {
            "today_active": "0",
            "last7_day_active": "8",
            "all_activate": "5237",
            "near7_day_active": "2",
            "yesterday_active": "0"
        }
    }