Skip to content

Add query parameter to get Devices of particular types #829

Closed as not planned

Description

@stan-dot
  • ls [interface]
    /devices should be extended for a query parameter: /devices?q=Movable etc.

Originally posted by @DiamondJoseph in #805

As mentioned in #134:

DeviceType = Bluesky Protocols + concrete Class (?) + abstract Classes (??)

  • Allow for querying Devices by the name of a DeviceType
  • Present all (?- currently just Bluesky Protocols) DeviceTypes of a named Device when shown get GET /devices
  • [Future ticket possibility] Allow for querying Plans that could take as an argument?

Activity

  1. added
    enhancement
    c: rest api
    on Feb 20, 2025
  2. linked a pull request that will close this issueSearch by protocol feature and tests #830on Feb 20, 2025
  3. changed the title [-]Add an endpoint to get Devices filtered by a Protocol name[/-] [+]Add query parameter to get Devices of particular types[/+] on Feb 21, 2025
  4. DiamondJoseph commented on Feb 21, 2025

    @DiamondJoseph
    Contributor

    As far as possible, plans are going to be written to target the bluesky protocols (Movable, Readable) because then they can be re-used on the widest array of devices. But sometimes plans will use specific behaviour (e.g. a plan that takes a StandardDetector not a Readable because it sets the exposure time; or a plan that takes a specific class because it needs functionality only present on that device class).

    def plan(dets: set[Readable], x: Movable, y: Movable) -> MsgGenerator:
    def plam(dets: set[StandardDetector], x: Motor, y: Motor) -> MsgGenerator:
    def plal(baz: set[SimBlobDetector], x: SimMotor, y: SimMotor) -> MsgGenerator:

    For each of those plans, it should be possible to query /devices?q=<Readable|Movable|StandardDetector|Motor|SimBlobDetector|SimMotor> and find which devices are possible to use on my instrument.

  5. DiamondJoseph commented on Feb 21, 2025

    @DiamondJoseph
    Contributor

    For now limit to just the single DeviceType and later can worry about q=Movable&Readable.

    Should also be in an extensible way, in case we want to add e.g. filtering the returned devices by name (find all devices for which their name matches .axs, or all of the StandardDetectors that match d.*

  6. DiamondJoseph commented on Feb 21, 2025

    @DiamondJoseph
    Contributor

    ~~I'm going to make a start on this and park it at EoD to go on leave 🥳 ~~

  7. self-assigned this
    on Feb 21, 2025
  8. added
    backlog
    and removed on Feb 25, 2026
  9. abbiemery commented on Feb 25, 2026

    @abbiemery
    Contributor

    I think this is going to depend on decisions re child device registration and access if nothing else. Deferring for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

backlogc: rest apienhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions