Visitar URL original
Generalize use of URL fragments in `used_by` fields · Issue #4231 · lxc/incus · GitHub
Skip to content

Generalize use of URL fragments in used_by fields #4231

Description

@bensmrs

Is there an existing issue for this?

  • There is no existing issue for this feature

What are you currently unable to do

#3412 introduced the ability to return URL fragments of the form endpoint#config.key to account for references to resources without a dedicated API endpoint, such as configuration keys, in used_by fields.

When looking at the usage of my networks, important diagnostic information such as “what exactly makes /1.0/instances/my-instance dependent on my network?“ is missing.

What do you think would need to be added

I think we should generalize usage of the api_fragments API extension to all UsedBy fields, where it makes sense. For devices, I think the hierarchy should be encoded as #devices/<device name>/<config key>, e.g. /1.0/instances/my-instance#devices/eth0/network.

Activity

  1. added theissue type on Oct 21, 2026
  2. stgraber commented on Oct 21, 2026

    @stgraber
    Member

    So we'll potentially have multiple used-by for the same instance?
    Say if you have both eth0 and eth1 attached to the same network.

  3. bensmrs commented on Oct 22, 2026

    @bensmrs
    MemberAuthor

    That would be the idea, yep. We could still have the client filter out the fragments and deduplicate the resulting used_by list, or we could even have a detailed/expanded argument on the API endpoints that expose the UsedBy field, returning either the expanded usage or its deduplicated version.
    Another possibility is to have a combinator, say // to allow concatenating a bunch of places where the object (here the network) is used, but I don’t like it.

  4. added this to the soon milestone on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions