Viewing Integration Information

Problem

You want to view information about an integration.

Solution

Warning

You must have administrator or publisher privileges to find an integration.

Use the client.oauth.integrations.get() method to retrieve an integration by their unique identifier (GUID).

from posit import connect

GUID = "84f0f0ae-e328-44b0-98ba-aee6e775b5f0"

client = connect.Client()
integration = client.oauth.integrations.get(GUID)
>>> import json
>>> print(json.dumps(integration, indent=4))
{
    "id": "36",
    "guid": "84f0f0ae-e328-44b0-98ba-aee6e775b5f0",
    "created_time": "2024-07-17T21:09:36Z",
    "updated_time": "2024-07-18T13:26:03Z",
    "name": "Azure",
    "description": "Azure (staging)",
    "template": "azure",
    "config": {
        "auth_mode": "Confidential",
        "client_id": "23a0078b-cd0d-489f-8e00-e5116c71db9b",
        "scopes": "2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/.default offline_access",
        "tenant_id": "a0b52758-d0b5-4b27-a6c0-13ca07eabdd7"
    }
}

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 <- "84f0f0ae-e328-44b0-98ba-aee6e775b5f0"

client <- connect()
client$GET(paste0("v1/oauth/integrations/", GUID))
> library(jsonlite)
> toJSON(integration, pretty = TRUE, auto_unbox = TRUE)
{
  "id": "36",
  "guid": "84f0f0ae-e328-44b0-98ba-aee6e775b5f0",
  "created_time": "2024-07-17T21:09:36Z",
  "updated_time": "2024-07-18T13:26:03Z",
  "name": "Azure",
  "description": "Azure (staging)",
  "template": "azure",
  "config": {
    "auth_mode": "Confidential",
    "client_id": "23a0078b-cd0d-489f-8e00-e5116c71db9b",
    "scopes": "2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/.default offline_access",
    "tenant_id": "a0b52758-d0b5-4b27-a6c0-13ca07eabdd7"
  }
} 

See also