fix example ssh command
[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 h3. First...
17
18 Set the ARVADOS_API_HOST environment variable.
19
20 @export ARVADOS_API_HOST={{ site.arvados_api_host }}@
21
22 Log in to Workbench and get an API token for your account. Set the ARVADOS_API_TOKEN environment variable.
23
24 @export ARVADOS_API_TOKEN=c0vdbi8wp7f703lbthyadlvmaivgldxssy3l32isslmax93k9@
25
26 If you are using a development instance with an unverifiable SSL certificate, set the ARVADOS_API_HOST_INSECURE environment variable.
27
28 @export ARVADOS_API_HOST_INSECURE=1@
29
30 h3. Usage
31
32 @arv [global_options] resource_type resource_method [method_parameters]@
33
34 h3. Basic examples
35
36 Get UUID of the current user
37 @arv user current@
38
39 Get entire record (json) for current user
40 @arv -h user current@
41
42 Get entire record for identified user
43 @arv -h user get --uuid 6dnxa-tpzed-iimd25zhzh84gbk@
44
45 Update user record
46 @arv user update --uuid 6dnxa-tpzed-iimd25zhzh84gbk --first_name "Bob"@
47
48 Get list of groups (showing just UUIDs)
49 @arv group list@
50
51 Get list of groups (showing entire records)
52 @arv -h group list@
53
54 h3. Global options
55
56 - @--json@, @-j@ := Output entire response as compact JSON.
57
58 - @--pretty@, @--human@, @-h@ := Output entire response as JSON with whitespace for better human-readability.
59
60 - @--uuid@ := Output only the UUIDs of object(s) in the API response, one per line.
61
62 h3. Resource types and methods
63
64 Get list of resource types
65 @arv --help@
66
67 Get list of resource methods for the "user" resource type
68 @arv user --help@