11 import org.arvados.sdk.Arvados;
15 String apiName = "arvados";
16 String apiVersion = "v1";
18 Arvados arv = new Arvados(apiName, apiVersion);
24 Map<String, String> collection = new HashMap<String, String>();
25 collection.put("name", "create example");
27 Map<String, Object> params = new HashMap<String, Object>();
28 params.put("collection", collection);
29 Map response = arv.call("collections", "create", params);
35 Map<String, Object> params = new HashMap<String, Object>();
36 params.put("uuid", uuid);
37 Map response = arv.call("collections", "delete", params);
43 params = new HashMap<String, Object>();
44 params.put("uuid", userUuid);
45 Map response = arv.call("users", "get", params);
51 Map<String, Object> params = new HashMap<String, Object>();
52 Map response = arv.call("users", "list", params);
54 // get uuid of the first user from the response
55 List items = (List)response.get("items");
57 Map firstUser = (Map)items.get(0);
58 String userUuid = (String)firstUser.get("uuid");
64 Map<String, String> collection = new HashMap<String, String>();
65 collection.put("name", "update example");
67 Map<String, Object> params = new HashMap<String, Object>();
68 params.put("uuid", uuid);
69 params.put("collection", collection);
70 Map response = arv.call("collections", "update", params);
76 Map<String, Object> params = new HashMap<String, Object>();
77 Map response = arv.call("users", "current", params);