<div dir="ltr">Pursuant to an argument Tom and I were having about how we should handle Links and things implemented on them:<div><br></div><div>Right now, Links are used to implement all kinds of abstractions on objects in our database: permissions, resources, provenance, and now the "tags" I've been implementing. The Arvados API for manipulating links is the same as for other objects, e.g.:</div>
<div><ul><li>create: /links/create</li><li>search: /links/list/?where={link criteria for searching}</li><li>delete: /links/delete/{uuid of a link object}</li></ul><div>This interface is nice and consistent with the Arvados internal design, but conceptually it's a little inconvenient. An operation like "remove tag A from collection B" requires first searching for the UUID of the link that represents that relationship, and then deleting it:</div>
<div><br></div><div>    /links/list/?where={"link_class":"tag","name":"A","head_uuid":"B"}</div><div>    /links/delete/{link uuid}</div><div><br></div><div>It would be helpful to be able to address links not just by their UUID, but by the relationship they represent (i.e. the type of link and the objects at its head and tail), and skip the intermediate "list" step.</div>
</div><div><br></div><div>Currently /links/search, /links/delete and /links/show require a single "uuid" argument. Would it make sense to extend these to accept a "where" argument as well?</div><div><br>
</div><div>If so, how should they behave if the "where" clause identifies more than one link? Should they perform the operation on each link, or return an error and require the user to use a more precise specifier?</div>
<div><br></div></div>