meraki / dashboard-api-go

Dashboard API for Golang
MIT License
19 stars 7 forks source link

400 Bad Request when passing in an array value. #19

Open i3149 opened 10 months ago

i3149 commented 10 months ago

Describe the bug I'm trying to use this endpoint: https://developer.cisco.com/meraki/api-v1/get-organization-appliance-vpn-statuses/

The docs show I can pass an array of network ids in to limit the data returned. When I try this, I get the following error:

{{"errors":["'networkIds' must be an array"]}}

To Reproduce

        networks := []string{"N_12345678"}
        resp, r, err := apiClient.StatusesApi.GetOrganizationApplianceVpnStatuses(context.Background(), org.ID).NetworkIds(networks).Execute()
        if err != nil {
            log.Infof("Error when calling `StatusesApi.GetOrganizationApplianceVpnStatuses``: %v\n", err)
            log.Infof("Full HTTP response: %v\n", r)
        }
        log.Infof("Response from `StatusesApi.GetOrganizationApplianceVpnStatuses`: %v\n", resp)

The above code for me always errors out. Removing the network parameter works well.

Expected behavior I would expect a valid http request and filtered results returned.