API-created dashboard not rendering in kibana

Hello!
I need help because Kibana is not rendering a dashboard that I created via API, in particular the saved_objects functions.
I generated the JSON via a Python API that i wrote myself, but after saving all the visualization and the dashboard in Kibana, I can insepct the visualizations via the saved object tool, but when i try to open the dashboard, kibana freezes and crashes.

those are my logs from kibana cli

those are the dashboard JSON lines

        [
      {
        "gridData": {
          "x": "0",
          "y": "0",
          "w": "48",
          "h": "15",
          "i": "df0b7aa8-a371-4e18-a612-9cfb21becd97"
        },
        "version": "7.10.0",
        "panelIndex": "df0b7aa8-a371-4e18-a612-9cfb21becd97",
        "title": "Viz5",
        "embeddableConfig": {
          "title": "Viz5"
        },
        "panelRefName": "panel_0"
      },
      {
        "gridData": {
          "x": "0",
          "y": "15",
          "w": "48",
          "h": "15",
          "i": "65528f16-1999-4ce1-8f49-d13e8adb9599"
        },
        "version": "7.10.0",
        "panelIndex": "65528f16-1999-4ce1-8f49-d13e8adb9599",
        "title": "Viz4",
        "embeddableConfig": {
          "title": "Viz4"
        },
        "panelRefName": "panel_1"
      },
      {
        "gridData": {
          "x": "0",
          "y": "30",
          "w": "48",
          "h": "10",
          "i": "df95bffc-a3fb-417f-8542-0f3e0474b24c"
        },
        "version": "7.10.0",
        "panelIndex": "df95bffc-a3fb-417f-8542-0f3e0474b24c",
        "title": "Viz2",
        "embeddableConfig": {
          "title": "Viz2"
        },
        "panelRefName": "panel_2"
      },
      {
        "gridData": {
          "x": "0",
          "y": "40",
          "w": "24",
          "h": "5",
          "i": "728bdab5-5a6d-4320-a400-6feda67d9888"
        },
        "version": "7.10.0",
        "panelIndex": "728bdab5-5a6d-4320-a400-6feda67d9888",
        "title": "Viz1",
        "embeddableConfig": {
          "title": "Viz1"
        },
        "panelRefName": "panel_3"
      },
      {
        "gridData": {
          "x": "24",
          "y": "40",
          "w": "24",
          "h": "5",
          "i": "02f411b8-c73a-4684-b1af-b11f8845e223"
        },
        "version": "7.10.0",
        "panelIndex": "02f411b8-c73a-4684-b1af-b11f8845e223",
        "title": "Viz2",
        "embeddableConfig": {
          "title": "Viz2"
        },
        "panelRefName": "panel_4"
      },
      {
        "gridData": {
          "x": "0",
          "y": "45",
          "w": "48",
          "h": "10",
          "i": "542bb5f1-dcca-4437-b728-8f6c05bac552"
        },
        "version": "7.10.0",
        "panelIndex": "542bb5f1-dcca-4437-b728-8f6c05bac552",
        "title": "Viz5",
        "embeddableConfig": {
          "title": "Viz5"
        },
        "panelRefName": "panel_5"
      },
      {
        "gridData": {
          "x": "0",
          "y": "55",
          "w": "24",
          "h": "5",
          "i": "2768f27e-3c8e-4ee2-ab20-60a1b6a9da9f"
        },
        "version": "7.10.0",
        "panelIndex": "2768f27e-3c8e-4ee2-ab20-60a1b6a9da9f",
        "title": "Viz3",
        "embeddableConfig": {
          "title": "Viz3"
        },
        "panelRefName": "panel_6"
      },
      {
        "gridData": {
          "x": "24",
          "y": "55",
          "w": "24",
          "h": "5",
          "i": "8b5c7991-f1e4-4963-b04d-0f8a156914f5"
        },
        "version": "7.10.0",
        "panelIndex": "8b5c7991-f1e4-4963-b04d-0f8a156914f5",
        "title": "Viz6",
        "embeddableConfig": {
          "title": "Viz6"
        },
        "panelRefName": "panel_7"
      },
      {
        "gridData": {
          "x": "0",
          "y": "60",
          "w": "48",
          "h": "10",
          "i": "140542cc-8cd3-4bdd-b031-e287cb926a6a"
        },
        "version": "7.10.0",
        "panelIndex": "140542cc-8cd3-4bdd-b031-e287cb926a6a",
        "title": "Viz4",
        "embeddableConfig": {
          "title": "Viz4"
        },
        "panelRefName": "panel_8"
      },
      {
        "gridData": {
          "x": "0",
          "y": "70",
          "w": "24",
          "h": "5",
          "i": "41e90d9a-a282-4c9c-a0e2-ef58ddbb562c"
        },
        "version": "7.10.0",
        "panelIndex": "41e90d9a-a282-4c9c-a0e2-ef58ddbb562c",
        "title": "Viz7",
        "embeddableConfig": {
          "title": "Viz7"
        },
        "panelRefName": "panel_9"
      },
      {
        "gridData": {
          "x": "24",
          "y": "70",
          "w": "24",
          "h": "5",
          "i": "3b82d6c7-4c73-4455-905d-6d78cbbe5625"
        },
        "version": "7.10.0",
        "panelIndex": "3b82d6c7-4c73-4455-905d-6d78cbbe5625",
        "title": "Viz8",
        "embeddableConfig": {
          "title": "Viz8"
        },
        "panelRefName": "panel_10"
      }
    ]

those are the references

    [
      {
        "name": "panel_0",
        "id": "d66ec5ec-a9b2-11eb-a6e4-e2b55fe817cb",
        "type": "visualization"
      },
      {
        "name": "panel_1",
        "id": "d66f3252-a9b2-11eb-a6e4-e2b55fe817cb",
        "type": "visualization"
      },
      {
        "name": "panel_2",
        "id": "d66f9f8a-a9b2-11eb-a6e4-e2b55fe817cb",
        "type": "visualization"
      },
      {
        "name": "panel_3",
        "id": "d66fe292-a9b2-11eb-a6e4-e2b55fe817cb",
        "type": "visualization"
      },
      {
        "name": "panel_4",
        "id": "d6702586-a9b2-11eb-a6e4-e2b55fe817cb",
        "type": "visualization"
      },
      {
        "name": "panel_5",
        "id": "d670b1c2-a9b2-11eb-a6e4-e2b55fe817cb",
        "type": "visualization"
      },
      {
        "name": "panel_6",
        "id": "d67110c2-a9b2-11eb-a6e4-e2b55fe817cb",
        "type": "visualization"
      },
      {
        "name": "panel_7",
        "id": "d6715cda-a9b2-11eb-a6e4-e2b55fe817cb",
        "type": "visualization"
      },
      {
        "name": "panel_8",
        "id": "d671c9fe-a9b2-11eb-a6e4-e2b55fe817cb",
        "type": "visualization"
      },
      {
        "name": "panel_9",
        "id": "d67217c4-a9b2-11eb-a6e4-e2b55fe817cb",
        "type": "visualization"
      },
      {
        "name": "panel_10",
        "id": "d6725d56-a9b2-11eb-a6e4-e2b55fe817cb",
        "type": "visualization"
      }
    ]

Thank you in advance

This use case is not supported.
SavedObjects are not validated when you create them via API. Likely, in this case, their shape is out of sync with dashboard SO type. Most likely in future versions of the Kibana, it will not be possible to create SO directly via SavedObjects API, but plugins (like dashboard) are going to provide domain-specific HTTP API instead.

Thank you for your answer,
yes I know that the validation is not provided for the items saved via saved_objects, in fact I found the solution to my problem and it was a JSON problem related to the gridData parameter of the dashboard
Thank You!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.