[arvados-dev] API for addressing links

Tim Pierce twp at curoverse.com
Fri Jan 10 14:29:39 EST 2014


Pursuant to an argument Tom and I were having about how we should handle
Links and things implemented on them:

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.:

   - create: /links/create
   - search: /links/list/?where={link criteria for searching}
   - delete: /links/delete/{uuid of a link object}

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:

    /links/list/?where={"link_class":"tag","name":"A","head_uuid":"B"}
    /links/delete/{link uuid}

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.

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?

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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.arvados.org/pipermail/arvados-dev/attachments/20140110/434a9627/attachment.html>


More information about the Arvados-dev mailing list