return this.Call("PUT", resource, uuid, "", parameters, output)
}
+// Get a resource.
+func (c ArvadosClient) Get(resource string, uuid string, parameters Dict, output interface{}) (err error) {
+ if uuid == "" {
+ // There's no endpoint for that because GET /type/ is
+ // the List API. If there were an endpoint, the
+ // response would be 404: no object has uuid == "".
+ return APIServerError{
+ ServerAddress: c.ApiServer,
+ HttpStatusCode: 404,
+ HttpStatusMessage: "Not Found",
+ }
+ }
+ return c.Call("GET", resource, uuid, "", parameters, output)
+}
+
// List the instances of a resource
//
// resource - the arvados resource on which to list
c.Assert(getback["components"].(map[string]interface{})["c2"].(map[string]interface{})["script"], Equals, "script2")
uuid := getback["uuid"].(string)
+
+ getback = make(Dict)
+ err = arv.Get("pipeline_templates", uuid, nil, &getback)
+ c.Assert(err, Equals, nil)
+ c.Assert(getback["name"], Equals, "tmp")
+ c.Assert(getback["components"].(map[string]interface{})["c1"].(map[string]interface{})["script"], Equals, "script1")
+
getback = make(Dict)
err = arv.Update("pipeline_templates", uuid,
Dict{