-
In earlier versions of NetBox, probably before the major API change, data types were "string" which seemed normal. In the latest version such as the demo site, at https://demo.netbox.dev/api/schema/swagger-ui/#/ipam/ipam_ip_addresses_list most of the data types are now "array[string]" which does not seem right to me. Does anyone know if this is intentional or a bug? Can open an issue if it's really a bug. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Those are query parameters, and I'd say it's correct that they are e.g. SInce query parameters can be repeated, most libraries represent them as arrays, for example python's own parse_qs:
Or in the opposite direction:
|
Beta Was this translation helpful? Give feedback.
Those are query parameters, and I'd say it's correct that they are
array[]
because they can have repeated values.e.g.
/api/ipam/ip-addresses/?device_id=1&device_id=2
shows all IP addresses which are attached to device_id 1 or device_id 2. Querying?tag=foo&tag=bar
shows all those with tagfoo
and tagbar
. Info here.SInce query parameters can be repeated, most libraries represent them as arrays, for example python's own parse_qs:
Or in the opposite direction: