Zenweb work in progress
[arvados.git] / doc / api / schema / Link.textile
1 ---
2 layout: default
3 navsection: api
4 navmenu: Schema
5 title: Link
6 navorder: 12
7 ...
8
9 h1. Link
10
11 Links encode connections between Arvados objects, and from objects to primitives.  Each metadata object has a tail (subject), class, name, properties, and head (object or value).
12
13 table(table table-bordered table-condensed).
14 |tail (object)| _class, name_ 
15 →
16  _properties{}_ |head (object)|
17
18 h2. Methods
19
20 See "REST methods for working with Arvados resources":/api/methods.html
21
22 API endpoint base: @https://{{ site.arvados_api_host }}/arvados/v1/links@
23
24 h2. Resource
25
26 Each link has, in addition to the usual "attributes of Arvados resources":/api/resources.html:
27
28 table(table table-bordered table-condensed).
29 |_. Attribute|_. Type|_. Description|
30 |tail_uuid|string|Object UUID at the tail (start, source, origin) of this link|
31 |tail_kind|string|Object kind at the tail (start, source, origin) of this link|
32 |link_class|string|Class (see below)|
33 |name|string|Link type (see below)|
34 |head_uuid|string|Object UUID at the head (end, destination, target) of this link|
35 |head_kind|string|Object kind at the head (end, destination, target) of this link|
36 |properties{}|list|Additional information, expressed as a key→value hash. Key: string. Value: string, number, array, or hash.|
37
38 h2. Link classes
39
40 Some classes are pre-defined by convention and have standard meanings attached to names.
41
42 table(table table-bordered table-condensed).
43 |_. link_class|_. tail_type→head_type|_. name→head_uuid {properties}|_. Notes|
44 |provenance|→Collection  |provided → _collection uuid_
45 {url→http://example.com/foo.tgz, retrieved_at→1352616640.000}||
46 |provenance|Job→Collection     |provided → _collection uuid_||
47 |provenance|Specimen→Collection|provided → _collection uuid_||
48 |provenance|Human→Specimen     |provided → _specimen uuid_||
49 |provenance|Human→Collection   |provided → _collection uuid_||
50 |human_trait|Human→Trait  |measured → _trait uuid_ {value→1.83, unit→metre, measured_at→1352616640.000}||
51 |identifier|→Human        |hu123456 → _human uuid_||
52 |permission|User→Group  |can_manage → _group uuid_|Writable only by a user who can_manage this group|
53 |permission|User→Group  |can_read → _group uuid_  |Writable only by a user who can_manage this group.
54 Gives permission to read any object owned by this group.|
55 |resources|User→Collection|wants → _collection uuid_    |Determines whether data can be deleted|
56 |resources|User→Job       |wants → _job uuid_    |Determines whether a job can be cancelled|
57
58 For links that don't make sense to share between API clients, a link class like @client.my_app_id@ or @client.my_app_id.anythinghere@ should be used.