---
title: "Describe a OneDrive or SharePoint file pull for host file transport"
method: GET
path: "/v1/direct-downloads/microsoft-365/drive-files"
tags: ["Direct uploads"]
---

# Describe a OneDrive or SharePoint file pull for host file transport

`GET /v1/direct-downloads/microsoft-365/drive-files`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/direct-downloads/microsoft-365/drive-files`
- Auth: HTTP bearer

Returns the file's drive, eTag revision and the exact format and size a pull would save, without downloading content. Hosts then fetch the content route in ranged chunks. Optional connectionId selects a Microsoft 365 connection; unavailable selections never fall back to the default.

## Query parameters

- `driveId` string
- `itemId` string
- `url` string, starts_with
- `format` 'pdf'
- `connectionId` string

## Response `200`

Pull plan; no file content.

- Microsoft365DriveDownloadInfo
  - `ok` true, required
  - `file` object, required
    - `id` string, required
    - `driveId` string, required
    - `parentId` string, required
    - `name` string, required
    - `mimeType` string, required
    - `revision` string, nullable, required: The file's eTag. Pass it back as baseRevision when replacing the file, so newer changes are never overwritten silently.
    - `size` integer, nullable, required
    - `modifiedTime` string, nullable, required
    - `webUrl` string, nullable, required
  - `download` object, required
    - `format` 'pdf', nullable, required
    - `mimeType` string, required
    - `extension` string, nullable, required: Extension the saved file needs, for conversions.
    - `size` integer, nullable, required: Exact bytes for stored files; unknown until downloaded for conversions.
    - `exported` boolean, required
    - `maxBytes` integer, required

## Other responses

- `400`: Invalid request, a folder, or an item without content.
- `401`: Sign in first.
- `403`: Organization policy blocks the selected connection.
- `409`: Connect Microsoft 365 with the needed permission, or the file changed since baseRevision (drive_conflict).
- `413`: The file is larger than the pull size limit.
- `502`: Microsoft refused or did not return the file; the message gives Microsoft's reason.

## Changes

- **2026-10-23** `c93387179b31`: 7 breaking, 7 info
  - for the `query` request parameter `url`, the format changed from `uri` to `starts_with`
  - the response property `anyOf[subschema #2]/currentRevision` became nullable for the status `409`
  - the response property `anyOf[subschema #2]/modifiedTime` became nullable for the status `409`
  - the response property `download/extension` became nullable for the status `200`
  - …10 more
- **2026-10-23** `3e38eb291e52`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/direct-downloads/microsoft-365/drive-files/get.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) - [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openworklabs/apis/den-api/revisions/8170cf4a92ca?raw)
