Add 'apps/arv-web/' from commit 'f9732ad8460d013c2f28363655d0d1b91894dca5'
[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 @arv [global_options] resource_type resource_method [method_parameters]@
13
14 h4. Global options
15
16 - @--format=json@ := Output response as JSON. This is the default format.
17
18 - @--format=yaml@ := Output response as YAML
19
20 - @--format=uuid@ := Output only the UUIDs of object(s) in the API response, one per line.
21
22
23 h3. Resource types and methods
24
25 Get list of resource types
26 @arv --resources@
27
28 Get list of resource methods for the "user" resource type
29 @arv user --help@
30
31
32 h3. Basic examples
33
34 Get record for current user
35 @arv user current@
36
37 Get entire record for some specific user
38 @arv user get --uuid 6dnxa-tpzed-iimd25zhzh84gbk@
39
40 Update user record
41 @arv user update --uuid 6dnxa-tpzed-iimd25zhzh84gbk --first-name "Bob"@
42
43 Get list of groups
44 @arv group list@
45
46 Delete a group
47 @arv group delete --uuid 6dnxa-j7d0g-iw7i6n43d37jtog@
48
49
50 h3. Common commands
51
52 Most @arv@ resources accept the following commands:
53
54 * @get@
55 * @list@
56 * @create@
57 * @update@
58 * @delete@
59
60
61 h4. @list@
62
63 Arguments accepted by the @list@ subcommand include:
64
65 <pre>
66     --limit, -l <i>:     Maximum number of resources to return.
67    --offset, -o <i>:     Number of users to skip before first returned record.
68   --filters, -f <s>:     Conditions for filtering users.
69     --order, -r <s>:     Order in which to return matching users.
70    --select, -s <s>:     Select which fields to return
71      --distinct, -d:     Return each distinct object
72 </pre>
73
74 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@.
75
76 Example:
77
78 @arv collection list --filters '[["name", "=", "PGP VAR inputs"], ["created_at", ">=", "2014-10-01"]]'@
79
80 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.