Merge branch '8784-dir-listings'
[arvados.git] / doc / api / methods / links.html.textile.liquid
index 0885f428e79c2697a596fabc251f520288749d20..ec5d53010456bb36e239927bcdb563f1c6467e7e 100644 (file)
@@ -5,99 +5,92 @@ navmenu: API Methods
 title: "links"
 
 ...
+{% comment %}
+Copyright (C) The Arvados Authors. All rights reserved.
 
-h1. links
+SPDX-License-Identifier: CC-BY-SA-3.0
+{% endcomment %}
 
-Required arguments are displayed in %{background:#ccffcc}green%.
+API endpoint base: @https://{{ site.arvados_api_host }}/arvados/v1/links@
 
+Object type: @o0j2j@
 
-h2. create
+Example UUID: @zzzzz-o0j2j-0123456789abcde@
 
-Create a new Link.
+h2. Resource
 
-Arguments:
+Links are an extensible way to describe relationships between Arvados objects and metadata about individual objects.
+
+Each link has, in addition to the "Common resource fields":{{site.baseurl}}/api/resources.html:
 
 table(table table-bordered table-condensed).
-|_. Argument |_. Type |_. Description |_. Location |_. Example |
-|link|object||query||
+|_. Attribute|_. Type|_. Description|
+|head_uuid|string|The object being described or acted on.|
+|tail_uuid|string|The origin or actor in the description or action (may be null).|
+|link_class|string|Type of link|
+|name|string|Primary value of the link.|
+|properties|hash|Additional information, expressed as a key→value hash. Key: string. Value: string, number, array, or hash.|
 
-h2. delete
+h2. Link classes
 
-Delete an existing Link.
+Some classes are pre-defined by convention and have standard meanings attached to names.
 
-Arguments:
+h3. permission
 
-table(table table-bordered table-condensed).
-|_. Argument |_. Type |_. Description |_. Location |_. Example |
-{background:#ccffcc}.|uuid|string|The UUID of the Link in question.|path||
+See "permission links":{{site.baseurl}}/api/permission-model.html#links section of the permission model.
 
-h2. destroy
+h3. tag
 
-destroy links
-
-Arguments:
+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.
 
 table(table table-bordered table-condensed).
-|_. Argument |_. Type |_. Description |_. Location |_. Example |
-{background:#ccffcc}.|uuid|string||path||
-
-h2. get
+|_. tail_type→head_type|_. name→head_uuid {properties}|
+|→Collection           | _tag name_ → _collection uuid_|
+|→Job                  | _tag name_ → _job uuid_|
 
-Gets a Link's metadata by UUID.
+h2. Methods
 
-Arguments:
+See "Common resource methods":{{site.baseurl}}/api/methods.html for more information about @create@, @delete@, @get@, @list@, and @update@.
 
-table(table table-bordered table-condensed).
-|_. Argument |_. Type |_. Description |_. Location |_. Example |
-{background:#ccffcc}.|uuid|string|The UUID of the Link in question.|path||
+Required arguments are displayed in %{background:#ccffcc}green%.
 
-h2. index
+h3. create
 
-index links
+Create a new Link.
 
 Arguments:
 
 table(table table-bordered table-condensed).
 |_. Argument |_. Type |_. Description |_. Location |_. Example |
-{background:#ccffcc}.|tail_uuid|string||path||
-|order|string||query||
-|where|object||query||
+|link|object||query||
 
-h2. list
+h3. delete
 
-List links.
+Delete an existing Link.
 
 Arguments:
 
 table(table table-bordered table-condensed).
 |_. Argument |_. Type |_. Description |_. Location |_. Example |
-|limit|integer (default 100)|Maximum number of links to return.|query||
-|order|string|Order in which to return matching links.|query||
-|pageToken|string|Page token.|query||
-|q|string|Query string for searching links.|query||
-|where|object|Conditions for filtering links.|query||
+{background:#ccffcc}.|uuid|string|The UUID of the Link in question.|path||
 
-h2. render_not_found
+h3. get
 
-render_not_found links
+Gets a Link's metadata by UUID.
 
 Arguments:
 
 table(table table-bordered table-condensed).
 |_. Argument |_. Type |_. Description |_. Location |_. Example |
-{background:#ccffcc}.|a|string||path||
-
-h2. show
+{background:#ccffcc}.|uuid|string|The UUID of the Link in question.|path||
 
-show links
+h3. list
 
-Arguments:
+List links.
 
-table(table table-bordered table-condensed).
-|_. Argument |_. Type |_. Description |_. Location |_. Example |
-{background:#ccffcc}.|uuid|string||path||
+See "common resource list method.":{{site.baseurl}}/api/methods.html#index
 
-h2. update
+h3. update
 
 Update attributes of an existing Link.