Skip to content

error exporting multiple Nativedashboards #166

@bryanster

Description

@bryanster

hallo,
while creating an export script for the native dashboards I encountered an invalid argument api error
this occurs when trying to export multiple dashboards at once using below script:

dashboard_names = []

dashboard_list = chronicle.list_dashboards(page_size=10)
for dashboard in dashboard_list.get("nativeDashboards", []):
    dashboard_names.append(dashboard.get("name"))

print(
    chronicle.export_dashboard(
        dashboard_names=dashboard_names,
    )
) 

error

secops.exceptions.APIError: Failed to export dashboards: Status 400, Response: {
  "error": {
    "code": 400,
    "message": "error exporting Native Dashboards",
    "status": "INVALID_ARGUMENT"
  }
}

also tried with 2 instead of 10 same result.

when changing the page size to 1 it does work

dashboard_names = []

dashboard_list = chronicle.list_dashboards(page_size=1)
for dashboard in dashboard_list.get("nativeDashboards", []):
    dashboard_names.append(dashboard.get("name"))

print(
    chronicle.export_dashboard(
        dashboard_names=dashboard_names,
    )
)

auth method is adc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions