This QueryDict instance is immutable #13217
-
NetBox versionv3.5.6 Python version3.10 Steps to ReproduceTrying to get available-ips using the below curl call
We get the following error
Expected BehaviorTo get the list of IP addresses available Observed Behavior
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
Please review your API call as it does not comply with the requirements: https://demo.netbox.dev/api/schema/swagger-ui/#/ipam/ipam_prefixes_available_ips_create There are a few issues here:
|
Beta Was this translation helpful? Give feedback.
-
If you want to "get the list of IP addresses available" then you need to make a GET request, not a POST request - and it works fine for me. There is no need to provide the body parameter |
Beta Was this translation helpful? Give feedback.
-
I just want to be clear, that IP Address objects can have the real netmask associated and don't need to be created with /32, you can tell they are a single address because they are an ip-address and not a prefix, to make templating of resulting configs easier as you don't need to look up the containing prefix to get the mask (might still need it to get the gateway if it isn't something you can assume by convention in your templates).
So you'd create a record for { "address": "10.12.254.6/24" } and not 10.12.254.6/32 unless you really wanted to strip this context from ip-address records (eg. I don't worry about netmask for VIPs/Anycast ip-address records)
—
Mark Tinberg ***@***.***>
Division of Information Technology-Network Services
University of Wisconsin-Madison
…________________________________
From: carthique ***@***.***>
Sent: Wednesday, July 19, 2023 10:57 AM
To: netbox-community/netbox ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [netbox-community/netbox] This QueryDict instance is immutable (Discussion #13217)
Yeah, for picking the ip, i need it to me atomic op as there could be multiple requests coming in at the same time. Let me try out the post call with auth header and see if it returns a /32. I am able to get this done using the pynetbox library. Want the API version of the same. I really appreciate all the help I am getting here. Thanks
—
Reply to this email directly, view it on GitHub<#13217 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAS7UM6IJPGSAHSWDMZFSATXQ77VLANCNFSM6AAAAAA2QCQZGQ>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Please review your API call as it does not comply with the requirements: https://demo.netbox.dev/api/schema/swagger-ui/#/ipam/ipam_prefixes_available_ips_create
There are a few issues here: