API device name issue with hyphen #1539

Closed
opened 2025-12-29 16:32:47 +01:00 by adam · 2 comments
Owner

Originally created by @cslingerland on GitHub (Feb 6, 2018).

Issue type

[ ] Feature request
[ x] Bug report
[ ] Documentation

Environment

  • Python version: 3.6.4
  • NetBox version: <2.2.8

Description

Unable to find devices by name in API when they have hyphen
For example: "server-1" cannot be found with the following URL:
/api/dcim/devices/?name=server-1

Originally created by @cslingerland on GitHub (Feb 6, 2018). ### Issue type [ ] Feature request <!-- An enhancement of existing functionality --> [ x] Bug report <!-- Unexpected or erroneous behavior --> [ ] Documentation <!-- A modification to the documentation --> ### Environment * Python version: 3.6.4 * NetBox version: <2.2.8 ### Description Unable to find devices by name in API when they have hyphen For example: "server-1" cannot be found with the following URL: /api/dcim/devices/?name=server-1
adam closed this issue 2025-12-29 16:32:47 +01:00
Author
Owner

@jeremystretch commented on GitHub (Feb 6, 2018):

Not able to replicate this on v2.2.9. Three things:

  1. Try upgrading to the latest stable release (v2.2.9).
  2. Make sure you're matching the exact name (use ?q= for searching).
  3. Maybe a hyphen got replaced with an en-dash or em-dash somewhere?
@jeremystretch commented on GitHub (Feb 6, 2018): Not able to replicate this on v2.2.9. Three things: 1. Try upgrading to the latest stable release (v2.2.9). 2. Make sure you're matching the exact name (use `?q=` for searching). 3. Maybe a hyphen got replaced with an [en-dash or em-dash](http://www.punctuationmatters.com/hyphen-dash-n-dash-and-m-dash/) somewhere?
Author
Owner

@cslingerland commented on GitHub (Feb 6, 2018):

Oh my, it was a virtual machine, not a device.

@cslingerland commented on GitHub (Feb 6, 2018): Oh my, it was a virtual machine, not a device.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1539