Finding Content Associated with an Integration
Problem
You want to find all content associated with an integration.
Solution
Warning
You must have administrator or publisher privileges to find an integration.
Get an integration and use its associations.find()
method to find all associated content.
from posit import connect
= "84f0f0ae-e328-44b0-98ba-aee6e775b5f0"
GUID
= connect.Client()
client = client.oauth.integrations.get(GUID)
integration = integration.associations.find() associations
The results can be transformed into a DataFrame for easy viewing and filtering.
>>> import polars as pl
>>> pl.DataFrame(associations)
3, 6)
shape: (
┌─────────────────────────────────┬─────────────────────────────────┬────────────────────────┬───────────────────────────────┬────────────────────────────┬──────────────────────┐
│ app_guid ┆ oauth_integration_guid ┆ oauth_integration_name ┆ oauth_integration_description ┆ oauth_integration_template ┆ created_time │--- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │
│ str ┆ str ┆ str ┆ str ┆ str ┆ str │
│
╞═════════════════════════════════╪═════════════════════════════════╪════════════════════════╪═══════════════════════════════╪════════════════════════════╪══════════════════════╡-f997-4af5-9f6a-2fe852… ┆ 84f0f0ae-e328-44b0-98ba-aee6e7… ┆ Azure ┆ Azure (staging) ┆ azure ┆ 2024-07-17T21:13:21Z │
│ e3155944-298d-48db-82f1-88a861… ┆ 84f0f0ae-e328-44b0-98ba-aee6e7… ┆ Azure ┆ Azure (staging) ┆ azure ┆ 2024-07-19T18:03:44Z │
│ b1ce5e4a-b1c8-441d-9d8f-b470c5… ┆ 84f0f0ae-e328-44b0-98ba-aee6e7… ┆ Azure ┆ Azure (staging) ┆ azure ┆ 2024-08-05T21:41:41Z │
│ c722a97c └─────────────────────────────────┴─────────────────────────────────┴────────────────────────┴───────────────────────────────┴────────────────────────────┴──────────────────────┘
Follow the Finding Integrations recipe to get the integration’s GUID, then use the connectapi
client to make a direct call to the associations endpoint.
library(connectapi)
<- "84f0f0ae-e328-44b0-98ba-aee6e775b5f0"
GUID
<- connect()
client <- client$GET(paste0("v1/oauth/integrations/", GUID, "/associations")) associations
The results can be transformed into a DataFrame for easy viewing and filtering.
> map_dfr(associations, ~.x)
# A tibble: 3 × 6
app_guid oauth_integration_guid oauth_integration_name oauth_integration_description oauth_integration_template created_time <chr> <chr> <chr> <chr> <chr> <chr>
1 e3155944-f997-4af5-9f6a-2fe8524be7f3 84f0f0ae-e328-44b0-98ba-aee6e775b5f0 Azure Azure (staging) azure 2024-07-17T21:13:21Z
2 b1ce5e4a-298d-48db-82f1-88a861e946a0 84f0f0ae-e328-44b0-98ba-aee6e775b5f0 Azure Azure (staging) azure 2024-07-19T18:03:44Z
3 c722a97c-b1c8-441d-9d8f-b470c58fe70b 84f0f0ae-e328-44b0-98ba-aee6e775b5f0 Azure Azure (staging) azure 2024-08-05T21:41:41Z
See also
- For more details about the data returned in this recipe, see List all associations for this 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.