Hi Team, We are having an issue with our dashboard...
# gooddata-cloud
m
Hi Team, We are having an issue with our dashboards on one of our workspaces- where, when posted via API, the whole page disappears. The dashboards still exist when accessed via API call but we cannot view them in the browser.
m
Hello Maria, sorry to hear about the troubles. Are you getting any errors when trying to access the dashboard via the UI? If so, could you please send it over here? I will check the logs and report back to you.
m
Yes the issue is with the UI since the dashboard exists when accessed via API call I will send it to you
m
For future reference, let me add my findings here. Currently it is a known issue that empty insights (insights without at least one attribute or fact) will break dashboards they are included in, however, the issue was caused by something else as well. The filter context on the layout of one of your dashboards was empty, it looked as follow:
Copy code
"data": {
    "id": "1bacc1a7-5222-42d5-8a00-606a2b71498a",
    "type": "filterContext",
    "attributes": {
      "title": "filterContext",
      "description": "",
      "content": {
        "filters": [
          {

          }
        ],
        "version": "2"
      }
    }
It should look like this instead:
Copy code
{
  "data": {
    "id": "d8b18317-d29f-4ab0-b30c-66400c16d4f0",
    "type": "filterContext",
    "attributes": {
      "title": "filterContext",
      "description": "",
      "content": {
        "filters": [
          {
            "dateFilter": {
              "granularity": "GDC.time.month",
              "type": "relative",
              "from": 0,
              "to": 0
            }
          }
        ],
        "version": "2"
      }
    }
The issue with the other dashboard was caused by the incorrect syntax in the filter context:
Copy code
{
  "data": {
    "id": "e0caeeb6-22fa-4a89-8c02-3316265e2aa5",
    "type": "filterContext",
    "attributes": {
      "title": "filterContext",
      "description": "",
      "content": {
        "filters": [
          {
            "dateFilter": {
              "granularity": "GDC.time.year",
              "type": "relative",
              "from": 0,
              "to": 0
            }
          },
          {

          }
        ],
        "version": "2"
      }
    }
Notice the extra '{}'
I recommend checking the correct definition for this object in our apiary here: https://www.gooddata.com/docs/cloud/api-and-sdk/api/api_reference_all/#operation/createEntity@FilterContexts
Lastly, I have submitted an internal ticket to look into avoiding this scenario in the future, hopefully the incorrect syntax or empty definition will be validated before it makes it to the dashboard. Thank you for bringing this to our attention!