---
title: "List drives in a site"
method: GET
path: "/integrations/sharepoint/sites/{site_id}/drives"
tags: ["Sharepoint"]
---

# List drives in a site

`GET /integrations/sharepoint/sites/{site_id}/drives`

## Request

- Base URL: `https://api.your-domain.com`
- URL: `https://api.your-domain.com/integrations/sharepoint/sites/{site_id}/drives`
- Auth: API key in header `X-API-KEY`
- TypeScript: <https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/docs/integrations/sharepoint/sites/:site_id/drives/get.ts> (a function with typed inputs; its response is checked against the schema)

List the document libraries (drives) within a SharePoint site.

## Path parameters

- `site_id` string, required: SharePoint site id.

## Query parameters

- `chat_id` integer, nullable: Scope imported counts to this chat.
- `library_id` integer, nullable: Scope imported counts to this library.
- `assistant_id` integer, nullable: Scope imported counts to this assistant.
- `project_id` integer, nullable: Scope imported counts to this project.
- `cookie_name` string, nullable

## Response `200`

Successful Response

- SharepointDriveModel[]
  - `id` string, required: Drive id.
  - `web_url` string, required: URL to open the drive in SharePoint.
  - `name` string, nullable, required: Drive name.
  - `description` string, nullable, required: Drive description, if set.
  - `root` SharepointItemModel, required: A file or folder item in a SharePoint drive.
    - `id` string, required: Drive item id.
    - `web_url` string, required: URL to open the item in SharePoint.
    - `drive_id` string, required: Id of the drive containing the item.
    - `site_id` string, nullable, required: Id of the site the item belongs to, if any.
    - `parent_folder_id` string, required: Id of the parent folder, or 'root'.
    - `parent_path` string, nullable, required: Path of the parent folder within the drive.
    - `name` string, nullable, required: Item name.
    - `description` string, nullable, required: Item description, if set.
    - `size` integer, nullable, required: Item size in bytes.
    - `last_modified_date_time` string, date-time, nullable, required: When the item was last modified.
    - `mimetype` string, nullable, required: MIME type for files; null for folders.
    - `folder` SharepointFolderModel, required: Metadata specific to folder items.
      - `child_count` integer, required: Number of immediate children inside the folder.
    - `imported` boolean, nullable: Whether this file has already been imported into the current scope.
    - `imported_count` integer, nullable: For folders, the number of imported documents under this folder.
  - `imported_count` integer: Number of imported documents from this drive in the current scope.

## Other responses

- `401`: Missing or invalid authentication, or no valid connector token.
- `403`: User has not consented to the required SharePoint scope.
- `422`: Validation Error

---

[API](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api.md) - [All operations](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/revisions/b53e89b98c2b?raw)
