Skip to content

New Dashboard API to return list of all configured dashboard for a given user #3913

@tsteur

Description

@tsteur

I need an API to get configured dashboards for Piwik Mobile 2.

It's already implemented and will attach a diff soon. I'm not sure if I broke something because there are no tests. I think I've also fixed some issues in getAllDashboards. Just do a quick review please and I will send a pull request then. The diff will add three API methods getDashboards, getUserDashboards and getDefaultDashboard.

Structure will look like this (one entry per dashboard).

[
  {
    "name": "Dashboard",
    "widgets": [
      {
        "module": "VisitsSummary",
        "action": "getEvolutionGraph"
      },
      {
        "module": "Live",
        "action": "widget"
      },
      {
        "module": "VisitorInterest",
        "action": "getNumberOfVisitsPerVisitDuration"
      },
      {
        "module": "CoreHome",
        "action": "getPromoVideo"
      },
      {
        "module": "Referers",
        "action": "getKeywords"
      },
      {
        "module": "Referers",
        "action": "getWebsites"
      },
      {
        "module": "UserCountryMap",
        "action": "visitorMap"
      },
      {
        "module": "UserSettings",
        "action": "getBrowser"
      },
      {
        "module": "Referers",
        "action": "getSearchEngines"
      },
      {
        "module": "VisitTime",
        "action": "getVisitInformationPerServerTime"
      },
      {
        "module": "ExampleRssWidget",
        "action": "rssPiwik"
      }
    ]
  }
]

The structure is simple because I don't need more yet but we can still extend it later and add for example things like "layout": "33-33-33"

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementFor new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions