get_integrations: List all OAuth integrations on the Connect server

View source: R/integrations.R

get_integrationsR Documentation

List all OAuth integrations on the Connect server

Description

Retrieve information about all OAuth integrations available to Posit Connect. You must have administrator or publisher privileges to perform this action.

Usage

get_integrations(client)

Arguments

client

A Connect R6 client object.

Value

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.

See Also

get_oauth_credentials(), get_oauth_content_credentials()

Examples

## 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)


connectapi documentation built on Aug. 9, 2025, 1:09 a.m.