From fcc274ea3915d24e2f24be30b6b97745e2080902 Mon Sep 17 00:00:00 2001 From: Will Beasley Date: Sun, 13 Oct 2024 23:47:14 -0500 Subject: [PATCH] point to new server ref #542 --- R/redcap-metadata-coltypes.R | 21 +++++-------------- R/redcap-metadata-read.R | 14 ++++++------- R/redcap-metadata-write.R | 4 ++-- R/redcap-survey-link-export-oneshot.R | 4 ++-- R/redcap-users-export.R | 4 ++-- .../r-medicine-2024-part-1.R | 2 +- inst/test-data/project-color-boxes/Readme.md | 4 ++-- man/redcap_metadata_coltypes.Rd | 10 ++++----- man/redcap_metadata_read.Rd | 14 ++++++------- man/redcap_metadata_write.Rd | 4 ++-- man/redcap_survey_link_export_oneshot.Rd | 4 ++-- man/redcap_users_export.Rd | 4 ++-- playgrounds/Breaking_batch.R | 4 ++-- playgrounds/cron-trigger-hack.R | 4 ++-- tests/testthat/test-read-errors.R | 8 +++---- tests/testthat/test-variables.R | 2 +- tests/testthat/test-write-error.R | 4 ---- vignettes/BasicREDCapROperations.Rmd | 4 ++-- vignettes/TroubleshootingApiCalls.Rmd | 20 +++++++++--------- vignettes/advanced-redcapr-operations.Rmd | 6 +++--- vignettes/workflow-read.Rmd | 4 ++-- 21 files changed, 65 insertions(+), 80 deletions(-) diff --git a/R/redcap-metadata-coltypes.R b/R/redcap-metadata-coltypes.R index 7c006b77..a6911e38 100644 --- a/R/redcap-metadata-coltypes.R +++ b/R/redcap-metadata-coltypes.R @@ -126,27 +126,27 @@ #' #' @examples #' \dontrun{ -#' uri <- "https://bbmc.ouhsc.edu/redcap/api/" +#' uri <- "https://redcap-dev-2.ouhsc.edu/redcap/api/" #' #' # A simple project -#' token <- "9A81268476645C4E5F03428B8AC3AA7B" # 153 +#' token <- "9A068C425B1341D69E83064A2D273A70" # simple #' col_types <- redcap_metadata_coltypes(uri, token) #' redcap_read_oneshot(uri, token, col_types = col_types)$data #' #' # A longitudinal project -#' token <- "0434F0E9CF53ED0587847AB6E51DE762" # 212 +#' token <- "DA6F2BB23146BD5A7EA3408C1A44A556" # longitudinal #' col_types <- redcap_metadata_coltypes(uri, token) #' redcap_read_oneshot(uri, token, col_types = col_types)$data #' #' # A repeating instruments project -#' token <- "56F43A10D01D6578A46393394D76D88F" # 2603 +#' token <- "64720C527CA236880FBA785C9934F02A" # repeating-instruments-sparse #' col_types <- redcap_metadata_coltypes(uri, token) #' redcap_read_oneshot(uri, token, col_types = col_types)$data #' #' # A project with every field type and validation type. #' # Notice it throws a warning that some fields use a comma for a decimal, #' # while other fields use a period/dot as a decimal -#' token <- "8F5313CAA266789F560D79EFCEE2E2F1" # 2634 - Validation Types +#' token <- "EB1FD5DDE583364AE605629AB7619397" # validation-types-1 #' col_types <- redcap_metadata_coltypes(uri, token) #' redcap_read_oneshot(uri, token, col_types = col_types)$data #' } @@ -505,14 +505,3 @@ redcap_metadata_internal <- function( plumbing_variables = .plumbing_variables ) } - -# uri <- "https://bbmc.ouhsc.edu/redcap/api/" -# -# A simple project (pid 153) -# REDCapR:::redcap_metadata_internal(uri, "9A81268476645C4E5F03428B8AC3AA7B")$d_variable -# -# A longitudinal project (pid 212) -# REDCapR:::redcap_metadata_internal(uri, "0434F0E9CF53ED0587847AB6E51DE762")$d_variable -# -# # A repeating measures (pid 3181) -# REDCapR:::redcap_metadata_internal(uri, "22C3FF1C8B08899FB6F86D91D874A159")$d_variable diff --git a/R/redcap-metadata-read.R b/R/redcap-metadata-read.R index d60fb754..044ceab1 100644 --- a/R/redcap-metadata-read.R +++ b/R/redcap-metadata-read.R @@ -59,18 +59,18 @@ #' #' @examples #' \dontrun{ -#' uri <- "https://bbmc.ouhsc.edu/redcap/api/" +#' uri <- "https://redcap-dev-2.ouhsc.edu/redcap/api/" #' -#' # A simple project (pid 153) -#' token <- "9A81268476645C4E5F03428B8AC3AA7B" +#' # A simple project +#' token <- "9A068C425B1341D69E83064A2D273A70" # simple #' REDCapR::redcap_metadata_read(redcap_uri=uri, token=token) #' -#' # A longitudinal project (pid 212) -#' token <- "0434F0E9CF53ED0587847AB6E51DE762" +#' # A longitudinal project +#' token <- "0434F0E9CF53ED0587847AB6E51DE762" # longitudinal #' REDCapR::redcap_metadata_read(redcap_uri=uri, token=token) #' -#' # A repeating measures (pid 3181) -#' token <- "22C3FF1C8B08899FB6F86D91D874A159" +#' # A repeating measures +#' token <- "77842BD8C18D3408819A21DD0154CCF4" # vignette-repeating #' REDCapR::redcap_metadata_read(redcap_uri=uri, token=token) #' } diff --git a/R/redcap-metadata-write.R b/R/redcap-metadata-write.R index 867e8c8c..f87cd727 100644 --- a/R/redcap-metadata-write.R +++ b/R/redcap-metadata-write.R @@ -55,8 +55,8 @@ #' \dontrun{ #' # Please don't run this example without changing the token to #' # point to your server. It could interfere with our testing suite. -#' uri <- "https://bbmc.ouhsc.edu/redcap/api/" -#' token <- "457C24AB91B7FCF5B1A7DA67E70E24C7" +#' uri <- "https://redcap-dev-2.ouhsc.edu/redcap/api/" +#' token <- "06C38F6D76B3863DFAE84069D8DBCFFC" # metadata-write #' #' # Read in the dictionary in R's memory from a csv file. #' ds_to_write <- diff --git a/R/redcap-survey-link-export-oneshot.R b/R/redcap-survey-link-export-oneshot.R index e7005bae..97f83831 100644 --- a/R/redcap-survey-link-export-oneshot.R +++ b/R/redcap-survey-link-export-oneshot.R @@ -68,8 +68,8 @@ #' #' @examples #' \dontrun{ -#' uri <- "https://bbmc.ouhsc.edu/redcap/api/" -#' token <- "8FA9A6BDAE2C0B5DD3CB472DD8E8918C" # pid=817 +#' uri <- "https://redcap-dev-2.ouhsc.edu/redcap/api/" +#' token <- "4780D038A2080BA2E7CC904A14218662" # survey #' record <- 1 #' instrument <- "participant_morale_questionnaire" #' # event <- "" # only for longitudinal projects diff --git a/R/redcap-users-export.R b/R/redcap-users-export.R index e97d36fa..0b6de58f 100644 --- a/R/redcap-users-export.R +++ b/R/redcap-users-export.R @@ -52,8 +52,8 @@ #' #' @examples #' \dontrun{ -#' uri <- "https://bbmc.ouhsc.edu/redcap/api/" -#' token <- "06DEFB601F9B46847DAA9DF0CFA951B4" +#' uri <- "https://redcap-dev-2.ouhsc.edu/redcap/api/" +#' token <- "0BF920AAF9566A8E603F528A498A5729" # dag #' result <- REDCapR::redcap_users_export(redcap_uri=uri, token=token) #' result$data_user #' result$data_user_form diff --git a/documentation-for-developers/r-medicine-2024-part-1.R b/documentation-for-developers/r-medicine-2024-part-1.R index 53637ed7..08efec39 100644 --- a/documentation-for-developers/r-medicine-2024-part-1.R +++ b/documentation-for-developers/r-medicine-2024-part-1.R @@ -23,7 +23,7 @@ View(ds_1) # View corresponding REDCap project in browser: -# https://bbmc.ouhsc.edu/redcap/redcap_v14.3.13/DataEntry/record_home.php?pid=3181&arm=1&id=1 +# https://redcap-dev-2.ouhsc.edu/redcap/redcap_v14.3.13/DataEntry/record_home.php?pid=62&arm=1&id=1 # ---- redcap_metadata_read ---------------------------------------------------- diff --git a/inst/test-data/project-color-boxes/Readme.md b/inst/test-data/project-color-boxes/Readme.md index 4c66b1be..4fbe085a 100644 --- a/inst/test-data/project-color-boxes/Readme.md +++ b/inst/test-data/project-color-boxes/Readme.md @@ -23,13 +23,13 @@ id,redcap_data_access_group,color___r,color___g,color___b,color___p,thisform_com The url and token of the project are: ```r -url <- "https://bbmc.ouhsc.edu/redcap/api" +url <- "https://redcap-dev-2.ouhsc.edu/redcap/api" token <- "BECD55331CA005887DA3543230E10284" ``` Here's some (slightly modified) code that Benjamin wrote for Issue #51: ```r -> url <- "https://bbmc.ouhsc.edu/redcap/api/" +> url <- "https://redcap-dev-2.ouhsc.edu/redcap/api/" > token <- "BECD55331CA005887DA3543230E10284" > > post_result_all <- httr::POST(url=url, body=list(token=token, content='record', format='csv', rawOrLabel='label', fields='id, color')) diff --git a/man/redcap_metadata_coltypes.Rd b/man/redcap_metadata_coltypes.Rd index 93feafec..a29b0e5f 100644 --- a/man/redcap_metadata_coltypes.Rd +++ b/man/redcap_metadata_coltypes.Rd @@ -135,27 +135,27 @@ use \code{\link[readr:parse_atomic]{readr::parse_integer()}} to cast it to the d } \examples{ \dontrun{ -uri <- "https://bbmc.ouhsc.edu/redcap/api/" +uri <- "https://redcap-dev-2.ouhsc.edu/redcap/api/" # A simple project -token <- "9A81268476645C4E5F03428B8AC3AA7B" # 153 +token <- "9A068C425B1341D69E83064A2D273A70" # simple col_types <- redcap_metadata_coltypes(uri, token) redcap_read_oneshot(uri, token, col_types = col_types)$data # A longitudinal project -token <- "0434F0E9CF53ED0587847AB6E51DE762" # 212 +token <- "DA6F2BB23146BD5A7EA3408C1A44A556" # longitudinal col_types <- redcap_metadata_coltypes(uri, token) redcap_read_oneshot(uri, token, col_types = col_types)$data # A repeating instruments project -token <- "56F43A10D01D6578A46393394D76D88F" # 2603 +token <- "64720C527CA236880FBA785C9934F02A" # repeating-instruments-sparse col_types <- redcap_metadata_coltypes(uri, token) redcap_read_oneshot(uri, token, col_types = col_types)$data # A project with every field type and validation type. # Notice it throws a warning that some fields use a comma for a decimal, # while other fields use a period/dot as a decimal -token <- "8F5313CAA266789F560D79EFCEE2E2F1" # 2634 - Validation Types +token <- "EB1FD5DDE583364AE605629AB7619397" # validation-types-1 col_types <- redcap_metadata_coltypes(uri, token) redcap_read_oneshot(uri, token, col_types = col_types)$data } diff --git a/man/redcap_metadata_read.Rd b/man/redcap_metadata_read.Rd index 42c8eb5b..ad002625 100644 --- a/man/redcap_metadata_read.Rd +++ b/man/redcap_metadata_read.Rd @@ -69,18 +69,18 @@ one field in the project's dataset. } \examples{ \dontrun{ -uri <- "https://bbmc.ouhsc.edu/redcap/api/" +uri <- "https://redcap-dev-2.ouhsc.edu/redcap/api/" -# A simple project (pid 153) -token <- "9A81268476645C4E5F03428B8AC3AA7B" +# A simple project +token <- "9A068C425B1341D69E83064A2D273A70" # simple REDCapR::redcap_metadata_read(redcap_uri=uri, token=token) -# A longitudinal project (pid 212) -token <- "0434F0E9CF53ED0587847AB6E51DE762" +# A longitudinal project +token <- "0434F0E9CF53ED0587847AB6E51DE762" # longitudinal REDCapR::redcap_metadata_read(redcap_uri=uri, token=token) -# A repeating measures (pid 3181) -token <- "22C3FF1C8B08899FB6F86D91D874A159" +# A repeating measures +token <- "77842BD8C18D3408819A21DD0154CCF4" # vignette-repeating REDCapR::redcap_metadata_read(redcap_uri=uri, token=token) } } diff --git a/man/redcap_metadata_write.Rd b/man/redcap_metadata_write.Rd index 923da800..c73a1c0b 100644 --- a/man/redcap_metadata_write.Rd +++ b/man/redcap_metadata_write.Rd @@ -66,8 +66,8 @@ it works for only projects in Development status. \dontrun{ # Please don't run this example without changing the token to # point to your server. It could interfere with our testing suite. -uri <- "https://bbmc.ouhsc.edu/redcap/api/" -token <- "457C24AB91B7FCF5B1A7DA67E70E24C7" +uri <- "https://redcap-dev-2.ouhsc.edu/redcap/api/" +token <- "06C38F6D76B3863DFAE84069D8DBCFFC" # metadata-write # Read in the dictionary in R's memory from a csv file. ds_to_write <- diff --git a/man/redcap_survey_link_export_oneshot.Rd b/man/redcap_survey_link_export_oneshot.Rd index 17eef526..5759db24 100644 --- a/man/redcap_survey_link_export_oneshot.Rd +++ b/man/redcap_survey_link_export_oneshot.Rd @@ -81,8 +81,8 @@ To use this method, you must have API Export privileges in the project. } \examples{ \dontrun{ -uri <- "https://bbmc.ouhsc.edu/redcap/api/" -token <- "8FA9A6BDAE2C0B5DD3CB472DD8E8918C" # pid=817 +uri <- "https://redcap-dev-2.ouhsc.edu/redcap/api/" +token <- "4780D038A2080BA2E7CC904A14218662" # survey record <- 1 instrument <- "participant_morale_questionnaire" # event <- "" # only for longitudinal projects diff --git a/man/redcap_users_export.Rd b/man/redcap_users_export.Rd index 3e0e7805..fc7f0ab4 100644 --- a/man/redcap_users_export.Rd +++ b/man/redcap_users_export.Rd @@ -68,8 +68,8 @@ the user with the role's defined privileges. } \examples{ \dontrun{ -uri <- "https://bbmc.ouhsc.edu/redcap/api/" -token <- "06DEFB601F9B46847DAA9DF0CFA951B4" +uri <- "https://redcap-dev-2.ouhsc.edu/redcap/api/" +token <- "0BF920AAF9566A8E603F528A498A5729" # dag result <- REDCapR::redcap_users_export(redcap_uri=uri, token=token) result$data_user result$data_user_form diff --git a/playgrounds/Breaking_batch.R b/playgrounds/Breaking_batch.R index c0c12fdf..d9ad37ee 100644 --- a/playgrounds/Breaking_batch.R +++ b/playgrounds/Breaking_batch.R @@ -1,6 +1,6 @@ library(REDCapR) -uri<-"https://bbmc.ouhsc.edu/redcap/api/" -token<-"9A81268476645C4E5F03428B8AC3AA7B" +uri<-"https://redcap-dev-2.ouhsc.edu/redcap/api/" +token<-"9A068C425B1341D69E83064A2D273A70" dummy_data<-redcap_read_oneshot(redcap_uri=uri, token=token)$data #testing create_batch_glossary function diff --git a/playgrounds/cron-trigger-hack.R b/playgrounds/cron-trigger-hack.R index 42458cdc..0950aee1 100644 --- a/playgrounds/cron-trigger-hack.R +++ b/playgrounds/cron-trigger-hack.R @@ -1,5 +1,5 @@ # Use this hack if the cronjob isn't running properly on the server, -# But the cronjob link is working (see bottom of https://bbmc.ouhsc.edu/redcap/redcap_v10.5.1/ControlCenter/cron_jobs.php) +# But the cronjob link is working (see bottom of https://redcap-dev-2.ouhsc.edu/redcap/redcap_v10.5.1/ControlCenter/cron_jobs.php) httr::GET("https://redcap.ouhsc.edu/redcap/cron.php") -# httr::GET("https://bbmc.ouhsc.edu/redcap/cron.php") +# httr::GET("https://redcap-dev-2.ouhsc.edu/redcap/cron.php") diff --git a/tests/testthat/test-read-errors.R b/tests/testthat/test-read-errors.R index a292e91f..b76f5c9c 100644 --- a/tests/testthat/test-read-errors.R +++ b/tests/testthat/test-read-errors.R @@ -10,7 +10,7 @@ test_that("One Shot: Bad Uri -Not HTTPS", { expect_error( redcap_read_oneshot( - redcap_uri = "http://bbmc.ouhsc.edu/redcap/api/", # Not HTTPS + redcap_uri = "http://redcap-dev-2.ouhsc.edu/redcap/api/", # Not HTTPS token = credential$token ) ) @@ -22,7 +22,7 @@ test_that("One Shot: Bad Uri -wrong address", { returned_object <- redcap_read_oneshot( - redcap_uri = "https://bbmc.ouhsc.edu/redcap/apiFFFFFFFFFFFFFF/", # Wrong url + redcap_uri = "https://redcap-dev-2.ouhsc.edu/redcap/apiFFFFFFFFFFFFFF/", # Wrong url token = credential$token, verbose = FALSE ) @@ -43,7 +43,7 @@ test_that("Batch: Bad Uri -Not HTTPS", { expect_error( redcap_read( - redcap_uri = "http://bbmc.ouhsc.edu/redcap/api/", # Not HTTPS + redcap_uri = "http://redcap-dev-2.ouhsc.edu/redcap/api/", # Not HTTPS token = credential$token ) ) @@ -56,7 +56,7 @@ test_that("Batch: Bad Uri -wrong address", { expect_error( redcap_read( - redcap_uri = "https://bbmc.ouhsc.edu/redcap/apiFFFFFFFFFFFFFF/", # Wrong url + redcap_uri = "https://redcap-dev-2.ouhsc.edu/redcap/apiFFFFFFFFFFFFFF/", # Wrong url token = credential$token ), expected_message diff --git a/tests/testthat/test-variables.R b/tests/testthat/test-variables.R index 74ab099c..759f5ad6 100644 --- a/tests/testthat/test-variables.R +++ b/tests/testthat/test-variables.R @@ -44,7 +44,7 @@ test_that("Bad Uri -wrong address (1 of 2)", { expect_error( redcap_variables( - redcap_uri = "https://bbmc.ouhsc.edu/redcap/apiFFFFFFFFFFFFFF/", # Wrong url + redcap_uri = "https://redcap-dev-2.ouhsc.edu/redcap/apiFFFFFFFFFFFFFF/", # Wrong url token = credential$token ), expected_message diff --git a/tests/testthat/test-write-error.R b/tests/testthat/test-write-error.R index b0cdd8ba..3ea4c17a 100644 --- a/tests/testthat/test-write-error.R +++ b/tests/testthat/test-write-error.R @@ -147,7 +147,3 @@ test_that("Many Batches: writing with read-only privileges --contiue on error", }) rm(credential) - -# playground: -# REDCapR::redcap_write(ds=mtcars, redcap_uri="https://bbmc.ouhsc.edu/redcap/api/", token="9A81268476645C4E5F03428B8AC3AA7B", continue_on_error=TRUE) -# REDCapR::redcap_write(ds=mtcars, redcap_uri="https://bbmc.ouhsc.edu/redcap/redcap_v10.5.1/api/", token="9A81268476645C4E5F03428B8AC3AA7B", continue_on_error=TRUE) diff --git a/vignettes/BasicREDCapROperations.Rmd b/vignettes/BasicREDCapROperations.Rmd index 33c76ba1..97a73cb7 100644 --- a/vignettes/BasicREDCapROperations.Rmd +++ b/vignettes/BasicREDCapROperations.Rmd @@ -39,8 +39,8 @@ There is some information that is specific to the REDCap project, as opposed to ```{r project_values} library(REDCapR) # Load the package into the current R session. -uri <- "https://bbmc.ouhsc.edu/redcap/api/" -token <- "9A81268476645C4E5F03428B8AC3AA7B" # `UnitTestPhiFree` user and simple project (pid 153) +uri <- "https://redcap-dev-2.ouhsc.edu/redcap/api/" +token <- "9A068C425B1341D69E83064A2D273A70" # simple ``` Read all records and fields diff --git a/vignettes/TroubleshootingApiCalls.Rmd b/vignettes/TroubleshootingApiCalls.Rmd index 3f4ee30d..6c6ce818 100644 --- a/vignettes/TroubleshootingApiCalls.Rmd +++ b/vignettes/TroubleshootingApiCalls.Rmd @@ -89,7 +89,7 @@ knitr::include_graphics("images/PostmanScreenshot.png") At the bottom of the playground page, the interface attempts to translate your specific API call to different languages, like Python and R. These suggestions are usually correct, but inspect it critically, as you would for any auto-generated script. -1. **Is the URL/URI correct?** Notice the url typically ends with "api/" so it resembles `https://bbmc.ouhsc.edu/redcap/api/` and *not* `https://bbmc.ouhsc.edu/` (even if redirects to ). +1. **Is the URL/URI correct?** Notice the url typically ends with "api/" so it resembles `https://redcap.ouhsc.edu/redcap/api/` and *not* `https://redcap.ouhsc.edu/` (even if redirects to ). 1. **Is Postman installed and operating correctly?** If it helps to start with a different REDCap server, you can use this dummy project containing fake data hosted by the [OUHSC BBMC](https://www.ouhsc.edu/bbmc/). The url is `https://bbmc.ouhsc.edu/redcap/api/`. There are three key-value pairs: (1) the 'token' is `9A81268476645C4E5F03428B8AC3AA7B`, (2) the 'content' is `record`, and (3) the 'format' should be `CSV`. When checking your own server, the token value should change, but the content and format should not. It should return five records in a CSV format. The 'status' should be `200 OK`. The result should look roughly like this. Notice the line breaks were included in the text values themselves. @@ -121,7 +121,7 @@ knitr::include_graphics("images/PostmanScreenshot.png") 1. **Can a user query the API with cURL?** [cURL](https://curl.se/) is a command line tool that's underneath a lot of libraries. If it's installed correctly on your location machine, it can be executed from the terminal or command line. ```shell - curl -X POST -H "Cache-Control: no-cache" -F "token=9A81268476645C4E5F03428B8AC3AA7B" -F "content=record" -F "format=csv" "https://bbmc.ouhsc.edu/redcap/api/" + curl -X POST -H "Cache-Control: no-cache" -F "token=9A068C425B1341D69E83064A2D273A70" -F "content=record" -F "format=csv" "https://redcap-dev-2.ouhsc.edu/redcap/api/" ``` If all these checks pass, proceed to the next section. If not, start by consulting with your REDCap administrator. If that fails, consider creating a GitHub issue for your package (*e.g.*, [redcapAPI](https://github.com/nutterb/redcapAPI) and [REDCapR](https://ouhscbbmc.github.io/REDCapR/) in R, [phpcap](https://github.com/iuredcap/phpcap) in PHP, and [PyCap](https://pycap.readthedocs.io/en/latest/) in Python). @@ -200,8 +200,8 @@ There are several ways to call REDCap's API from [R](https://cran.r-project.org/ If this check fails, consider attempting again with the url and token used above in the Postman example. ```r - redcap_uri <- "https://bbmc.ouhsc.edu/redcap/api/" - token <- "9A81268476645C4E5F03428B8AC3AA7B" + redcap_uri <- "https://redcap-dev-2.ouhsc.edu/redcap/api/" + token <- "9A068C425B1341D69E83064A2D273A70" post_body <- list( token = token, @@ -329,8 +329,8 @@ If you're not using REDCapR, you can skip this section and proceed to "Exporting ```r library(REDCapR) # Load the package into the current R session. - uri <- "https://bbmc.ouhsc.edu/redcap/api/" - token <- "9A81268476645C4E5F03428B8AC3AA7B" + uri <- "https://redcap-dev-2.ouhsc.edu/redcap/api/" + token <- "9A068C425B1341D69E83064A2D273A70" redcap_read(redcap_uri = uri, token = token)$data ``` @@ -384,8 +384,8 @@ If you're not using REDCapR, you can skip this section and proceed to "Exporting ```r library(REDCapR) # Load the package into the current R session, if you haven't already. - uri <- "https://bbmc.ouhsc.edu/redcap/api/" - token <- "9A81268476645C4E5F03428B8AC3AA7B" + uri <- "https://redcap-dev-2.ouhsc.edu/redcap/api/" + token <- "9A068C425B1341D69E83064A2D273A70" project <- redcap_project$new(redcap_uri = uri, token = token) ds_three_columns <- project$read(fields = c("record_id", "sex", "age"))$data @@ -447,8 +447,8 @@ If you're not using redcapAPI, you can skip this section and proceed to 'Importi ```r library(redcapAPI) # Load the package into the current R session. rcon <- redcapConnection( - url = "https://bbmc.ouhsc.edu/redcap/api/", - token = "9A81268476645C4E5F03428B8AC3AA7B" + url = "https://redcap-dev-2.ouhsc.edu/redcap/api/", + token = "9A068C425B1341D69E83064A2D273A70" ) exportRecords(rcon) ``` diff --git a/vignettes/advanced-redcapr-operations.Rmd b/vignettes/advanced-redcapr-operations.Rmd index 2ac611b2..d3a889db 100644 --- a/vignettes/advanced-redcapr-operations.Rmd +++ b/vignettes/advanced-redcapr-operations.Rmd @@ -41,9 +41,9 @@ There is some information that is specific to a REDCap project, as opposed to an ```{r project_values} library(REDCapR) #Load the package into the current R session. -uri <- "https://bbmc.ouhsc.edu/redcap/api/" -token_simple <- "9A81268476645C4E5F03428B8AC3AA7B" -token_longitudinal <- "0434F0E9CF53ED0587847AB6E51DE762" +uri <- "https://redcap-dev-2.ouhsc.edu/redcap/api/" +token_simple <- "9A068C425B1341D69E83064A2D273A70" +token_longitudinal <- "DA6F2BB23146BD5A7EA3408C1A44A556" ``` Converting from tall/long to wide diff --git a/vignettes/workflow-read.Rmd b/vignettes/workflow-read.Rmd index 358c7194..ac9ab4de 100644 --- a/vignettes/workflow-read.Rmd +++ b/vignettes/workflow-read.Rmd @@ -79,8 +79,8 @@ This might be the first time you've ever needed to request a token, and your institution may have a formal process for API approval. Your REDCap admin can help. -For this vignette, we'll use a fake dataset hosted at `https://bbmc.ouhsc.edu/redcap/api/` -and accessible with the token "9A81268476645C4E5F03428B8AC3AA7B". +For this vignette, we'll use a fake dataset hosted at `https://redcap-dev-2.ouhsc.edu/redcap/api/` +and accessible with the token "9A068C425B1341D69E83064A2D273A70". Note to REDCap Admins: