8 Copyright (C) The Arvados Authors. All rights reserved.
10 SPDX-License-Identifier: CC-BY-SA-3.0
15 Import the module and set up an API client user agent:
17 {% codeblock as ruby %}
19 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 ruby %}
29 new_link = arv.link.create(link: {link_class: 'test', name: 'test'})
36 {% codeblock as ruby %}
37 arv.link.delete(uuid: new_link[:uuid])
42 Retrieve an object by ID:
44 {% codeblock as ruby %}
45 some_user = arv.user.get(uuid: current_user_uuid)
50 Get a list of objects:
52 {% codeblock as ruby %}
53 repos = arv.repository.list
54 first_repo = repos[:items][0]
55 puts "UUID of first repo returned is #{first_repo[:uuid]}"</code>
58 UUID of first repo returned is zzzzz-s0uqq-b1bnybpx3u5temz
64 {% codeblock as ruby %}
65 updated_link = arv.link.update(uuid: new_link[:uuid],
66 link: {properties: {foo: 'bar'}})
71 Get the User object for the current user:
73 {% codeblock as ruby %}
74 current_user = arv.user.current
77 Get the UUID of an object that was retrieved using the SDK:
79 {% codeblock as ruby %}
80 current_user_uuid = current_user[:uuid]