Deleting Integrations

Problem

You want to delete an integration.

Solution

Warning

You must have administrator privileges to delete an integration.

Use the integration GUID or follow the Finding Integrations recipe to get an integration, then use its delete() method.

from posit import connect

GUID = "341626ec-b141-42f7-87bf-cc69029c77b9"

client = connect.Client()
integration = client.oauth.integrations.get(GUID)
integration.delete()

Follow the Finding Integrations recipe to get the integration’s GUID, then use the connectapi client to make a direct call to the integrations endpoint.

library(connectapi)

GUID <- "341626ec-b141-42f7-87bf-cc69029c77b9"

client <- connect()
client$DELETE(paste0("v1/oauth/integrations/", GUID))

A successful response returns a 204 HTTP status code with an empty response.

Response [http://localhost:3939/__api__/v1/oauth/integrations/69171da5-ec2b-469a-ae96-eaaf73e87497]
  Date: 2024-09-15 19:24
  Status: 204
  Content-Type: text/plain; charset=utf-8
<EMPTY BODY>

Discussion

Deleting an integration will also delete all sessions and remove all associations to content items. To remove an association from a single content item see the Removing Integration Associations from Content recipe.

See also

  • For more details about the data returned in this recipe, see Delete an OAuth integration in the API Reference.
  • See OAuth Integrations in the User Guide to learn more about how publishers and viewers interact with OAuth integrations.
  • See OAuth Integrations in the Admin Guide to for more detailed information on how to configure OAuth integrations.