get_integrations | R Documentation |
Retrieve information about all OAuth integrations available to Posit Connect. You must have administrator or publisher privileges to perform this action.
get_integrations(client)
client |
A |
A list of OAuth integrations. Each integration is a list with the following elements (all character strings unless indicated otherwise):
id
: The internal identifier of this OAuth integration.
guid
: The GUID of this OAuth integration.
created_time
: The timestamp (RFC3339) indicating when this integration
was created.
updated_time
: The timestamp (RFC3339) indicating when this integration
was last updated
name
: A descriptive name to identify the OAuth integration.
description
: A brief text to describe the OAuth integration.
template
: The template used to configure this OAuth integration.
auth_type
: The authentication type indicates which OAuth flow is used by
this integration.
config
: A sub-list list with the OAuth integration configuration. Fields
differ between integrations.
Use as.data.frame()
or tibble::as_tibble()
to convert to a data frame with
parsed types. In the resulting data frame:
created_time
and updated_time
are parsed to POSIXct
.
config
remains as a list-column.
get_oauth_credentials()
, get_oauth_content_credentials()
## Not run:
client <- connect()
# Fetch all OAuth integrations
integrations <- get_integrations(client)
# Update the configuration and metadata for a subset of integrations.
json_payload <- toJSON(list(
description = "New Description",
config = list(
client_secret = "new-client-secret"
)
), auto_unbox = TRUE)
results <- integrations |>
purrr::keep(\(x) x$template == "service_to_update") |>
purrr::map(\(x) client$PATCH(paste0("v1/oauth/integrations/", x$guid), body = json_payload))
# Convert to tibble or data frame
integrations_df <- tibble::as_tibble(integrations)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.