Skip to main content

Directory Previews

Preview available directories from connected integrations before associating with libraries.

POST /api/integrations/{id}/directories/preview

Fetch a preview of directories available in the connected integration.

Authentication: Required

Permissions: User must have a valid connection to the integration

Path Parameters:

ParameterTypeDescription
idstringIntegration ID or slug

Request Body:

Integration-specific parameters for directory listing

Example - Google Drive:

{
"folderId": "root"
}

Response:

{
"directories": [
{
"id": "1A2B3C4D5E6F7G8H9I0J",
"name": "Engineering Docs",
"path": "/Engineering Docs",
"mimeType": "application/vnd.google-apps.folder"
},
{
"id": "9J8I7H6G5F4E3D2C1B0A",
"name": "Product Specs",
"path": "/Product Specs",
"mimeType": "application/vnd.google-apps.folder"
}
]
}

Use Cases:

  • Show users available folders before library creation
  • Validate folder IDs
  • Browse directory structure
Integration-Specific

The request and response format varies by integration type (Google Drive, OneDrive, SharePoint, etc.). Consult the integration driver documentation for specifics.