Directory Previews
Preview available directories from connected integrations before associating with libraries.
This endpoint delegates to the integration driver, which calls the connected provider. It needs an active connection and is not exercised in the captured examples; the request and response shapes below are illustrative and vary by driver.
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:
| Parameter | Type | Description |
|---|---|---|
id | string | Integration 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
The request and response format varies by integration type (Google Drive, OneDrive, SharePoint, etc.). Consult the integration driver documentation for specifics.