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