8 Copyright (C) The Arvados Authors. All rights reserved.
10 SPDX-License-Identifier: CC-BY-SA-3.0
15 Set up an API client user agent:
17 {% codeblock as perl %}
19 my $arv = Arvados->new('apiVersion' => 'v1');
22 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.
28 {% codeblock as perl %}
29 my $test_link = $arv->{'links'}->{'create'}->execute('link' => { 'link_class' => 'test', 'name' => 'test' });
34 {% codeblock as perl %}
35 my $some_user = $arv->{'collections'}->{'get'}->execute('uuid' => $collection_uuid);
40 Retrieve an object by ID:
42 {% codeblock as perl %}
43 my $some_user = $arv->{'users'}->{'get'}->execute('uuid' => $current_user_uuid);
46 Get the UUID of an object that was retrieved using the SDK:
48 {% codeblock as perl %}
49 my $current_user_uuid = $current_user->{'uuid'}
54 Get a list of objects:
56 {% codeblock as perl %}
57 my $repos = $arv->{'repositories'}->{'list'}->execute;
58 print ("UUID of first repo returned is ", $repos->{'items'}->[0], "\n");
65 {% codeblock as perl %}
66 my $test_link = $arv->{'links'}->{'update'}->execute(
67 'uuid' => $test_link->{'uuid'},
68 'link' => { 'properties' => { 'foo' => 'bar' } });
73 Get the User object for the current user:
75 {% codeblock as perl %}
76 my $current_user = $arv->{'users'}->{'current'}->execute;