9 **Links** describe relationships between Arvados objects, and from objects to primitives.
11 Links are directional: each metadata object has a tail (the "subject" being described), class, name, properties, and head (the "object" that describes the "subject"). A Link may describe a relationship between two objects in an Arvados database: e.g. a _permission_ link between a User and a Group defines the permissions that User has to read or modify the Group. Other Links simply represent metadata for a single object, e.g. the _identifier_ Link, in which the _name_ property represents a human-readable identifier for the object at the link's head.
13 For links that don't make sense to share between API clients, a _link_class_ that begins with @client@ (like @client.my_app_id@ or @client.my_app_id.anythinghere@) should be used.
17 See "links":{{site.baseurl}}/api/methods/links.html
21 Each link has, in addition to the usual "attributes of Arvados resources":{{site.baseurl}}/api/resources.html:
23 table(table table-bordered table-condensed).
24 |_. Attribute|_. Type|_. Description|
25 |tail_uuid|string|Object UUID at the tail (start, source, origin) of this link|
26 |link_class|string|Class (see below)|
27 |name|string|Link type (see below)|
28 |head_uuid|string|Object UUID at the head (end, destination, target) of this link|
29 |properties|hash|Additional information, expressed as a key→value hash. Key: string. Value: string, number, array, or hash.|
33 Some classes are pre-defined by convention and have standard meanings attached to names.
37 table(table table-bordered table-condensed).
38 |_. tail_type→head_type|_. name→head_uuid {properties}|_. Notes|
39 |→Collection |provided → _collection uuid_
40 {url→http://example.com/foo.tgz, retrieved_at→1352616640.000}||
41 |Job→Collection |provided → _collection uuid_||
42 |Specimen→Collection|provided → _collection uuid_||
43 |Human→Specimen |provided → _specimen uuid_||
44 |Human→Collection |provided → _collection uuid_||
48 table(table table-bordered table-condensed).
49 |_. tail_type→head_type|_. name→head_uuid {properties}|_. Notes|
50 |User→Group |{white-space:nowrap}. can_manage → _group uuid_|The User can read, write, and control permissions on the Group itself, every object owned by the Group, and every object on which the Group has _can_manage_ permission.|
51 |User→Group |can_read → _group uuid_ |The User can retrieve the Group itself and every object that is readable by the Group.|
52 |User→Job|can_write → _job uuid_ |The User can read and update the Job. (This works for all objects, not just jobs.)|
53 |User→Job|can_manage → _job uuid_ |The User can read, update, and change permissions for the Job. (This works for all objects, not just jobs.)|
54 |Group→Job|can_manage → _job uuid_ |Anyone with _can_manage_ permission on the Group can also read, update, and change permissions for the Job. Anyone with _can_read_ permission on the Group can read the Job. (This works for all objects, not just jobs.)|
58 table(table table-bordered table-condensed).
59 |_. tail_type→head_type|_. name→head_uuid {properties}|_. Notes|
60 |User→Collection|wants → _collection uuid_ |Determines whether data can be deleted|
61 |User→Job |wants → _job uuid_ |Determines whether a job can be cancelled|
65 A **tag** link describes an object using an unparsed plain text string. Tags can be used to annotate objects that are not editable, like collections and objects shared as read-only.
67 table(table table-bordered table-condensed).
68 |_. tail_type→head_type|_. name→head_uuid {properties}|
69 |→Collection | _tag name_ → _collection uuid_|
70 |→Job | _tag name_ → _job uuid_|
74 table(table table-bordered table-condensed).
75 |_. tail_type→head_type|_. name→head_uuid {properties}|_. Notes|
76 |Human→Trait |measured → _trait uuid_ {value→1.83, unit→metre, measured_at→1352616640.000}||
80 table(table table-bordered table-condensed).
81 |_. tail_type→head_type|_. name→head_uuid {properties}|_. Notes|
82 |→Human |hu123456 → _human uuid_||