Skip to content

Dashboards

Get IDs of your dashboards from the Dashboard page

GET /project/dashboards

This method allows to obtain IDs of your dashboards from the Dashboard page.

For instatance, several widgets are presented on the Mai" tab and all together they make up one dashboard. Thus, you can get its ID with this API method.

curl 'https://cloud.roistat.com/api/v1/project/dashboards?project=12345' \
    --request GET \
    --header 'Content-type: application/json' \ 
    --header 'Api-key: {KEY}'

No parameters.

Query String:

Parameter Type Description Required
project string Project number yes

Request Body:

No parameters.

Parameter Type Description
dashboards array[object]
id string Dashboard ID
title string A human-readable dashboard name
status string

Get widget parameters for specific dashboards

GET /project/dashboards/{dashboardId}/widgets

Used to obtain widget parameters for specific dashboards.

curl 'https://cloud.roistat.com/api/v1/project/dashboards/{dashboardId}/widgets?project=12345' \
    --request GET \
    --header 'Content-type: application/json' \ 
    --header 'Api-key: {KEY}'
{
    "widgets": [
        {
            "widgetId": "Orders",
            "placementData": {
                "height": "3",
                "width": "3",
                "order": 101
            },
            "outputSettings": {
                "displayName": "Leads",
                "systemName": "metricaSummary",
                "iconName": "fa-shopping-cart",
                "color": "#43b6f1"
            }
        },
        {
            "widgetId": "Visits",
            "placementData": {
                "height": "3",
                "width": "3",
                "order": 100
            },
            "outputSettings": {
                "displayName": "Visits",
                "systemName": "metricaSummary",
                "iconName": "fa-user",
                "color": "#f2deae"
            }
        },
        {
            "widgetId": "OrdersPaid",
            "placementData": {
                "height": "3",
                "width": "3",
                "order": 102
            },
            "outputSettings": {
                "displayName": "Sales",
                "systemName": "metricaSummary",
                "iconName": "fa-shopping-bag",
                "color": "#aed881"
            }
        },
        {
            "widgetId": "OrdersPrice",
            "placementData": {
                "height": "3",
                "width": "3",
                "order": 103
            },
            "outputSettings": {
                "displayName": "Revenue",
                "systemName": "metricaSummary",
                "iconName": "fa-line-chart",
                "color": "#00b494",
                "currency": "RUB"
            }
        },
        {
            "widgetId": "Diagrams",
            "placementData": {
                "height": "5",
                "width": "7",
                "order": 104
            },
            "outputSettings": {
                "feeds": [
                    {
                        "displayName": "Visits",
                        "systemName": "visits"
                    },
                    {
                        "displayName": "Leads",
                        "systemName": "orders"
                    },
                    {
                        "displayName": "Sales",
                        "systemName": "ordersPaid"
                    },
                    {
                        "displayName": "Revenue",
                        "systemName": "ordersPrice"
                    },
                    {
                        "displayName": "Cost",
                        "systemName": "visitsCost"
                    }
                ],
                "systemName": "diagrams",
                "displayName": "Popular channels in 2 weeks"
            }
        },
        {
            "widgetId": "MetricSummaryGroups",
            "placementData": {
                "height": "5",
                "width": "5",
                "order": 105
            },
            "outputSettings": {
                "feeds": [
                    {
                        "displayName": "CPC",
                        "description": "Cost of a click",
                        "systemName": "visitCPC",
                        "valueType": "currency",
                        "currency": "RUB",
                        "colorLow": "#529d01",
                        "colorHigh": "#e0571a"
                    },
                    {
                        "displayName": "Conversion to leads",
                        "description": "Conversion from visits to leads",
                        "systemName": "visitOrderConversion",
                        "valueType": "percent",
                        "colorLow": "#e0571a",
                        "colorHigh": "#529d01"
                    },
                    {
                        "displayName": "CPL",
                        "description": "Cost of a lead",
                        "systemName": "CPL",
                        "valueType": "currency",
                        "currency": "RUB",
                        "colorLow": "#529d01",
                        "colorHigh": "#e0571a"
                    },
                    {
                        "displayName": "Conversion to sales",
                        "description": "The conversion from leads to sales",
                        "systemName": "orderConversion",
                        "valueType": "percent",
                        "colorLow": "#e0571a",
                        "colorHigh": "#529d01"
                    },
                    {
                        "displayName": "CPO",
                        "description": "Cost of a sale",
                        "systemName": "CPO",
                        "valueType": "currency",
                        "currency": "RUB",
                        "colorLow": "#529d01",
                        "colorHigh": "#e0571a"
                    },
                    {
                        "displayName": "Average revenue",
                        "description": "Average sales revenue",
                        "systemName": "ordersPriceAvg",
                        "valueType": "currency",
                        "currency": "RUB",
                        "colorLow": "#e0571a",
                        "colorHigh": "#529d01"
                    },
                    {
                        "displayName": "ROI",
                        "description": "Payback period",
                        "systemName": "ROI",
                        "valueType": "percent",
                        "colorLow": "#e0571a",
                        "colorHigh": "#529d01"
                    }
                ],
                "systemName": "metrics_summary_group"
            }
        }
    ],
    "status": "success"
}

Query String:

Parameter Type Description Required
project string Project number yes

Request Body:

No parameters.

Parameter Type Description
widgets array[object]
widgetId string Widget ID
placementData object Parameters of widget layout on a page
>> height string
>> width string
>> order integer
outputSettings object Parameters of widget data display
>> displayName string A human-readable widget or metric name
>> systemName string Widget's or metric's system name
>> iconName string Widget icon system name
>> color string Widget text color
>> currency string Metric's currency
>> feeds array[object] Display parameters for the "Popular channels in 2 weeks" and "Metrics table" widgets
>>> displayName string A human-readable metric name
>>> description string Short metric description in the "Metrics table" widget
>>> systemName string Metric's system name
>>> valueType string Metric value type: percent or currency
>>> currency string Metric's currency for the parameter valueType = currency
>>> colorLow string Color of the text of metrics' description in the "Metrics table"
>>> colorHigh string Color of the text of metric names in the "Metrics table"
status string