diff --git a/pkgdown.yml b/pkgdown.yml index c9aacae..8d0b85f 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -6,7 +6,7 @@ articles: faqs: faqs.html objr: objr.html two-factor: two-factor.html -last_built: 2024-08-12T14:14Z +last_built: 2024-08-12T14:26Z urls: reference: https://scotgovanalysis.github.io/objr/reference article: https://scotgovanalysis.github.io/objr/articles diff --git a/reference/comments.html b/reference/comments.html index 4d58074..726af7d 100644 --- a/reference/comments.html +++ b/reference/comments.html @@ -97,7 +97,11 @@

Value

Examples

- +
if (FALSE) { # \dontrun{
+comments()
+} # }
+
+
diff --git a/search.json b/search.json index d06c614..2c5d64d 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://scotgovanalysis.github.io/objr/LICENCE.html","id":null,"dir":"","previous_headings":"","what":"MIT Licence","title":"MIT Licence","text":"Copyright (c) 2023 Crown Copyright (Scottish Government) Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://scotgovanalysis.github.io/objr/articles/authentication.html","id":"how-authentication-works","dir":"Articles","previous_headings":"","what":"How authentication works","title":"API Authentication","text":"first time send request, API requires Objective Connect user email address password authenticate. successful response API includes token. token can used authenticate subsequent requests session, negating need repeatedly supply email address password. rest article details manage authentication using objr package.","code":""},{"path":"https://scotgovanalysis.github.io/objr/articles/authentication.html","id":"first-request","dir":"Articles","previous_headings":"","what":"First request","title":"API Authentication","text":"need Objective Connect user email address password make first request API. can provided two ways.","code":""},{"path":"https://scotgovanalysis.github.io/objr/articles/authentication.html","id":"r-environment-variables","dir":"Articles","previous_headings":"First request","what":"R Environment variables","title":"API Authentication","text":"Add two variables .Renviron file define email address password. Open .Renviron file edit: Add two variables follows (replacing XXX credentials): Save close .Renviron file. check worked expected, first restart R session run: credentials printed console. Note: important save R session workspace close console may contain Objective Connect credentials. benefit method can leave information .Renviron file objr automatically find time use package.","code":"usethis::edit_r_environ() OBJR_USR = \"XXX\" OBJR_PWD = \"XXX\" Sys.getenv(\"OBJR_USR\") Sys.getenv(\"OBJR_PWD\")"},{"path":"https://scotgovanalysis.github.io/objr/articles/authentication.html","id":"supply-credentials-when-prompted","dir":"Articles","previous_headings":"First request","what":"Supply credentials when prompted","title":"API Authentication","text":"don’t variables defined .Renviron file, objr prompt supply ’re working interactive session.","code":""},{"path":"https://scotgovanalysis.github.io/objr/articles/authentication.html","id":"subsequent-requests","dir":"Articles","previous_headings":"","what":"Subsequent requests","title":"API Authentication","text":"successful API response includes token can used subsequent requests. objr functions automatically parse token API response store R session’s global environment. object exists, objr automatically use authenticate subsequent requests. object doesn’t exist, objr resort using username password, first request.","code":""},{"path":"https://scotgovanalysis.github.io/objr/articles/faqs.html","id":"what-is-the-difference-between-users-and-participants","dir":"Articles","previous_headings":"","what":"What is the difference between users and participants?","title":"Frequently Asked Questions","text":"user individual using Objective Connect. participant user particular workspace. example, person using Objective Connect User UUID associated , also Participant UUID individual workspace member . user can get User UUID running my_user_id(). user can find participant UUID particular workspace using participants().","code":""},{"path":"https://scotgovanalysis.github.io/objr/articles/objr.html","id":"universally-unique-identifiers","dir":"Articles","previous_headings":"","what":"Universally Unique Identifiers","title":"Introduction to objr","text":"useful aware everything Objective Connect associated Universally Unique Identifier (UUID). includes users, workgroups, workspaces, participants workspace assets workspace. Objective Connect UUIDs take form string eight chunks four lower case letters numbers, separated dashes. example: Use API objr package depends UUIDs. UUIDs mostly findable using functions objr (demonstrated article), however can often also find relevant UUIDs webpage URLs. example, example URL viewing workspace: UUID workspace 2vo2-dd3s-1nn9-y20r-b906-u4s2-7134-b352 UUID workgroup 2j47-ff38-lcgg-mnis-3vq8-9536-9jfp-oy44.","code":"84op-9qdu-c692-t4z1-wa4z-h9k3-8454-i71f https://secure.objectiveconnect.co.uk/share/2vo2-dd3s-1nn9-y20r-b906-u4s2- 7134-b352?workgroupUuid=2j47-ff38-lcgg-mnis-3vq8-9536-9jfp-oy44"},{"path":"https://scotgovanalysis.github.io/objr/articles/objr.html","id":"test-your-authentication","dir":"Articles","previous_headings":"","what":"Test your authentication","title":"Introduction to objr","text":"interact Objective Connect API, must provide valid authentication. explained detail vignette(\"authentication\"). might good idea test authentication, especially ’s first time using package. specific function , following simple function get user ID requires input easy way test can get successful response API.","code":"me <- my_user_id()"},{"path":"https://scotgovanalysis.github.io/objr/articles/objr.html","id":"workspaces","dir":"Articles","previous_headings":"","what":"Workspaces","title":"Introduction to objr","text":"see workspaces member : returns data frame row workspace member . Among things, column containing workspace name another containing workspace UUID. example:","code":"workspaces <- my_workspaces() ## workspace_name workspace_uuid ## 1 Project 1 84op-9qdu-c692-t4z1-wa4z-h9k3-8454-i71f ## 2 Project 2 2vo2-dd3s-1nn9-y20r-b906-u4s2-7134-b352"},{"path":"https://scotgovanalysis.github.io/objr/articles/objr.html","id":"assets","dir":"Articles","previous_headings":"","what":"Assets","title":"Introduction to objr","text":"Maybe like download file one workspaces. Objective Connect, files also known ‘assets’. download asset, ’ll need UUID. Note: workspaces two-factor authentication (2FA) enabled, participants use API workspace level actions unless given permission bypass 2FA. See vignette(\"two-factor\") information. Use workspace UUID workspaces get data frame assets workspace: returns data frame row asset workspace. Among things, column containing asset name another containing asset UUID.","code":"assets <- workspace_assets(\"84op-9qdu-c692-t4z1-wa4z-h9k3-8454-i71f\") ## asset_name asset_uuid ## 1 asset1 2j47-ff38-lcgg-mnis-3vq8-9536-9jfp-oy44 ## 2 asset2 l588-e8wp-d6y8-3d01-blby-wag1-ks1s-gmo9"},{"path":"https://scotgovanalysis.github.io/objr/articles/objr.html","id":"download-file","dir":"Articles","previous_headings":"","what":"Download file","title":"Introduction to objr","text":"download document, use UUID file path folder ’d like downloaded file saved : function doesn’t return anything display message R console indicate download success confirm location file:","code":"download_file(document_uuid = \"2j47-ff38-lcgg-mnis-3vq8-9536-9jfp-oy44\", folder = here::here(\"data\")) ## ✔ File downloaded: project-1/data/file1.csv."},{"path":"https://scotgovanalysis.github.io/objr/articles/objr.html","id":"upload-file","dir":"Articles","previous_headings":"","what":"Upload file","title":"Introduction to objr","text":"upload file workspace, use UUID workspace file path file upload: function doesn’t return anything display message R console indicate upload success confirm name file. Now, rerun previous step get data frame workspace assets, see additional row file ’ve just uploaded.","code":"upload_file(here::here(\"data\", \"file2.csv\"), workspace_uuid = \"84op-9qdu-c692-t4z1-wa4z-h9k3-8454-i71f\") ## ✔ New document created: file2.csv. assets <- workspace_assets(\"84op-9qdu-c692-t4z1-wa4z-h9k3-8454-i71f\") ## asset_name asset_uuid ## 1 Asset 1 2j47-ff38-lcgg-mnis-3vq8-9536-9jfp-oy44 ## 2 Asset 2 l588-e8wp-d6y8-3d01-blby-wag1-ks1s-gmo9 ## 3 file2 9tp8-3vme-d381-7o89-4qns-qw99-310b-3d06"},{"path":"https://scotgovanalysis.github.io/objr/articles/two-factor.html","id":"allowing-the-workspace-owner-to-bypass-2fa","dir":"Articles","previous_headings":"","what":"Allowing the workspace owner to bypass 2FA","title":"Two-Factor Authentication","text":"give (workspace owner) permission bypass 2FA, need help workgroup admin. work Scottish Government, please contact package maintainers arrange . Allow 2FA bypassing workgroup. setting can controlled via API, Objective Connect browser interface. can done workgroup admin. Option 1: Use allow_bypass_2fa(), providing relevant workgroup UUID. Option 2: workgroup admin isn’t R user, can use API interactive documentation. Use ‘Authorise’ button setup authentication. Execute /workgroups/{uuid}/bypassTwoStepAllowed endpoint, providing workgroup UUID. Temporarily disable 2FA workspace. 2FA enforced workgroup level, workgroup admin need disable setting first. Summary section workspace page, select three dots icon (…) top right-hand corner, Two-step verification. prompted confirm, select Disable. Give (workspace owner) permission bypass 2FA using participant_bypass_2fa(). need participant UUID, can found using participants(). Check worked using participants(). bypass_2fa column returned data frame contain TRUE name. Reinstate 2FA workspace workgroup way disabled step 2.","code":""},{"path":"https://scotgovanalysis.github.io/objr/articles/two-factor.html","id":"allowing-other-participants-to-bypass-2fa","dir":"Articles","previous_headings":"","what":"Allowing other participants to bypass 2FA","title":"Two-Factor Authentication","text":"(workspace owner) can now bypass 2FA, can now provide bypassing permissions workspace members. can done way ; using participant_bypass_2fa() providing relevant members’ participant UUID. Scottish Government Objective Connect workspaces, permissions limited Scottish Government staff external participants. wish revoke permissions bypass 2FA, use participant_bypass_2fa() set allow_bypass = FALSE. Remember, check status 2FA bypassing participants workspace, use participants().","code":""},{"path":"https://scotgovanalysis.github.io/objr/articles/two-factor.html","id":"getting-more-help","dir":"Articles","previous_headings":"","what":"Getting more help","title":"Two-Factor Authentication","text":"process can quite fiddly. unsure issues , please contact package maintainers.","code":""},{"path":"https://scotgovanalysis.github.io/objr/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Scottish Government  Email Scottish Government>  Scottish Government GitHub profile>. Copyright holder. Alice Hannah  Email Alice Hannah>  Alice Hannah GitHub profile>. Author, maintainer.","code":""},{"path":"https://scotgovanalysis.github.io/objr/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Hannah (2024). objr: Wrapper Objective APIs. R package version 0.0.0.9002, https://ScotGovAnalysis.github.io/objr/, https://github.com/ScotGovAnalysis/objr.","code":"@Manual{, title = {objr: Wrapper for Objective APIs}, author = {Alice Hannah}, year = {2024}, note = {R package version 0.0.0.9002, https://ScotGovAnalysis.github.io/objr/}, url = {https://github.com/ScotGovAnalysis/objr}, }"},{"path":"https://scotgovanalysis.github.io/objr/index.html","id":"objr","dir":"","previous_headings":"","what":"Wrapper for Objective APIs","title":"Wrapper for Objective APIs","text":"objr aims provide convenient method interacting Objective Connect using R, making use Objective Connect API.","code":""},{"path":"https://scotgovanalysis.github.io/objr/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Wrapper for Objective APIs","text":"package can installed directly GitHub. Note method requires remotes package may work within Scottish Government network. Finally, package can also installed downloading zip repository running following code, replacing section marked <> (including arrows ) location downloaded zip:","code":"remotes::install_github( \"ScotGovAnalysis/objr\", upgrade = \"never\", build_vignettes = TRUE ) remotes::install_local( \"/objr-main.zip\", upgrade = \"never\", build_vignettes = TRUE )"},{"path":"https://scotgovanalysis.github.io/objr/index.html","id":"licence","dir":"","previous_headings":"","what":"Licence","title":"Wrapper for Objective APIs","text":"Unless stated otherwise, codebase released MIT Licence. covers codebase sample code documentation. documentation © Crown copyright available terms Open Government 3.0 licence.","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/allow_bypass_2fa.html","id":null,"dir":"Reference","previous_headings":"","what":"Allow/disallow bypassing of two-factor authentication for workgroup — allow_bypass_2fa","title":"Allow/disallow bypassing of two-factor authentication for workgroup — allow_bypass_2fa","text":"information two-factor authentication can found vignette(\"two-factor\").","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/allow_bypass_2fa.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Allow/disallow bypassing of two-factor authentication for workgroup — allow_bypass_2fa","text":"","code":"allow_bypass_2fa(workgroup_uuid, allow_bypass = TRUE, use_proxy = FALSE)"},{"path":"https://scotgovanalysis.github.io/objr/reference/allow_bypass_2fa.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Allow/disallow bypassing of two-factor authentication for workgroup — allow_bypass_2fa","text":"workgroup_uuid Workgroup UUID allow_bypass Logical indicate whether workgroup allow selected participants bypass two-factor authentication verification. use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/asset_info.html","id":null,"dir":"Reference","previous_headings":"","what":"Get asset information — asset_info","title":"Get asset information — asset_info","text":"Get asset information","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/asset_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get asset information — asset_info","text":"","code":"asset_info(asset_uuid, use_proxy = FALSE)"},{"path":"https://scotgovanalysis.github.io/objr/reference/asset_info.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get asset information — asset_info","text":"asset_uuid UUID asset use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/asset_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get asset information — asset_info","text":"Named list containing: uuid, name, type, extension, description.","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/comments.html","id":null,"dir":"Reference","previous_headings":"","what":"Get comments for workspaces of current user — comments","title":"Get comments for workspaces of current user — comments","text":"Get comments workspaces current user","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/comments.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get comments for workspaces of current user — comments","text":"","code":"comments( created_after = NULL, thread_uuid = NULL, mention_uuid = NULL, workgroup_uuid = NULL, page = NULL, size = NULL, use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/comments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get comments for workspaces of current user — comments","text":"created_after Date (optionally time) filter comments created since date/time. time supplied, comments made day included. thread_uuid UUID thread filter mention_uuid UUID user filter comments mentioned workgroup_uuid UUID workgroup filter page Page number responses return (0..N). size Number results returned per page. use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/comments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get comments for workspaces of current user — comments","text":"Data frame","code":""},{"path":[]},{"path":"https://scotgovanalysis.github.io/objr/reference/create_folder.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a new folder — create_folder","title":"Create a new folder — create_folder","text":"Create new folder","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/create_folder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a new folder — create_folder","text":"","code":"create_folder( folder_name, workspace_uuid, description = NULL, parent_uuid = NULL, use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/create_folder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a new folder — create_folder","text":"folder_name Name give new folder workspace_uuid UUID workspace create new folder description Optional description folder parent_uuid UUID another folder workspace create new folder within. supplied, folder created top-level workspace. use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/download_file.html","id":null,"dir":"Reference","previous_headings":"","what":"Download a file — download_file","title":"Download a file — download_file","text":"Download file","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/download_file.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download a file — download_file","text":"","code":"download_file(document_uuid, folder, use_proxy = FALSE)"},{"path":"https://scotgovanalysis.github.io/objr/reference/download_file.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download a file — download_file","text":"document_uuid UUID existing document folder Folder save downloaded file use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/my_user_id.html","id":null,"dir":"Reference","previous_headings":"","what":"Get user ID for current authenticated user — my_user_id","title":"Get user ID for current authenticated user — my_user_id","text":"Get user ID current authenticated user","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/my_user_id.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get user ID for current authenticated user — my_user_id","text":"","code":"my_user_id(use_proxy = FALSE)"},{"path":"https://scotgovanalysis.github.io/objr/reference/my_user_id.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get user ID for current authenticated user — my_user_id","text":"use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/my_user_id.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get user ID for current authenticated user — my_user_id","text":"character value authenticated user's ID","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/my_user_id.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get user ID for current authenticated user — my_user_id","text":"","code":"if (FALSE) { # \\dontrun{ my_user_id() } # }"},{"path":"https://scotgovanalysis.github.io/objr/reference/my_workspaces.html","id":null,"dir":"Reference","previous_headings":"","what":"Get workspaces the current user is a member of — my_workspaces","title":"Get workspaces the current user is a member of — my_workspaces","text":"Get workspaces current user member ","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/my_workspaces.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get workspaces the current user is a member of — my_workspaces","text":"","code":"my_workspaces( workgroup_uuid = NULL, page = NULL, size = NULL, use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/my_workspaces.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get workspaces the current user is a member of — my_workspaces","text":"workgroup_uuid UUID workgroup filter page Page number responses return (0..N). size Number results returned per page. use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/my_workspaces.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get workspaces the current user is a member of — my_workspaces","text":"Data frame","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/new_reply.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a new reply to a thread — new_reply","title":"Create a new reply to a thread — new_reply","text":"Create new reply thread","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/new_reply.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a new reply to a thread — new_reply","text":"","code":"new_reply( thread_uuid, text, mentioned_assets = NULL, mentioned_users = NULL, use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/new_reply.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a new reply to a thread — new_reply","text":"thread_uuid UUID thread reply text Character string include body thread mentioned_assets UUID(s) asset(s) mention mentioned_users UUID(s) user(s) mention use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/new_reply.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a new reply to a thread — new_reply","text":"API response (invisibly)","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/new_thread.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a new thread — new_thread","title":"Create a new thread — new_thread","text":"Create new thread","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/new_thread.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a new thread — new_thread","text":"","code":"new_thread( workspace_uuid, text, mentioned_assets = NULL, mentioned_users = NULL, use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/new_thread.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a new thread — new_thread","text":"workspace_uuid UUID workspace text Character string include body thread mentioned_assets UUID(s) asset(s) mention mentioned_users UUID(s) user(s) mention use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/new_thread.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a new thread — new_thread","text":"API response (invisibly)","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/new_version.html","id":null,"dir":"Reference","previous_headings":"","what":"Upload a file to create a new document version — new_version","title":"Upload a file to create a new document version — new_version","text":"Upload file create new document version","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/new_version.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Upload a file to create a new document version — new_version","text":"","code":"new_version(file, document_uuid, use_proxy = FALSE)"},{"path":"https://scotgovanalysis.github.io/objr/reference/new_version.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Upload a file to create a new document version — new_version","text":"file File path document upload document_uuid UUID existing document use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/objr.html","id":null,"dir":"Reference","previous_headings":"","what":"Core request function — objr","title":"Core request function — objr","text":"Core request function","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/objr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Core request function — objr","text":"","code":"objr( endpoint, url_path = NULL, url_query = NULL, method = \"GET\", body = NULL, path = NULL, accept = \"application/json\", content_type = \"application/json\", use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/objr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Core request function — objr","text":"endpoint endpoint append API server address url_path list values added request URL path. Values separated /. url_query list named values define query parameters method HTTP method use; e.g. GET, POST, PUT. Defaults GET. body list named values passed request body path Optional file path save body request (mainly used downloading files) accept Accept header. Defaults 'application/json'. content_type Content-Type header. Defaults 'application/json'. use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/objr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Core request function — objr","text":"httr2 httr2::response()","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/objr_auth.html","id":null,"dir":"Reference","previous_headings":"","what":"Authenticate HTTP request — objr_auth","title":"Authenticate HTTP request — objr_auth","text":"sets authorisation header HTTP request. token variable exists global environment, used, otherwise, user prompted enter authenticating username password.","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/objr_auth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Authenticate HTTP request — objr_auth","text":"","code":"objr_auth(req)"},{"path":"https://scotgovanalysis.github.io/objr/reference/objr_auth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Authenticate HTTP request — objr_auth","text":"req httr2 request","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/objr_auth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Authenticate HTTP request — objr_auth","text":"modified httr2 request","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/objr_auth.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Authenticate HTTP request — objr_auth","text":"","code":"if (FALSE) { # \\dontrun{ httr2::request(\"http://example.com\") |> objr_auth() } # } token <- \"test\" httr2::request(\"http://example.com\") |> objr_auth() #> #> GET http://example.com #> Headers: #> • Authorization: 'test' #> Body: empty"},{"path":"https://scotgovanalysis.github.io/objr/reference/participant_bypass_2fa.html","id":null,"dir":"Reference","previous_headings":"","what":"Allow/disallow bypassing of two-factor authentication for workspace participant — participant_bypass_2fa","title":"Allow/disallow bypassing of two-factor authentication for workspace participant — participant_bypass_2fa","text":"Note setting can updated workspace owner. information two-factor authentication can found vignette(\"two-factor\").","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/participant_bypass_2fa.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Allow/disallow bypassing of two-factor authentication for workspace participant — participant_bypass_2fa","text":"","code":"participant_bypass_2fa( participant_uuid, allow_bypass = TRUE, use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/participant_bypass_2fa.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Allow/disallow bypassing of two-factor authentication for workspace participant — participant_bypass_2fa","text":"participant_uuid Participant UUID (note different user UUID) allow_bypass Logical indicate whether participant able bypass two-factor authentication workspace. use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/participants.html","id":null,"dir":"Reference","previous_headings":"","what":"Get data frame of workspace participants — participants","title":"Get data frame of workspace participants — participants","text":"Get data frame workspace participants","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/participants.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get data frame of workspace participants — participants","text":"","code":"participants(workspace_uuid, use_proxy = FALSE)"},{"path":"https://scotgovanalysis.github.io/objr/reference/participants.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get data frame of workspace participants — participants","text":"workspace_uuid UUID workspace use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/participants.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get data frame of workspace participants — participants","text":"Data frame","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/upload_file.html","id":null,"dir":"Reference","previous_headings":"","what":"Upload a file to create a new document — upload_file","title":"Upload a file to create a new document — upload_file","text":"Upload file create new document","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/upload_file.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Upload a file to create a new document — upload_file","text":"","code":"upload_file( file, workspace_uuid, name = NULL, description = NULL, parent_uuid = NULL, use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/upload_file.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Upload a file to create a new document — upload_file","text":"file File path document upload workspace_uuid UUID workspace create new document name Name give document. provided, name file used. description Optional description document parent_uuid UUID folder workspace create new document within. supplied, document created top-level workspace. use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/workspace_assets.html","id":null,"dir":"Reference","previous_headings":"","what":"Get data frame of assets in workspace — workspace_assets","title":"Get data frame of assets in workspace — workspace_assets","text":"Get data frame assets workspace","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/workspace_assets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get data frame of assets in workspace — workspace_assets","text":"","code":"workspace_assets( workspace_uuid, type = list(\"document\", \"folder\", \"link\"), page = NULL, size = NULL, use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/workspace_assets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get data frame of assets in workspace — workspace_assets","text":"workspace_uuid UUID workspace type List asset types return. Defaults types; document, folder link. page Page number responses return (0..N). size Number results returned per page. use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/workspace_assets.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get data frame of assets in workspace — workspace_assets","text":"Data frame","code":""},{"path":"https://scotgovanalysis.github.io/objr/news/index.html","id":"objr-development-version","dir":"Changelog","previous_headings":"","what":"objr (development version)","title":"objr (development version)","text":"First package release Add pkgdown site (https://ScotGovAnalysis.github.io/objr)","code":""}] +[{"path":"https://scotgovanalysis.github.io/objr/LICENCE.html","id":null,"dir":"","previous_headings":"","what":"MIT Licence","title":"MIT Licence","text":"Copyright (c) 2023 Crown Copyright (Scottish Government) Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://scotgovanalysis.github.io/objr/articles/authentication.html","id":"how-authentication-works","dir":"Articles","previous_headings":"","what":"How authentication works","title":"API Authentication","text":"first time send request, API requires Objective Connect user email address password authenticate. successful response API includes token. token can used authenticate subsequent requests session, negating need repeatedly supply email address password. rest article details manage authentication using objr package.","code":""},{"path":"https://scotgovanalysis.github.io/objr/articles/authentication.html","id":"first-request","dir":"Articles","previous_headings":"","what":"First request","title":"API Authentication","text":"need Objective Connect user email address password make first request API. can provided two ways.","code":""},{"path":"https://scotgovanalysis.github.io/objr/articles/authentication.html","id":"r-environment-variables","dir":"Articles","previous_headings":"First request","what":"R Environment variables","title":"API Authentication","text":"Add two variables .Renviron file define email address password. Open .Renviron file edit: Add two variables follows (replacing XXX credentials): Save close .Renviron file. check worked expected, first restart R session run: credentials printed console. Note: important save R session workspace close console may contain Objective Connect credentials. benefit method can leave information .Renviron file objr automatically find time use package.","code":"usethis::edit_r_environ() OBJR_USR = \"XXX\" OBJR_PWD = \"XXX\" Sys.getenv(\"OBJR_USR\") Sys.getenv(\"OBJR_PWD\")"},{"path":"https://scotgovanalysis.github.io/objr/articles/authentication.html","id":"supply-credentials-when-prompted","dir":"Articles","previous_headings":"First request","what":"Supply credentials when prompted","title":"API Authentication","text":"don’t variables defined .Renviron file, objr prompt supply ’re working interactive session.","code":""},{"path":"https://scotgovanalysis.github.io/objr/articles/authentication.html","id":"subsequent-requests","dir":"Articles","previous_headings":"","what":"Subsequent requests","title":"API Authentication","text":"successful API response includes token can used subsequent requests. objr functions automatically parse token API response store R session’s global environment. object exists, objr automatically use authenticate subsequent requests. object doesn’t exist, objr resort using username password, first request.","code":""},{"path":"https://scotgovanalysis.github.io/objr/articles/faqs.html","id":"what-is-the-difference-between-users-and-participants","dir":"Articles","previous_headings":"","what":"What is the difference between users and participants?","title":"Frequently Asked Questions","text":"user individual using Objective Connect. participant user particular workspace. example, person using Objective Connect User UUID associated , also Participant UUID individual workspace member . user can get User UUID running my_user_id(). user can find participant UUID particular workspace using participants().","code":""},{"path":"https://scotgovanalysis.github.io/objr/articles/objr.html","id":"universally-unique-identifiers","dir":"Articles","previous_headings":"","what":"Universally Unique Identifiers","title":"Introduction to objr","text":"useful aware everything Objective Connect associated Universally Unique Identifier (UUID). includes users, workgroups, workspaces, participants workspace assets workspace. Objective Connect UUIDs take form string eight chunks four lower case letters numbers, separated dashes. example: Use API objr package depends UUIDs. UUIDs mostly findable using functions objr (demonstrated article), however can often also find relevant UUIDs webpage URLs. example, example URL viewing workspace: UUID workspace 2vo2-dd3s-1nn9-y20r-b906-u4s2-7134-b352 UUID workgroup 2j47-ff38-lcgg-mnis-3vq8-9536-9jfp-oy44.","code":"84op-9qdu-c692-t4z1-wa4z-h9k3-8454-i71f https://secure.objectiveconnect.co.uk/share/2vo2-dd3s-1nn9-y20r-b906-u4s2- 7134-b352?workgroupUuid=2j47-ff38-lcgg-mnis-3vq8-9536-9jfp-oy44"},{"path":"https://scotgovanalysis.github.io/objr/articles/objr.html","id":"test-your-authentication","dir":"Articles","previous_headings":"","what":"Test your authentication","title":"Introduction to objr","text":"interact Objective Connect API, must provide valid authentication. explained detail vignette(\"authentication\"). might good idea test authentication, especially ’s first time using package. specific function , following simple function get user ID requires input easy way test can get successful response API.","code":"me <- my_user_id()"},{"path":"https://scotgovanalysis.github.io/objr/articles/objr.html","id":"workspaces","dir":"Articles","previous_headings":"","what":"Workspaces","title":"Introduction to objr","text":"see workspaces member : returns data frame row workspace member . Among things, column containing workspace name another containing workspace UUID. example:","code":"workspaces <- my_workspaces() ## workspace_name workspace_uuid ## 1 Project 1 84op-9qdu-c692-t4z1-wa4z-h9k3-8454-i71f ## 2 Project 2 2vo2-dd3s-1nn9-y20r-b906-u4s2-7134-b352"},{"path":"https://scotgovanalysis.github.io/objr/articles/objr.html","id":"assets","dir":"Articles","previous_headings":"","what":"Assets","title":"Introduction to objr","text":"Maybe like download file one workspaces. Objective Connect, files also known ‘assets’. download asset, ’ll need UUID. Note: workspaces two-factor authentication (2FA) enabled, participants use API workspace level actions unless given permission bypass 2FA. See vignette(\"two-factor\") information. Use workspace UUID workspaces get data frame assets workspace: returns data frame row asset workspace. Among things, column containing asset name another containing asset UUID.","code":"assets <- workspace_assets(\"84op-9qdu-c692-t4z1-wa4z-h9k3-8454-i71f\") ## asset_name asset_uuid ## 1 asset1 2j47-ff38-lcgg-mnis-3vq8-9536-9jfp-oy44 ## 2 asset2 l588-e8wp-d6y8-3d01-blby-wag1-ks1s-gmo9"},{"path":"https://scotgovanalysis.github.io/objr/articles/objr.html","id":"download-file","dir":"Articles","previous_headings":"","what":"Download file","title":"Introduction to objr","text":"download document, use UUID file path folder ’d like downloaded file saved : function doesn’t return anything display message R console indicate download success confirm location file:","code":"download_file(document_uuid = \"2j47-ff38-lcgg-mnis-3vq8-9536-9jfp-oy44\", folder = here::here(\"data\")) ## ✔ File downloaded: project-1/data/file1.csv."},{"path":"https://scotgovanalysis.github.io/objr/articles/objr.html","id":"upload-file","dir":"Articles","previous_headings":"","what":"Upload file","title":"Introduction to objr","text":"upload file workspace, use UUID workspace file path file upload: function doesn’t return anything display message R console indicate upload success confirm name file. Now, rerun previous step get data frame workspace assets, see additional row file ’ve just uploaded.","code":"upload_file(here::here(\"data\", \"file2.csv\"), workspace_uuid = \"84op-9qdu-c692-t4z1-wa4z-h9k3-8454-i71f\") ## ✔ New document created: file2.csv. assets <- workspace_assets(\"84op-9qdu-c692-t4z1-wa4z-h9k3-8454-i71f\") ## asset_name asset_uuid ## 1 Asset 1 2j47-ff38-lcgg-mnis-3vq8-9536-9jfp-oy44 ## 2 Asset 2 l588-e8wp-d6y8-3d01-blby-wag1-ks1s-gmo9 ## 3 file2 9tp8-3vme-d381-7o89-4qns-qw99-310b-3d06"},{"path":"https://scotgovanalysis.github.io/objr/articles/two-factor.html","id":"allowing-the-workspace-owner-to-bypass-2fa","dir":"Articles","previous_headings":"","what":"Allowing the workspace owner to bypass 2FA","title":"Two-Factor Authentication","text":"give (workspace owner) permission bypass 2FA, need help workgroup admin. work Scottish Government, please contact package maintainers arrange . Allow 2FA bypassing workgroup. setting can controlled via API, Objective Connect browser interface. can done workgroup admin. Option 1: Use allow_bypass_2fa(), providing relevant workgroup UUID. Option 2: workgroup admin isn’t R user, can use API interactive documentation. Use ‘Authorise’ button setup authentication. Execute /workgroups/{uuid}/bypassTwoStepAllowed endpoint, providing workgroup UUID. Temporarily disable 2FA workspace. 2FA enforced workgroup level, workgroup admin need disable setting first. Summary section workspace page, select three dots icon (…) top right-hand corner, Two-step verification. prompted confirm, select Disable. Give (workspace owner) permission bypass 2FA using participant_bypass_2fa(). need participant UUID, can found using participants(). Check worked using participants(). bypass_2fa column returned data frame contain TRUE name. Reinstate 2FA workspace workgroup way disabled step 2.","code":""},{"path":"https://scotgovanalysis.github.io/objr/articles/two-factor.html","id":"allowing-other-participants-to-bypass-2fa","dir":"Articles","previous_headings":"","what":"Allowing other participants to bypass 2FA","title":"Two-Factor Authentication","text":"(workspace owner) can now bypass 2FA, can now provide bypassing permissions workspace members. can done way ; using participant_bypass_2fa() providing relevant members’ participant UUID. Scottish Government Objective Connect workspaces, permissions limited Scottish Government staff external participants. wish revoke permissions bypass 2FA, use participant_bypass_2fa() set allow_bypass = FALSE. Remember, check status 2FA bypassing participants workspace, use participants().","code":""},{"path":"https://scotgovanalysis.github.io/objr/articles/two-factor.html","id":"getting-more-help","dir":"Articles","previous_headings":"","what":"Getting more help","title":"Two-Factor Authentication","text":"process can quite fiddly. unsure issues , please contact package maintainers.","code":""},{"path":"https://scotgovanalysis.github.io/objr/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Scottish Government  Email Scottish Government>  Scottish Government GitHub profile>. Copyright holder. Alice Hannah  Email Alice Hannah>  Alice Hannah GitHub profile>. Author, maintainer.","code":""},{"path":"https://scotgovanalysis.github.io/objr/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Hannah (2024). objr: Wrapper Objective APIs. R package version 0.0.0.9002, https://ScotGovAnalysis.github.io/objr/, https://github.com/ScotGovAnalysis/objr.","code":"@Manual{, title = {objr: Wrapper for Objective APIs}, author = {Alice Hannah}, year = {2024}, note = {R package version 0.0.0.9002, https://ScotGovAnalysis.github.io/objr/}, url = {https://github.com/ScotGovAnalysis/objr}, }"},{"path":"https://scotgovanalysis.github.io/objr/index.html","id":"objr","dir":"","previous_headings":"","what":"Wrapper for Objective APIs","title":"Wrapper for Objective APIs","text":"objr aims provide convenient method interacting Objective Connect using R, making use Objective Connect API.","code":""},{"path":"https://scotgovanalysis.github.io/objr/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Wrapper for Objective APIs","text":"package can installed directly GitHub. Note method requires remotes package may work within Scottish Government network. Finally, package can also installed downloading zip repository running following code, replacing section marked <> (including arrows ) location downloaded zip:","code":"remotes::install_github( \"ScotGovAnalysis/objr\", upgrade = \"never\", build_vignettes = TRUE ) remotes::install_local( \"/objr-main.zip\", upgrade = \"never\", build_vignettes = TRUE )"},{"path":"https://scotgovanalysis.github.io/objr/index.html","id":"licence","dir":"","previous_headings":"","what":"Licence","title":"Wrapper for Objective APIs","text":"Unless stated otherwise, codebase released MIT Licence. covers codebase sample code documentation. documentation © Crown copyright available terms Open Government 3.0 licence.","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/allow_bypass_2fa.html","id":null,"dir":"Reference","previous_headings":"","what":"Allow/disallow bypassing of two-factor authentication for workgroup — allow_bypass_2fa","title":"Allow/disallow bypassing of two-factor authentication for workgroup — allow_bypass_2fa","text":"information two-factor authentication can found vignette(\"two-factor\").","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/allow_bypass_2fa.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Allow/disallow bypassing of two-factor authentication for workgroup — allow_bypass_2fa","text":"","code":"allow_bypass_2fa(workgroup_uuid, allow_bypass = TRUE, use_proxy = FALSE)"},{"path":"https://scotgovanalysis.github.io/objr/reference/allow_bypass_2fa.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Allow/disallow bypassing of two-factor authentication for workgroup — allow_bypass_2fa","text":"workgroup_uuid Workgroup UUID allow_bypass Logical indicate whether workgroup allow selected participants bypass two-factor authentication verification. use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/asset_info.html","id":null,"dir":"Reference","previous_headings":"","what":"Get asset information — asset_info","title":"Get asset information — asset_info","text":"Get asset information","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/asset_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get asset information — asset_info","text":"","code":"asset_info(asset_uuid, use_proxy = FALSE)"},{"path":"https://scotgovanalysis.github.io/objr/reference/asset_info.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get asset information — asset_info","text":"asset_uuid UUID asset use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/asset_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get asset information — asset_info","text":"Named list containing: uuid, name, type, extension, description.","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/comments.html","id":null,"dir":"Reference","previous_headings":"","what":"Get comments for workspaces of current user — comments","title":"Get comments for workspaces of current user — comments","text":"Get comments workspaces current user","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/comments.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get comments for workspaces of current user — comments","text":"","code":"comments( created_after = NULL, thread_uuid = NULL, mention_uuid = NULL, workgroup_uuid = NULL, page = NULL, size = NULL, use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/comments.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get comments for workspaces of current user — comments","text":"created_after Date (optionally time) filter comments created since date/time. time supplied, comments made day included. thread_uuid UUID thread filter mention_uuid UUID user filter comments mentioned workgroup_uuid UUID workgroup filter page Page number responses return (0..N). size Number results returned per page. use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/comments.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get comments for workspaces of current user — comments","text":"Data frame","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/comments.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get comments for workspaces of current user — comments","text":"","code":"if (FALSE) { # \\dontrun{ comments() } # }"},{"path":"https://scotgovanalysis.github.io/objr/reference/create_folder.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a new folder — create_folder","title":"Create a new folder — create_folder","text":"Create new folder","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/create_folder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a new folder — create_folder","text":"","code":"create_folder( folder_name, workspace_uuid, description = NULL, parent_uuid = NULL, use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/create_folder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a new folder — create_folder","text":"folder_name Name give new folder workspace_uuid UUID workspace create new folder description Optional description folder parent_uuid UUID another folder workspace create new folder within. supplied, folder created top-level workspace. use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/download_file.html","id":null,"dir":"Reference","previous_headings":"","what":"Download a file — download_file","title":"Download a file — download_file","text":"Download file","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/download_file.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download a file — download_file","text":"","code":"download_file(document_uuid, folder, use_proxy = FALSE)"},{"path":"https://scotgovanalysis.github.io/objr/reference/download_file.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download a file — download_file","text":"document_uuid UUID existing document folder Folder save downloaded file use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/my_user_id.html","id":null,"dir":"Reference","previous_headings":"","what":"Get user ID for current authenticated user — my_user_id","title":"Get user ID for current authenticated user — my_user_id","text":"Get user ID current authenticated user","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/my_user_id.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get user ID for current authenticated user — my_user_id","text":"","code":"my_user_id(use_proxy = FALSE)"},{"path":"https://scotgovanalysis.github.io/objr/reference/my_user_id.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get user ID for current authenticated user — my_user_id","text":"use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/my_user_id.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get user ID for current authenticated user — my_user_id","text":"character value authenticated user's ID","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/my_user_id.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get user ID for current authenticated user — my_user_id","text":"","code":"if (FALSE) { # \\dontrun{ my_user_id() } # }"},{"path":"https://scotgovanalysis.github.io/objr/reference/my_workspaces.html","id":null,"dir":"Reference","previous_headings":"","what":"Get workspaces the current user is a member of — my_workspaces","title":"Get workspaces the current user is a member of — my_workspaces","text":"Get workspaces current user member ","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/my_workspaces.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get workspaces the current user is a member of — my_workspaces","text":"","code":"my_workspaces( workgroup_uuid = NULL, page = NULL, size = NULL, use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/my_workspaces.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get workspaces the current user is a member of — my_workspaces","text":"workgroup_uuid UUID workgroup filter page Page number responses return (0..N). size Number results returned per page. use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/my_workspaces.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get workspaces the current user is a member of — my_workspaces","text":"Data frame","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/new_reply.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a new reply to a thread — new_reply","title":"Create a new reply to a thread — new_reply","text":"Create new reply thread","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/new_reply.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a new reply to a thread — new_reply","text":"","code":"new_reply( thread_uuid, text, mentioned_assets = NULL, mentioned_users = NULL, use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/new_reply.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a new reply to a thread — new_reply","text":"thread_uuid UUID thread reply text Character string include body thread mentioned_assets UUID(s) asset(s) mention mentioned_users UUID(s) user(s) mention use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/new_reply.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a new reply to a thread — new_reply","text":"API response (invisibly)","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/new_thread.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a new thread — new_thread","title":"Create a new thread — new_thread","text":"Create new thread","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/new_thread.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a new thread — new_thread","text":"","code":"new_thread( workspace_uuid, text, mentioned_assets = NULL, mentioned_users = NULL, use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/new_thread.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a new thread — new_thread","text":"workspace_uuid UUID workspace text Character string include body thread mentioned_assets UUID(s) asset(s) mention mentioned_users UUID(s) user(s) mention use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/new_thread.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a new thread — new_thread","text":"API response (invisibly)","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/new_version.html","id":null,"dir":"Reference","previous_headings":"","what":"Upload a file to create a new document version — new_version","title":"Upload a file to create a new document version — new_version","text":"Upload file create new document version","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/new_version.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Upload a file to create a new document version — new_version","text":"","code":"new_version(file, document_uuid, use_proxy = FALSE)"},{"path":"https://scotgovanalysis.github.io/objr/reference/new_version.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Upload a file to create a new document version — new_version","text":"file File path document upload document_uuid UUID existing document use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/objr.html","id":null,"dir":"Reference","previous_headings":"","what":"Core request function — objr","title":"Core request function — objr","text":"Core request function","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/objr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Core request function — objr","text":"","code":"objr( endpoint, url_path = NULL, url_query = NULL, method = \"GET\", body = NULL, path = NULL, accept = \"application/json\", content_type = \"application/json\", use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/objr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Core request function — objr","text":"endpoint endpoint append API server address url_path list values added request URL path. Values separated /. url_query list named values define query parameters method HTTP method use; e.g. GET, POST, PUT. Defaults GET. body list named values passed request body path Optional file path save body request (mainly used downloading files) accept Accept header. Defaults 'application/json'. content_type Content-Type header. Defaults 'application/json'. use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/objr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Core request function — objr","text":"httr2 httr2::response()","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/objr_auth.html","id":null,"dir":"Reference","previous_headings":"","what":"Authenticate HTTP request — objr_auth","title":"Authenticate HTTP request — objr_auth","text":"sets authorisation header HTTP request. token variable exists global environment, used, otherwise, user prompted enter authenticating username password.","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/objr_auth.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Authenticate HTTP request — objr_auth","text":"","code":"objr_auth(req)"},{"path":"https://scotgovanalysis.github.io/objr/reference/objr_auth.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Authenticate HTTP request — objr_auth","text":"req httr2 request","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/objr_auth.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Authenticate HTTP request — objr_auth","text":"modified httr2 request","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/objr_auth.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Authenticate HTTP request — objr_auth","text":"","code":"if (FALSE) { # \\dontrun{ httr2::request(\"http://example.com\") |> objr_auth() } # } token <- \"test\" httr2::request(\"http://example.com\") |> objr_auth() #> #> GET http://example.com #> Headers: #> • Authorization: 'test' #> Body: empty"},{"path":"https://scotgovanalysis.github.io/objr/reference/participant_bypass_2fa.html","id":null,"dir":"Reference","previous_headings":"","what":"Allow/disallow bypassing of two-factor authentication for workspace participant — participant_bypass_2fa","title":"Allow/disallow bypassing of two-factor authentication for workspace participant — participant_bypass_2fa","text":"Note setting can updated workspace owner. information two-factor authentication can found vignette(\"two-factor\").","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/participant_bypass_2fa.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Allow/disallow bypassing of two-factor authentication for workspace participant — participant_bypass_2fa","text":"","code":"participant_bypass_2fa( participant_uuid, allow_bypass = TRUE, use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/participant_bypass_2fa.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Allow/disallow bypassing of two-factor authentication for workspace participant — participant_bypass_2fa","text":"participant_uuid Participant UUID (note different user UUID) allow_bypass Logical indicate whether participant able bypass two-factor authentication workspace. use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/participants.html","id":null,"dir":"Reference","previous_headings":"","what":"Get data frame of workspace participants — participants","title":"Get data frame of workspace participants — participants","text":"Get data frame workspace participants","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/participants.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get data frame of workspace participants — participants","text":"","code":"participants(workspace_uuid, use_proxy = FALSE)"},{"path":"https://scotgovanalysis.github.io/objr/reference/participants.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get data frame of workspace participants — participants","text":"workspace_uuid UUID workspace use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/participants.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get data frame of workspace participants — participants","text":"Data frame","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/upload_file.html","id":null,"dir":"Reference","previous_headings":"","what":"Upload a file to create a new document — upload_file","title":"Upload a file to create a new document — upload_file","text":"Upload file create new document","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/upload_file.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Upload a file to create a new document — upload_file","text":"","code":"upload_file( file, workspace_uuid, name = NULL, description = NULL, parent_uuid = NULL, use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/upload_file.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Upload a file to create a new document — upload_file","text":"file File path document upload workspace_uuid UUID workspace create new document name Name give document. provided, name file used. description Optional description document parent_uuid UUID folder workspace create new document within. supplied, document created top-level workspace. use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/workspace_assets.html","id":null,"dir":"Reference","previous_headings":"","what":"Get data frame of assets in workspace — workspace_assets","title":"Get data frame of assets in workspace — workspace_assets","text":"Get data frame assets workspace","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/workspace_assets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get data frame of assets in workspace — workspace_assets","text":"","code":"workspace_assets( workspace_uuid, type = list(\"document\", \"folder\", \"link\"), page = NULL, size = NULL, use_proxy = FALSE )"},{"path":"https://scotgovanalysis.github.io/objr/reference/workspace_assets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get data frame of assets in workspace — workspace_assets","text":"workspace_uuid UUID workspace type List asset types return. Defaults types; document, folder link. page Page number responses return (0..N). size Number results returned per page. use_proxy Logical indicate whether use proxy","code":""},{"path":"https://scotgovanalysis.github.io/objr/reference/workspace_assets.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get data frame of assets in workspace — workspace_assets","text":"Data frame","code":""},{"path":"https://scotgovanalysis.github.io/objr/news/index.html","id":"objr-development-version","dir":"Changelog","previous_headings":"","what":"objr (development version)","title":"objr (development version)","text":"First package release Add pkgdown site (https://ScotGovAnalysis.github.io/objr)","code":""}]