9 Copyright (C) The Arvados Authors. All rights reserved.
11 SPDX-License-Identifier: CC-BY-SA-3.0
14 API endpoint base: @https://{{ site.arvados_api_host }}/arvados/v1/links@
18 Example UUID: @zzzzz-o0j2j-0123456789abcde@
22 Links are an extensible way to describe relationships between Arvados objects and metadata about individual objects.
24 Each link has, in addition to the "Common resource fields":{{site.baseurl}}/api/resources.html:
26 table(table table-bordered table-condensed).
27 |_. Attribute|_. Type|_. Description|
28 |head_uuid|string|The object being described or acted on.|
29 |tail_uuid|string|The origin or actor in the description or action (may be null).|
30 |link_class|string|Type of link|
31 |name|string|Primary value of the link.|
32 |properties|hash|Additional information, expressed as a key→value hash. Key: string. Value: string, number, array, or hash. May be used in queries using "subproperty filters":{{site.baseurl}}/api/methods.html#subpropertyfilters|
36 Some classes are pre-defined by convention and have standard meanings attached to names.
40 See "permission links":{{site.baseurl}}/api/permission-model.html#links section of the permission model.
44 A **star** link is a shortcut to a project that is displayed in the user interface (Workbench) as "favorites". Users can mark their own favorites (implemented by creating or deleting **star** links).
46 An admin can also create **star** links owned by the "Public favorites" project. These are favorites will be displayed to all users that have permission to read the project that has been favorited.
48 The schema for a star link is:
50 table(table table-bordered table-condensed).
51 |_. Field|_. Value|_. Description|
52 |owner_uuid|user or group uuid|Either the user that owns the favorite, or the "Public favorites" group.|
53 |tail_uuid|user or group uuid|Should be the same as owner_uuid|
54 |head_uuid|project uuid|The project being favorited|
55 |link_class|string of value "star"|Indicates this represents a link to a user favorite|
57 h4. Creating a public favorite
59 @owner_uuid@ is either an individual user, or the "Public favorites" group. The @head_uuid@ is the project being favorited.
62 $ linkuuid=$(arv --format=uuid link create --link '{
64 "owner_uuid": "zzzzz-j7d0g-publicfavorites",
65 "tail_uuid": "zzzzz-j7d0g-publicfavorites",
66 "head_uuid": "zzzzz-j7d0g-theprojectuuid"}')
69 h4. Removing a favorite
72 $ arv link delete --uuid zzzzz-o0j2j-thestarlinkuuid
77 To list all 'star' links that will be displayed for a user:
80 $ arv link list --filters '[
81 ["link_class", "=", "star"],
82 ["tail_uuid", "in", ["zzzzz-j7d0g-publicfavorites", "zzzzz-tpzed-currentuseruuid"]]]'
87 A **tag** link describes an object using an unparsed plain text string. Tags can be used to annotate objects that are not directly editable by the user, like collections and objects shared as read-only.
89 table(table table-bordered table-condensed).
90 |_. tail_type→head_type|_. name→head_uuid {properties}|
91 |→Collection | _tag name_ → _collection uuid_|
92 |→Job | _tag name_ → _job uuid_|
96 See "Common resource methods":{{site.baseurl}}/api/methods.html for more information about @create@, @delete@, @get@, @list@, and @update@.
98 Required arguments are displayed in %{background:#ccffcc}green%.
106 table(table table-bordered table-condensed).
107 |_. Argument |_. Type |_. Description |_. Location |_. Example |
108 |link|object||query||
112 Delete an existing Link.
116 table(table table-bordered table-condensed).
117 |_. Argument |_. Type |_. Description |_. Location |_. Example |
118 {background:#ccffcc}.|uuid|string|The UUID of the Link in question.|path||
122 Gets a Link's metadata by UUID.
126 table(table table-bordered table-condensed).
127 |_. Argument |_. Type |_. Description |_. Location |_. Example |
128 {background:#ccffcc}.|uuid|string|The UUID of the Link in question.|path||
134 See "common resource list method.":{{site.baseurl}}/api/methods.html#index
138 Update attributes of an existing Link.
142 table(table table-bordered table-condensed).
143 |_. Argument |_. Type |_. Description |_. Location |_. Example |
144 {background:#ccffcc}.|uuid|string|The UUID of the Link in question.|path||
145 |link|object||query||
149 Get all permission links that point directly to given UUID (in the head_uuid field). The requesting user must have @can_manage@ permission or be an admin.
153 table(table table-bordered table-condensed).
154 |_. Argument |_. Type |_. Description |_. Location |_. Example |
155 {background:#ccffcc}.|uuid|string|The UUID of the object.|path||