Request a tab10 session URL for personalised risk communication
Source:R/request_tab10.R
request_tab10.RdUploads BDS data to the server (reusing the same upload mechanism as
upload_data()) and constructs a URL to a standalone tab10 deployment
with the resulting session key attached. Callers (e.g. jamesapp) use the
returned URL to hand off control to tab10, which retrieves the uploaded
data itself via the session's /rda path.
Arguments
- txt
A JSON string, URL, or file with BDS data in JSON format. Data should conform to the BDS JGZ 3.2.5 specification.
- sitehost
The JAMES server that receives the upload (the same host serving this very endpoint). Defaults to
"http://localhost:8080"if not specified.- tab10host
The server hosting the
tab10Shiny app, e.g."https://james.groeidiagrammen.nl/tab10". Defaults tositehostwith a/tab10path appended.- session
Optional session key if data is already uploaded to
sitehost(e.g. by a priorrequest_site()call). When given,txtis ignored and no new upload happens –tab10retrieves the data itself via the existing session's/rdapath, so the same session key already used for/sitecan be handed totab10as-is.- format
JSON schema version, e.g.,
"3.0". Used when uploading.
Value
A character string URL pointing to the tab10 app with a
?session= query parameter, or, if no session could be obtained, the bare
tab10host URL.
Examples
fn <- system.file("testdata", "client3.json", package = "james")
if (FALSE) { # \dontrun{
url <- request_tab10(txt = fn, sitehost = "http://localhost:8080")
url
} # }