Closed
Description
When running the following function:
package main
import (
"context"
"log"
"os"
"github.com/netbox-community/go-netbox/v4"
)
func main() {
ctx := context.Background()
client := netbox.NewAPIClientFor("https://netbox.zro.gcp.tempus.cloud", os.Getenv("NETBOX_API_TOKEN"))
prefixList, resp, err := client.IpamAPI.IpamPrefixesList(ctx).Execute()
if err != nil {
log.Printf("Num returned: %d", len(prefixList.Results))
log.Printf("HTTP RESP: %v", resp)
log.Fatalf("Failed to get prefixes: %v", err)
}
}
I'm seeing results where:
preflxList
has no results- RESP is a
200
return with the expected prefix outputs in the JSON body - The value of the
err
returned is: no value given for required property prefix_count
Netbox version being run: v4.0.3
Based on the value of the response, I gather this is an issue with the parsing of this request, rather than an actual API issue.
Metadata
Metadata
Assignees
Labels
No labels