Hello,
We are unsuccessful acessing files on the labkey server through Rlabkey. Selectrows in a folder succeeds, bu then acessing files through webdav in the same folder for the same user (API key) fails with error code 401 (unauthorized). Aslo, webdav through the browser works fine. What needs to be configured for webdav through Rlabkey?
baseurl <- "http://bifx.mrmhealth.com:8080/labkey"
folderpath <- "/MRM Health/M002/Pre-clinical/E-00065 Rat"
setwd("~/labkey/M002/Pre-clinical")
library(Rlabkey)
labkey.mgx <- labkey.selectRows(
baseUrl = baseurl,
folderPath=folderpath,
schemaName="assay.General.Whole metagenome",
queryName="Runs",
viewName="",
colNameOpt="rname")
datafile <- gsub(".+@files/(.+)", "\\1", labkey.mgx$realtiveabundances)
labkey.webdav.get(
baseUrl=baseurl,
folderPath=folderpath,
remoteFilePath=datafile,
localFilePath="rat.mgx.tsv",
overwrite=T)
Error in handleError(response, haltOnError) :
HTTP request was unsuccessful. Status code = 401, Error message = /_webdav/MRM Health/M002/Pre-clinical/E-00065 Rat/@files/assaydata/ca-mrm-bacteria-filtered-ra_2020_12_04_20_04.tsv
Thanks and regards