5 title: Common resource methods
9 The following methods are available for most resources. Some resources may limit who can perform certain operations. Consult documentation for individual resource types for details.
11 The methods are relative to the base URI, e.g. @/arvados/v1/resource_type@. For arguments specifying a *Location* of @path@, the value of the argument is incorporated into the path portion of the URI. Arguments specifying a *Location* of @query@ are incorporated into the query portion of the URI or request body.
15 The @create@ method creates a new object of the specified type. Note that only the listed attributes (and "standard metadata":resources.html) are set, unset attributes will get default values, and the attributes of a given resource type are fixed (you cannot introduce new toplevel attributes). It corresponds to the HTTP request @POST /arvados/v1/resource_type@. A successful create call returns a copy of the new object.
19 table(table table-bordered table-condensed).
20 |_. Argument |_. Type |_. Description |_. Location |
21 |{resource_type}|object|Name is the singular form of the resource type, e.g. for the "collections" resource, this argument is "collection"|query||
25 The @delete@ method deletes a object of the specified type. It corresponds to the HTTP request @DELETE /arvados/v1/resource_type/uuid@. A successful delete call returns a copy of the deleted object.
29 table(table table-bordered table-condensed).
30 |_. Argument |_. Type |_. Description |_. Location |
31 {background:#ccffcc}.|uuid|string|The UUID of the object in question.|path|
35 The @get@ method gets a single object with the specified @uuid@. It corresponds to the HTTP request @GET /arvados/v1/resource_type/uuid@.
39 table(table table-bordered table-condensed).
40 |_. Argument |_. Type |_. Description |_. Location |
41 {background:#ccffcc}.|uuid|string|The UUID of the object in question.|path|
45 The @list@ method requests an list of resources of that type. It corresponds to the HTTP request @GET /arvados/v1/resource_type@. All resources support listing with unless otherwise noted.
49 table(table table-bordered table-condensed).
50 |_. Argument |_. Type |_. Description |_. Location |
51 |limit |integer|Maximum number of resources to return. May also be subject to server limit.|query|
52 |offset |integer|Skip the first 'offset' resources that match the given filter conditions.|query|
53 |filters |array |Conditions for selecting resources to return (see below).|query|
54 |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.
55 Example: @["head_uuid asc","modified_at desc"]@
56 Default: @["created_at desc"]@|query|
57 |select |array |Set of attributes to include in the response.
58 Example: @["head_uuid","tail_uuid"]@
59 Default: all available attributes. As a special case, collections do not return "manifest_text" unless explicitly selected.|query|
60 |distinct|boolean|@true@: (default) do not return duplicate objects
61 @false@: permitted to return duplicates|query|
65 The value of the @filters@ parameter is an array of conditions. The @list@ method returns only the resources that satisfy all of the given conditions. In other words, the conjunction @AND@ is implicit.
67 Each condition is expressed as an array with three elements: @[attribute, operator, operand]@.
69 table(table table-bordered table-condensed).
70 |_. Index|_. Element|_. Type|_. Description|_. Examples|
71 |0|attribute|string|Name of the attribute to compare (or "any" to return resources with any matching attribute)|@script_version@, @head_uuid@, @any@|
72 |1|operator|string|Comparison operator|@>@, @>=@, @like@, @not in@|
73 |2|operand|string, array, or null|Value to compare with the resource attribute|@"d00220fb%"@, @"1234"@, @["foo","bar"]@, @nil@|
75 The following operators are available.
77 table(table table-bordered table-condensed).
78 |_. Operator|_. Operand type|_. Example|
79 |@<@, @<=@, @>=@, @>@, @like@, @ilike@|string|@["script_version","like","d00220fb%"]@|
80 |@=@, @!=@|string or null|@["tail_uuid","=","xyzzy-j7d0g-fffffffffffffff"]@
81 @["tail_uuid","!=",null]@|
82 |@in@, @not in@|array of strings|@["script_version","in",["master","d00220fb38d4b85ca8fc28a8151702a2b9d1dec5"]]@|
83 |@is_a@|string|@["head_uuid","is_a","arvados#pipelineInstance"]@|
87 A successful call to list will return the following object.
89 table(table table-bordered table-condensed).
90 |_. Attribute |_. Type |_. Description |
91 |kind|string|type of objects returned|
92 |offset|integer|query offset in effect|
93 |limit|integer|query limit in effect|
94 |items|array|actual query payload, an array of resource objects|
95 |items_available|integer|total items available matching query|
99 The @update@ method updates fields on the object with the specified @uuid@. It corresponds to the HTTP request @PUT /arvados/v1/resource_type/uuid@. Note that only the listed attributes (and "standard metadata":resources.html) are updated, unset attributes will retain their previous values, and the attributes of a given resource type are fixed (you cannot introduce new toplevel attributes). Also note that updates replace the value of the attribute, so if an attribute has an object value, the entire object is replaced. A successful update call returns the updated copy of the object.
101 table(table table-bordered table-condensed).
102 |_. Argument |_. Type |_. Description |_. Location |
103 {background:#ccffcc}.|uuid|string|The UUID of the resource in question.|path||
104 |{resource_type}|object||query||