Merge branch '8784-dir-listings'
[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
46 h3. Common commands
47
48 Most @arv@ resources accept the following commands:
49
50 * @get@
51 * @list@
52 * @create@
53 * @update@
54 * @delete@
55
56
57 h4. @list@
58
59 Arguments accepted by the @list@ subcommand include:
60
61 <pre>
62   -l, --limit=<i>        Maximum number of items to return. (Default: 100)
63   -o, --offset=<i>       Number of items to skip before first returned record. (Default: 0)
64   -f, --filters=<s>      Conditions for filtering items.
65   -r, --order=<s>        Order in which to return matching items.
66   -s, --select=<s>       Select which fields to return.
67   -d, --distinct         Return each distinct object.
68   -c, --count=<s>        Type of count to return in items_available ('none' or 'exact'). (Default: exact)
69 </pre>
70
71 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@.
72
73 Example:
74
75 @arv collection list --filters '[["name", "=", "PGP VAR inputs"], ["created_at", ">=", "2014-10-01"]]'@
76
77 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.