X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7024cc159936593350aaf7939d700102f6510787..42b9e37cd53d63980d3fa4a238f9ff6adad9ccc4:/doc/api/methods.html.textile.liquid diff --git a/doc/api/methods.html.textile.liquid b/doc/api/methods.html.textile.liquid index 2bfb9c4bfb..7941e5265b 100644 --- a/doc/api/methods.html.textile.liquid +++ b/doc/api/methods.html.textile.liquid @@ -2,79 +2,101 @@ layout: default navsection: api navmenu: Concepts -title: REST methods +title: Common resource methods ... -h1. REST Methods +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. -(using Group as an example) +h2. create -h2(#index). Index, list, search +The @create@ method creates a new object of the specified type. It corresponds to the HTTP request @POST /arvados/v1/resource_name@. A successful create call returns a copy of the new object. -
-GET https://{{ site.arvados_api_host }}/arvados/v1/groups?where[owner_uuid]=xyzzy-tpzed-a4lcehql0dv2u25
- 
-POST https://{{ site.arvados_api_host }}/arvados/v1/groups
-_method=GET
-where[owner_uuid]=xyzzy-tpzed-a4lcehql0dv2u25
-
+Arguments: -→ Group resource list +table(table table-bordered table-condensed). +|_. Argument |_. Type |_. Description |_. Location | +|{resource_name}|object||query|| + +h2. delete + +The @delete@ method deletes a object of the specified type. It corresponds to the HTTP request @DELETE /arvados/v1/resource_name/uuid@. A successful delete call returns a copy of the deleted object. + +Arguments: table(table table-bordered table-condensed). -|*Parameter name*|*Value*|*Description*| -|max_results|integer|Maximum number of resources to return| -|page_token|string|| -|where{}|list|Attribute values to search for| +|_. Argument |_. Type |_. Description |_. Location | +{background:#ccffcc}.|uuid|string|The UUID of the object in question.|path| -h2. Create +h2. get -
-POST https://{{ site.arvados_api_host }}/arvados/v1/groups
-group={"name":"fresh new group"}
-
+The @get@ method gets a single object with the specified @uuid@. It corresponds to the HTTP request @GET /arvados/v1/resource_name/uuid@. -→ Group resource +Arguments: -h2. Delete +table(table table-bordered table-condensed). +|_. Argument |_. Type |_. Description |_. Location | +{background:#ccffcc}.|uuid|string|The UUID of the object in question.|path| -
-DELETE https://{{ site.arvados_api_host }}/arvados/v1/groups/xyzzy-ldvyl-vyydjeplwaa6emg
-
+h2(#index). list -→ Group resource +The @list@ method requests an list of resources of that type. It corresponds to the HTTP request @GET /arvados/v1/resource_name@. All resources support listing with unless otherwise noted. -h2. Show +Arguments: -
-GET https://{{ site.arvados_api_host }}/arvados/v1/groups/xyzzy-ldvyl-vyydjeplwaa6emg
-
+table(table table-bordered table-condensed). +|_. Argument |_. Type |_. Description |_. Location | +|limit |integer|Maximum number of resources to return. May also be subject to server limit.|query| +|offset |integer|Skip the first 'offset' resources that match the given filter conditions.|query| +|filters |array |Conditions for selecting resources to return (see below).|query| +|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. +Example: @["head_uuid asc","modified_at desc"]@ +Default: @["created_at desc"]@|query| +|select |array |Set of attributes to include in the response. +Example: @["head_uuid","tail_uuid"]@ +Default: all available attributes. As a special case, collections do not return "manifest_text" unless explicitly selected.|query| +|distinct|boolean|@true@: (default) do not return duplicate objects +@false@: permitted to return duplicates|query| -→ Group resource +h3. filters -h2. Update +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. -
-PUT https://{{ site.arvados_api_host }}/arvados/v1/groups/xyzzy-ldvyl-vyydjeplwaa6emg
-group={"uuid":"xyzzy-ldvyl-vyydjeplwaa6emg", "name":"Important group"}
-
+Each condition is expressed as an array with three elements: @[attribute, operator, operand]@. -→ Group resource +table(table table-bordered table-condensed). +|_. Index|_. Element|_. Type|_. Description|_. Examples| +|0|attribute|string|Name of the attribute to compare (or "any" to return resources with any matching attribute)|@script_version@, @head_uuid@, @any@| +|1|operator|string|Comparison operator|@>@, @>=@, @like@, @not in@| +|2|operand|string, array, or null|Value to compare with the resource attribute|@"d00220fb%"@, @"1234"@, @["foo","bar"]@, @nil@| -
-PUT https://{{ site.arvados_api_host }}/arvados/v1/groups/xyzzy-ldvyl-vyydjeplwaa6emg
-group[uuid]=xyzzy-ldvyl-vyydjeplwaa6emg
-group[name]=Important group
-
+The following operators are available. -→ Group resource +table(table table-bordered table-condensed). +|_. Operator|_. Operand type|_. Example| +|@<@, @<=@, @>=@, @>@, @like@, @ilike@|string|@["script_version","like","d00220fb%"]@| +|@=@, @!=@|string or null|@["tail_uuid","=","xyzzy-j7d0g-fffffffffffffff"]@ +@["tail_uuid","!=",null]@| +|@in@, @not in@|array of strings|@["script_version","in",["master","d00220fb38d4b85ca8fc28a8151702a2b9d1dec5"]]@| +|@is_a@|string|@["head_uuid","is_a","arvados#pipelineInstance"]@| + +h3. result + +A successful call to list will return the following object. -More appropriate (but not yet implemented): +table(table table-bordered table-condensed). +|_. Attribute |_. Type |_. Description | +|kind|string|type of objects returned| +|offset|integer|query offset in effect| +|limit|integer|query limit in effect| +|items|array|actual query payload, an array of resource objects| +|items_available|integer|total items available matching query| + +h2. update -
-PATCH https://{{ site.arvados_api_host }}/arvados/v1/groups/xyzzy-ldvyl-vyydjeplwaa6emg
-group={"uuid":"xyzzy-ldvyl-vyydjeplwaa6emg", "name":"Important group"}
-
+The @update@ method updates fields on the object with the specified @uuid@. It corresponds to the HTTP request @PUT /arvados/v1/resource_name/uuid@. A successful update call returns the updated copy of the object. -→ Group resource +table(table table-bordered table-condensed). +|_. Argument |_. Type |_. Description |_. Location | +{background:#ccffcc}.|uuid|string|The UUID of the resource in question.|path|| +|{resource_name}|object||query||