Skip to content

Search spools in API and more by extra fields and/or add field for UID #716

@kevinrmccoy

Description

@kevinrmccoy

Is your feature request related to a problem? Please describe.
I'm building a node-red flow (within Home Assistant) to see which spools are currently on my Bambu AMS and then subtract the printed weight from them after a print completes. To do so I'm including the UID as read by the HA Bambu integration in each spool entry in Spoolman, and I'd love to be able to find spools by that info using the API.

Describe the solution you'd like
I'd like to be able to use the existing spool search API to search the extra fields, something like /api/v1/spool?extra.tag_uid= (which currently just returns all the spools.)

Alternately, having a built-in UID field searchable through the API would work, but I feel like searching the extra fields would be more flexible for anyone building any kind of similar system.

Describe alternatives you've considered
What I will likely do for now is call the API searching for some other characteristic, like the color or the plastic type or something, then search the results for the one with the UID I want (since the extra tags are returned in the response.) It's not a huge deal and this just effectively shifts the search responsibility to my node-red flow instead of spoolman. So not a big deal, just a would-be-nice-to-have. Alternately I might just build a local-to-node-red database correlating spoolman spool ID with UID, it just feels like that's also duplicating effort and it'd be nice if that was all stored in spoolman.

Thanks for your work on this software!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions