Problem with copy_saved_objects API

Hello!
I'm using copy_saved_objects Kibana API to copy dashboards between spaces with 8.17 version.
The visualizations in the new dashboard works fine, but the controls doesn't work and show me "No options found". Apparently, the data view is not set correctly in the copy.
Do you know why this can happen?

Hi @Federico_Ruso,

Can you share the API call you are initiating and the response you receive?

Let us know!

I face the same problem,

API Call:
Post -> {{kibanaURL}}/api/spaces/_copy_saved_objects

{
    "objects": [
        {
            "type": "dashboard",
            "id": "1274919f-ed1f-42c6-829c-fa431b8a33a1"
        }
    ],
    "spaces": [
        "demonew"
    ],
    "includeReferences": true,
    "createNewCopies": true
}

Response:

{
    "demonew": {
        "success": true,
        "successCount": 2,
        "successResults": [
            {
                "type": "index-pattern",
                "id": "7c7873e3-8ac7-45b8-9f55-4ce19b9524a4",
                "meta": {
                    "title": "default_elastic_service_requests",
                    "icon": "indexPatternApp"
                },
                "managed": false,
                "destinationId": "307e7e80-8bd0-43ed-b779-d00b8426ec14"
            },
            {
                "type": "dashboard",
                "id": "1274919f-ed1f-42c6-829c-fa431b8a33a1",
                "meta": {
                    "title": "Service Requests Dashboard",
                    "icon": "dashboardApp"
                },
                "managed": false,
                "destinationId": "906421e5-8d84-4245-828d-7aa1205800f6"
            }
        ]
    }
}

Options are not listed for the controls:

Current Kibana Version: 8.17.4 upgraded from 8.13.2 recently, the same process worked for 8.13.2 without a problem. Dashboard was created on version 8.13.2 i don't know if it could be a factor.

Welcome @tfatih. Thanks for giving more details. Having had a quick look at the GitHub repo it looks like you might be seeing this issue. Does this look to match what you're seeing?

I see a note from one of our engineers that we believe this should be released in 8.17.5 or 8.18.0 which are almost here. I would recommend hanging tight and upgrading when you can and see if that solves the issue.

Hope that helps!

I upgraded to version 8.17.5. To resolve the issue, I had to delete the controls from the source dashboard and re-add them—otherwise, the same problem persisted.

After copying the dashboard via the API, the controls on the destination dashboard are now working correctly.