X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9262dfeaba64d589cc8266cfc02b6a2b10278d48..2183113c4c357e07719251854e3d249cdcd394dd:/doc/user/reference/sdk-cli.textile?ds=inline diff --git a/doc/user/reference/sdk-cli.textile b/doc/user/reference/sdk-cli.textile new file mode 100644 index 0000000000..e909a8ba07 --- /dev/null +++ b/doc/user/reference/sdk-cli.textile @@ -0,0 +1,77 @@ +--- +layout: default +navsection: userguide +title: "Command line SDK" +navorder: 322 +--- + +h1. Reference: Command line SDK + +If you are logged in to an Arvados VM, the command line SDK should be installed. Try: + +@arv --help@ + + + +h3. First... + +Set the ARVADOS_API_HOST environment variable. + +@export ARVADOS_API_HOST={{ site.arvados_api_host }}@ + +Log in to Workbench and get an API token for your account. Set the ARVADOS_API_TOKEN environment variable. + +@export +ARVADOS_API_TOKEN=c0vdbi8wp7f703lbthyadlvmaivgldxssy3l32isslmax93k9@ + +If you are using a development instance with an unverifiable SSL certificate, set the ARVADOS_API_HOST_INSECURE environment variable. + +@export ARVADOS_API_HOST_INSECURE=1@ + + + +h3. Usage + +@arv [global_options] resource_type resource_method [method_parameters]@ + + + +h3. Basic examples + +Get UUID of the current user +@arv user current@ + +Get entire record (json) for current user +@arv -h user current@ + +Get entire record for identified user +@arv -h user get --uuid 6dnxa-tpzed-iimd25zhzh84gbk@ + +Update user record +@arv user update --uuid 6dnxa-tpzed-iimd25zhzh84gbk --first-name "Bob"@ + +Get list of groups (showing just UUIDs) +@arv group list@ + +Get list of groups (showing entire records) +@arv -h group list@ + +h3. Global options + + + +- @--json@, @-j@ := Output entire response as compact JSON. + +- @--pretty@, @--human@, @-h@ := Output entire response as JSON with whitespace for better human-readability. + +- @--uuid@ := Output only the UUIDs of object(s) in the API response, one per line. + +h3. Resource types and methods + +Get list of resource types +@arv --help@ + +Get list of resource methods for the "user" resource type +@arv user --help@