10346: Document token scopes.
[arvados.git] / doc / api / methods / links.html.textile.liquid
1 ---
2 layout: default
3 navsection: api
4 navmenu: API Methods
5 title: "links"
6
7 ...
8
9 See "REST methods for working with Arvados resources":{{site.baseurl}}/api/methods.html
10
11 API endpoint base: @https://{{ site.arvados_api_host }}/arvados/v1/links@
12
13 Required arguments are displayed in %{background:#ccffcc}green%.
14
15 h2. Resource
16
17 Each link has, in addition to the usual "attributes of Arvados resources":{{site.baseurl}}/api/resources.html:
18
19 table(table table-bordered table-condensed).
20 |_. Attribute|_. Type|_. Description|
21 |tail_uuid|string|Object UUID at the tail (start, source, origin) of this link|
22 |link_class|string|Class (see below)|
23 |name|string|Link type (see below)|
24 |head_uuid|string|Object UUID at the head (end, destination, target) of this link|
25 |properties|hash|Additional information, expressed as a key→value hash. Key: string. Value: string, number, array, or hash.|
26
27 h2. Link classes
28
29 Some classes are pre-defined by convention and have standard meanings attached to names.
30
31 h3. provenance
32
33 table(table table-bordered table-condensed).
34 |_. tail_type→head_type|_. name→head_uuid {properties}|_. Notes|
35 |→Collection  |provided → _collection uuid_
36 {url→http://example.com/foo.tgz, retrieved_at→1352616640.000}||
37 |Job→Collection     |provided → _collection uuid_||
38 |Specimen→Collection|provided → _collection uuid_||
39 |Human→Specimen     |provided → _specimen uuid_||
40 |Human→Collection   |provided → _collection uuid_||
41
42 h3. permission
43
44 table(table table-bordered table-condensed).
45 |_. tail_type→head_type|_. name→head_uuid {properties}|_. Notes|
46 |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.|
47 |User→Group  |can_read → _group uuid_  |The User can retrieve the Group itself and every object that is readable by the Group.|
48 |User→Job|can_write → _job uuid_  |The User can read and update the Job. (This works for all objects, not just jobs.)|
49 |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.)|
50 |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.)|
51
52 h3. resources
53
54 table(table table-bordered table-condensed).
55 |_. tail_type→head_type|_. name→head_uuid {properties}|_. Notes|
56 |User→Collection|wants → _collection uuid_    |Determines whether data can be deleted|
57 |User→Job       |wants → _job uuid_    |Determines whether a job can be cancelled|
58
59 h3. tag
60
61 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.
62
63 table(table table-bordered table-condensed).
64 |_. tail_type→head_type|_. name→head_uuid {properties}|
65 |→Collection           | _tag name_ → _collection uuid_|
66 |→Job                  | _tag name_ → _job uuid_|
67
68 h3. human_trait
69
70 table(table table-bordered table-condensed).
71 |_. tail_type→head_type|_. name→head_uuid {properties}|_. Notes|
72 |Human→Trait  |measured → _trait uuid_ {value→1.83, unit→metre, measured_at→1352616640.000}||
73
74 h3. identifier
75
76 table(table table-bordered table-condensed).
77 |_. tail_type→head_type|_. name→head_uuid {properties}|_. Notes|
78 |→Human        |hu123456 → _human uuid_||
79
80
81 h2. Methods
82 h3. create
83
84 Create a new Link.
85
86 Arguments:
87
88 table(table table-bordered table-condensed).
89 |_. Argument |_. Type |_. Description |_. Location |_. Example |
90 |link|object||query||
91
92 h3. delete
93
94 Delete an existing Link.
95
96 Arguments:
97
98 table(table table-bordered table-condensed).
99 |_. Argument |_. Type |_. Description |_. Location |_. Example |
100 {background:#ccffcc}.|uuid|string|The UUID of the Link in question.|path||
101
102 h3. get
103
104 Gets a Link's metadata by UUID.
105
106 Arguments:
107
108 table(table table-bordered table-condensed).
109 |_. Argument |_. Type |_. Description |_. Location |_. Example |
110 {background:#ccffcc}.|uuid|string|The UUID of the Link in question.|path||
111
112 h3. list
113
114 List links.
115
116 Arguments:
117
118 table(table table-bordered table-condensed).
119 |_. Argument |_. Type |_. Description |_. Location |_. Example |
120 |limit|integer (default 100)|Maximum number of links to return.|query||
121 |order|string|Order in which to return matching links.|query||
122 |filters|array|Conditions for filtering links.|query||
123
124 h3. render_not_found
125
126 render_not_found links
127
128 Arguments:
129
130 table(table table-bordered table-condensed).
131 |_. Argument |_. Type |_. Description |_. Location |_. Example |
132 {background:#ccffcc}.|a|string||path||
133
134 h3. update
135
136 Update attributes of an existing Link.
137
138 Arguments:
139
140 table(table table-bordered table-condensed).
141 |_. Argument |_. Type |_. Description |_. Location |_. Example |
142 {background:#ccffcc}.|uuid|string|The UUID of the Link in question.|path||
143 |link|object||query||