Merge branch '2070-read-remote-arvados'
[arvados.git] / doc / user / reference / sdk-cli.html.textile.liquid
1 ---
2 layout: default
3 navsection: userguide
4 navmenu: Reference
5 title: "Command line interface"
6
7 ...
8
9 h1. Reference: Command Line Interface
10
11 If you are logged in to an Arvados VM, the command line SDK should be installed. Try:
12
13 @arv --help@
14
15 <!-- _Help is not helpful.  See bug #1667_ -->
16
17 h3. First...
18
19 Set the ARVADOS_API_HOST environment variable.
20
21 @export ARVADOS_API_HOST={{ site.arvados_api_host }}@
22
23 Log in to Workbench and get an API token for your account. Set the ARVADOS_API_TOKEN environment variable.
24
25 @export
26 ARVADOS_API_TOKEN=c0vdbi8wp7f703lbthyadlvmaivgldxssy3l32isslmax93k9@
27
28 If you are using a development instance with an unverifiable SSL certificate, set the ARVADOS_API_HOST_INSECURE environment variable.
29
30 @export ARVADOS_API_HOST_INSECURE=1@
31
32 <!-- _This should link back to "api-tokens":api-tokens.html instead of
33 re-explaining it__ -->
34
35 h3. Usage
36
37 @arv [global_options] resource_type resource_method [method_parameters]@
38
39 <!-- _This is what arv --help really ought to print out_ -->
40
41 h3. Basic examples
42
43 Get UUID of the current user
44 @arv user current@
45
46 Get entire record (json) for current user
47 @arv -h user current@
48
49 Get entire record for identified user
50 @arv -h user get --uuid 6dnxa-tpzed-iimd25zhzh84gbk@
51
52 Update user record
53 @arv user update --uuid 6dnxa-tpzed-iimd25zhzh84gbk --first-name "Bob"@
54
55 Get list of groups (showing just UUIDs)
56 @arv group list@
57
58 Get list of groups (showing entire records)
59 @arv -h group list@
60
61 Delete a group
62 @arv group delete --uuid 6dnxa-j7d0g-iw7i6n43d37jtog@
63
64 h3. Global options
65
66 <!-- _Move these up to before "basic examples", and give examples of what
67 these options do and how they might be useful._ -->
68
69 - @--json@, @-j@ := Output entire response as compact JSON.
70
71 - @--pretty@, @--human@, @-h@ := Output entire response as JSON with whitespace for better human-readability.
72
73 - @--uuid@ := Output only the UUIDs of object(s) in the API response, one per line.
74
75 h3. Resource types and methods
76
77 Get list of resource types
78 @arv --help@
79
80 Get list of resource methods for the "user" resource type
81 @arv user --help@