get_integrations: Get OAuth integrations

View source: R/integrations.R

get_integrationsR Documentation

Get OAuth integrations

Description

Retrieve OAuth integrations either from the Connect server or associated with a specific content item.

If x is a Connect object, this function lists all OAuth integrations on the server. If x is a Content object, it returns the integrations associated with that content item.

You must have administrator or publisher privileges to use this function.

Usage

get_integrations(x)

Arguments

x

A Connect or Content R6 object.

Value

A list of class connect_integration_list, where each element is a connect_integration object with the following fields. (Raw API fields are character strings unless noted otherwise):

  • id: The internal identifier of this OAuth integration.

  • guid: The GUID of this OAuth integration.

  • created_time: Timestamp (RFC3339) when the integration was created.

  • updated_time: Timestamp (RFC3339) when the integration was last updated.

  • name: A descriptive name.

  • description: A brief description.

  • template: The template used to configure the integration.

  • auth_type: The OAuth flow used.

  • config: A list with integration-specific config fields.

Use as.data.frame() or tibble::as_tibble() to convert the result to a data frame with parsed types.

See Also

get_integration(), set_integrations(), get_associations()

Other oauth integration functions: create_integration(), delete_integration(), get_associations(), get_integration(), set_integrations(), update_integration()

Examples

## Not run: 
# From a Connect client
client <- connect()
integrations <- get_integrations(client)

# Filter or update specific ones
github_integration <- purrr::keep(integrations, \(x) x$template == "github")[[1]]

json_payload <- jsonlite::toJSON(list(
  description = "Updated Description",
  config = list(client_secret = "new-secret")
), auto_unbox = TRUE)

client$PATCH(
  paste0("v1/oauth/integrations/", github_integration$guid),
  body = json_payload
)

# From a Content item
content <- content_item(client, "12345678-90ab-cdef-1234-567890abcdef")
content_integrations <- get_integrations(content)

# Filter content integrations
snowflake_integrations <- purrr::keep(content_integrations, ~ .x$template == "snowflake")

## End(Not run)


connectapi documentation built on Nov. 5, 2025, 7:32 p.m.