Skip to content

API - extras/image-attachments - Filter by Device/Rack/Site/... #5072

@Yentel

Description

@Yentel

Environment

  • Python version: 3.7.3
  • NetBox version: 2.8.5

Proposed Functionality

As of now, using the api endpoint to retrieve images by device/site/rack is only possible by retrieving all image-attachments and then locally looping through them to find the required images. This is possible of course, but not scalable at all.
There is, according to the documentation, no possibility to filter this endpoint. The only two possible filters are limit and offset.

Another possibility is by adding a series of images to the respective parent objects (device,rack,site,...) themselves.

Use Case

Retrieving images for a certain object (device with id X, rack with id Y, site with id Z, ...)

Database Changes

None required as these objects are already linked to their models.

External Dependencies

None as far as I can think of.

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