diff --git a/R/utils_api.R b/R/utils_api.R index 40284089..562e31cd 100644 --- a/R/utils_api.R +++ b/R/utils_api.R @@ -162,6 +162,15 @@ read_secure_json <- function(url, token = NULL, timeout = 60, config = list()) { ) areasWithResClusters <- names(hasResClusters)[hasResClusters] + + hasSTClusters <- unlist( + lapply( + read_secure_json(file.path(dataPath, "areas&depth=2"), ...), + function(x) any(grepl("details-STstorage-", names(x))) + ) + ) + + areasWithSTClusters <- names(hasSTClusters)[hasSTClusters] # Available variables variables <- list() @@ -212,6 +221,7 @@ read_secure_json <- function(url, token = NULL, timeout = 60, config = list()) { linksDef = linksDef, areasWithClusters = intersect(areasWithClusters, areaList), areasWithResClusters = intersect(areasWithResClusters, areaList), + areasWithSTClusters = intersect(areasWithSTClusters, areaList), variables = variables, parameters = params )