20259: Add documentation for banner and tooltip features
[arvados.git] / doc / sdk / cli / reference.html.textile.liquid
1 ---
2 layout: default
3 navsection: sdk
4 navmenu: CLI
5 title: "arv reference"
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 _In order to use the @arv@ command, make sure that you have a "working environment.":{{site.baseurl}}/user/getting_started/check-environment.html_
14
15 h3. Usage
16
17 See the "CLI overview":{{site.baseurl}}/sdk/cli/index.html page.
18
19 h3. Resource types and methods
20
21 Get list of resource types
22 @arv --help@
23
24 Get list of resource methods for the "user" resource type
25 @arv user --help@
26
27
28 h3. Basic examples
29
30 Get record for current user
31 @arv user current@
32
33 Get entire record for some specific user
34 @arv user get --uuid 6dnxa-tpzed-iimd25zhzh84gbk@
35
36 Update user record
37 @arv user update --uuid 6dnxa-tpzed-iimd25zhzh84gbk --user '{"first_name":"Bob"}'@
38
39 Get list of groups
40 @arv group list@
41
42 Delete a group
43 @arv group delete --uuid 6dnxa-j7d0g-iw7i6n43d37jtog@
44
45 Create an empty collection
46 @arv collection create --collection '{"name": "test collection"}'@
47
48 h3. Common commands
49
50 Most @arv@ resources accept the following commands:
51
52 * @get@
53 * @list@
54 * @create@
55 * @update@
56 * @delete@
57
58
59 h4. @list@
60
61 Arguments accepted by the @list@ subcommand include:
62
63 <pre>
64   -l, --limit=<i>        Maximum number of items to return. (Default: 100)
65   -o, --offset=<i>       Number of items to skip before first returned record. (Default: 0)
66   -f, --filters=<s>      Conditions for filtering items.
67   -r, --order=<s>        Order in which to return matching items.
68   -s, --select=<s>       Select which fields to return.
69   -d, --distinct         Return each distinct object.
70   -c, --count=<s>        Type of count to return in items_available ('none' or 'exact'). (Default: exact)
71 </pre>
72
73 The @--filters@ option takes a string describing a JSON list of filters on which the returned resources should be returned. Each filter is a three-element list of _[field, operator, value]_, where the _operator_ may be one of @=@, @<@, @<=@, @>@, @>=@, @!=@, @like@, or @ilike@.
74
75 Example:
76
77 @arv collection list --filters '[["name", "=", "PGP VAR inputs"], ["created_at", ">=", "2014-10-01"]]'@
78
79 will return a list of all collections visible to the current user which are named "PGP VAR inputs" and were created on or after October 1, 2014. See the "Common resource methods":{{site.baseurl}}/api/methods.html#index page for more details on using @list@ and @--filters@.