Issues updating rows with Rlabkey

LabKey Support Forum (Inactive)
Issues updating rows with Rlabkey mohara  2024-05-10 12:52
Status: Active
 

I'm not sure what you mean about "within network" vs. "outside of network" - that could be making a difference?
As far as a 'pull' working but not a 'push', that seems like a permissions issue - can the account that apikey will authenticate both read and insert into that list? In your two examples, there are different queryName values, so maybe that account can read one and not write the other?

But meanwhile, you should not put that setDefaults call within the insertRows. I'm not actually sure why it would work in selectRows either (if it does indeed work there). Depending on the rest of the script you're using, you could place it outside/call setDefaults separately/first,

labkey.setDefaults(apiKey="apikeyapikeyapikeyapikey")

labkey.data<-labkey.insertRows(baseUrl="http://xxx.xxx.xx.xxx:PORT", 
...

OR using a netrc file would mean you didn't need the key itself in the script.

Where to place and how to make sure a netrc gets referenced varies by OS.

--Molly