10 Set up an API client user agent:
13 <pre><code class="userinput">
15 my $arv = Arvados->new('apiVersion' => 'v1');
19 The SDK retrieves the list of API methods from the server at run time. Therefore, the set of available methods is determined by the server version rather than the SDK version.
26 <pre><code class="userinput">my $test_link = $arv->{'links'}->{'create'}->execute('link' => { 'link_class' => 'test', 'name' => 'test' });
33 <pre><code class="userinput">my $some_user = $arv->{'collections'}->{'get'}->execute('uuid' => $collection_uuid);
39 Retrieve an object by ID:
42 <pre><code class="userinput">my $some_user = $arv->{'users'}->{'get'}->execute('uuid' => $current_user_uuid);
46 Get the UUID of an object that was retrieved using the SDK:
49 <pre><code class="userinput">my $current_user_uuid = $current_user->{'uuid'}
55 Get a list of objects:
58 <pre><code class="userinput">my $repos = $arv->{'repositories'}->{'list'}->execute;
59 print ("UUID of first repo returned is ", $repos->{'items'}->[0], "\n");
68 <pre><code class="userinput">my $test_link = $arv->{'links'}->{'update'}->execute(
69 'uuid' => $test_link->{'uuid'},
70 'link' => { 'properties' => { 'foo' => 'bar' } });
76 Get the User object for the current user:
79 <pre><code class="userinput">my $current_user = $arv->{'users'}->{'current'}->execute;