8784: Fix test for latest firefox.
[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
8 _In order to use the @arv@ command, make sure that you have a "working environment.":{{site.baseurl}}/user/getting_started/check-environment.html_
9
10 h3. Usage
11
12 See the "CLI overview":{{site.baseurl}}/sdk/cli/index.html page.
13
14 h3. Resource types and methods
15
16 Get list of resource types
17 @arv --help@
18
19 Get list of resource methods for the "user" resource type
20 @arv user --help@
21
22
23 h3. Basic examples
24
25 Get record for current user
26 @arv user current@
27
28 Get entire record for some specific user
29 @arv user get --uuid 6dnxa-tpzed-iimd25zhzh84gbk@
30
31 Update user record
32 @arv user update --uuid 6dnxa-tpzed-iimd25zhzh84gbk --user '{"first_name":"Bob"}'@
33
34 Get list of groups
35 @arv group list@
36
37 Delete a group
38 @arv group delete --uuid 6dnxa-j7d0g-iw7i6n43d37jtog@
39
40
41 h3. Common commands
42
43 Most @arv@ resources accept the following commands:
44
45 * @get@
46 * @list@
47 * @create@
48 * @update@
49 * @delete@
50
51
52 h4. @list@
53
54 Arguments accepted by the @list@ subcommand include:
55
56 <pre>
57   -l, --limit=<i>        Maximum number of items to return. (Default: 100)
58   -o, --offset=<i>       Number of items to skip before first returned record. (Default: 0)
59   -f, --filters=<s>      Conditions for filtering items.
60   -r, --order=<s>        Order in which to return matching items.
61   -s, --select=<s>       Select which fields to return.
62   -d, --distinct         Return each distinct object.
63   -c, --count=<s>        Type of count to return in items_available ('none' or 'exact'). (Default: exact)
64 </pre>
65
66 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@.
67
68 Example:
69
70 @arv collection list --filters '[["name", "=", "PGP VAR inputs"], ["created_at", ">=", "2014-10-01"]]'@
71
72 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.