16718: Adds 'include_old_versions' param to groups#content.
[arvados.git] / doc / api / methods / groups.html.textile.liquid
1 ---
2 layout: default
3 navsection: api
4 navmenu: API Methods
5 title: "groups"
6 ...
7 {% comment %}
8 Copyright (C) The Arvados Authors. All rights reserved.
9
10 SPDX-License-Identifier: CC-BY-SA-3.0
11 {% endcomment %}
12
13 API endpoint base: @https://{{ site.arvados_api_host }}/arvados/v1/groups@
14
15 Object type: @j7d0g@
16
17 Example UUID: @zzzzz-j7d0g-0123456789abcde@
18
19 h2. Resource
20
21 Groups provides a way to apply the same permissions to a set of Arvados objects.  See "permission model":{{site.baseurl}}/api/permission-model.html for details.
22
23 Each Group has, in addition to the "Common resource fields":{{site.baseurl}}/api/resources.html:
24
25 table(table table-bordered table-condensed).
26 |_. Attribute|_. Type|_. Description|_. Example|
27 |name|string|||
28 |group_class|string|Type of group. This does not affect behavior, but determines how the group is presented in the user interface. For example, @project@ indicates that the group should be displayed by Workbench and arv-mount as a project for organizing and naming objects.|@"project"@
29 null|
30 |description|text|||
31 |properties|hash|User-defined metadata, may be used in queries using "subproperty filters":{{site.baseurl}}/api/methods.html#subpropertyfilters ||
32 |writable_by|array|List of UUID strings identifying Users and other Groups that have write permission for this Group.  Only users who are allowed to administer the Group will receive a full list.  Other users will receive a partial list that includes the Group's owner_uuid and (if applicable) their own user UUID.||
33 |trash_at|datetime|If @trash_at@ is non-null and in the past, this group and all objects directly or indirectly owned by the group will be hidden from API calls.  May be untrashed.||
34 |delete_at|datetime|If @delete_at@ is non-null and in the past, the group and all objects directly or indirectly owned by the group may be permanently deleted.||
35 |is_trashed|datetime|True if @trash_at@ is in the past, false if not.||
36
37 h2. Methods
38
39 See "Common resource methods":{{site.baseurl}}/api/methods.html for more information about @create@, @delete@, @get@, @list@, and @update@.
40
41 Required arguments are displayed in %{background:#ccffcc}green%.
42
43 h3. contents
44
45 Retrieve a list of items owned by the group.  Use "recursive" to list objects within subprojects as well.
46
47 Arguments:
48
49 table(table table-bordered table-condensed).
50 |_. Argument |_. Type |_. Description |_. Location |_. Example |
51 {background:#ccffcc}.|uuid|string|The UUID of the group in question.|path||
52 |limit|integer (default 100)|Maximum number of items to return.|query||
53 |order|array|Attributes to use as sort keys to determine the order resources are returned, each optionally followed by @asc@ or @desc@ to indicate ascending or descending order. Sort within a resource type by prefixing the attribute with the resource name and a period.|query|@["collections.modified_at desc"]@|
54 |filters|array|Conditions for filtering items.|query|@[["uuid", "is_a", "arvados#job"]]@|
55 |recursive|boolean (default false)|Include items owned by subprojects.|query|@true@|
56 |exclude_home_project|boolean (default false)|Only return items which are visible to the user but not accessible within the user's home project.  Use this to get a list of items that are shared with the user.  Uses the logic described under the "shared" endpoint.|query|@true@|
57 |include|string|If provided with the value "owner_uuid", this will return owner objects in the "included" field of the response.|query||
58 |include_trash|boolean (default false)|Include trashed objects.|query|@true@|
59 |include_old_versions|boolean (default false)|Include past versions of the collections being listed.|query|@true@|
60
61 Notes:
62
63 Because adding access tokens to manifests can be computationally expensive, the @manifest_text@ field is not included in listed collections.  If you need it, request a "list of collections":{{site.baseurl}}/api/methods/collections.html with the filter @["owner_uuid", "=", GROUP_UUID]@, and @"manifest_text"@ listed in the select parameter.
64
65 Use filters with the attribute format @<item type>.<field name>@ to filter items of a specific type. For example: @["container_requests.state", "=", "Final"]@ to filter @container_requests@ where @state@ is @Final@. All other types of items owned by this group will be unimpacted by this filter and will still be included.
66
67 When called with “include=owner_uuid”, the @included@ field of the response is populated with users, projects, or other groups that own the objects returned in @items@.  This can be used to fetch an object and its parent with a single API call.
68
69
70 h3. create
71
72 Create a new Group.
73
74 Arguments:
75
76 table(table table-bordered table-condensed).
77 |_. Argument |_. Type |_. Description |_. Location |_. Example |
78 |group|object||query||
79 |async|boolean (default false)|Defer the permissions graph update by a configured number of seconds. (By default, @async_permissions_update_interval@ is 20 seconds). On success, the response is 202 (Accepted).|query|@true@|
80
81 h3. delete
82
83 Put a Group in the trash.  This sets the @trash_at@ field to @now@ and @delete_at@ field to @now@ + token TTL.  A trashed group is invisible to most API calls unless the @include_trash@ parameter is true.  All objects directly or indirectly owned by the Group are considered trashed as well.
84
85 Arguments:
86
87 table(table table-bordered table-condensed).
88 |_. Argument |_. Type |_. Description |_. Location |_. Example |
89 {background:#ccffcc}.|uuid|string|The UUID of the Group in question.|path||
90
91 h3. get
92
93 Gets a Group's metadata by UUID.
94
95 Arguments:
96
97 table(table table-bordered table-condensed).
98 |_. Argument |_. Type |_. Description |_. Location |_. Example |
99 {background:#ccffcc}.|uuid|string|The UUID of the Group in question.|path||
100
101 h3. list
102
103 List groups.
104
105 See "common resource list method.":{{site.baseurl}}/api/methods.html#index
106
107 h3. show
108
109 show groups
110
111 Arguments:
112
113 table(table table-bordered table-condensed).
114 |_. Argument |_. Type |_. Description |_. Location |_. Example |
115 {background:#ccffcc}.|uuid|string||path||
116
117 h3. update
118
119 Update attributes of an existing Group.
120
121 Arguments:
122
123 table(table table-bordered table-condensed).
124 |_. Argument |_. Type |_. Description |_. Location |_. Example |
125 {background:#ccffcc}.|uuid|string|The UUID of the Group in question.|path||
126 |group|object||query||
127 |async|boolean (default false)|Defer the permissions graph update by a configured number of seconds. (By default, @async_permissions_update_interval@ is 20 seconds). On success, the response is 202 (Accepted).|query|@true@|
128
129 h3. untrash
130
131 Remove a Group from the trash.  This sets the @trash_at@ and @delete_at@ fields to @null@.
132
133 Arguments:
134
135 table(table table-bordered table-condensed).
136 |_. Argument |_. Type |_. Description |_. Location |_. Example |
137 {background:#ccffcc}.|uuid|string|The UUID of the Group to untrash.|path||
138 |ensure_unique_name|boolean (default false)|Rename project uniquely if untrashing it would fail with a unique name conflict.|query||
139
140 h3. shared
141
142 This endpoint returns the toplevel set of groups to which access is granted through a chain of one or more permission links rather than through direct ownership by the current user account.  This is useful for clients which wish to browse the list of projects the user has permission to read which are not part of the "home" project tree.  Similar behavior is also available with the @exclude_home_project@ option of the "contents" endpoint.
143
144 Specifically, the logic is:
145
146 <pre>
147 select groups that are readable by current user AND
148     (the owner_uuid is a user (but not the current user) OR
149      the owner_uuid is not readable by the current user OR
150      the owner_uuid is a group but group_class is not a project)
151 </pre>
152
153 table(table table-bordered table-condensed).
154 |_. Argument |_. Type |_. Description |_. Location |_. Example |
155 |include|string|If provided with the value "owner_uuid", this will return owner objects in the @included@ field of the response.|query||
156
157 Notes:
158
159 When called with “include=owner_uuid”, the @included@ field of the response is populated with users and non-project groups that own the objects returned in @items@.
160
161 In addition to the "include" parameter this endpoint also supports the same parameters as the "list method.":{{site.baseurl}}/api/methods.html#index