Custom Fields - Selection returns array in REST API? #12418
Replies: 4 comments 3 replies
-
It works for me with Netbox 3.4.10, for example:
|
Beta Was this translation helpful? Give feedback.
-
I'm running 3.4.6 currently. Here is the definition...
|
Beta Was this translation helpful? Give feedback.
-
On an object returned via the REST API:
|
Beta Was this translation helpful? Give feedback.
-
It is quite possible that the field type was changed. I noticed mention of that new restriction on the releases page as well. Given that, I expect this is a non-issue. Thanks for the tip on using an Object->Cluster field... the only drawback there is I can't do a filter like /api/ipam/prefixes/?cf_vcenter_cluster_ipam=name and have to use the object ID of the cluster instead of the name... unless I'm missing something? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a Custom Field of type Selection (with comma-separated choice strings). When I query an object that uses the custom field with one of the values, the field is actually returned in the JSON as an array instead of a simple string. Is this the expected behavior? This behavior makes it so I can't filter using this custom field with .../?cf_my_custom_field=stringchoice.
Beta Was this translation helpful? Give feedback.
All reactions