Skip to content

Search Prefixes by an exact description via REST API #8594

@djothi

Description

@djothi

NetBox version

v3.1.7

Feature type

New functionality

Proposed functionality

curl https://demo.netbox.dev/api/prefixes/?q=CONTAINERS returns all prefixes that have the string "CONTAINERS" in their description. Queryset: Prefix.objects.filter(description__icontains=CONTAINERS)

The proposed functionality is to be able to return all prefixes via the REST API that have an exact description:

curl https://demo.netbox.dev/api/prefixes/?description=CONTAINERS would return only prefixes that have "CONTAINERS" as a description. Queryset: Prefix.objects.filter(description="CONTAINERS")

Use case

Getting Prefixes using an exact description via REST API.

Database changes

None

External dependencies

None

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions