Capability Sources

Create a five-minute download link for one OneDrive or SharePoint file, for clients with a shell

Changed on

For clients without OpenWork host file transport but with a shell, such as a Workbot computer or a coding agent. Download with curl into a file instead of reading the file into context; format pdf converts Office files. To save edits back, prepare createMicrosoft365DriveUploadSession with itemId and this revision as baseRevision. Uses the selected connection.

post/v1/capabilities/microsoft-365/drive-download-links

Request

  • Base URL: https://api.openworklabs.com
  • URL: https://api.openworklabs.com/v1/capabilities/microsoft-365/drive-download-links
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer

Request body

driveIdstring

The file's driveId from a search, folder or link result. Omit for the member's own OneDrive.

itemIdstring required
format'pdf'

pdf converts a Word, Excel, PowerPoint or other Office file; omit to transfer the stored bytes.

Response

Short-lived bearer download URL, as JSON and as an MCP resource link, with the file's revision; no file content.

oktrue required
downloadUrlstring uri required

Secret bearer URL for this one file, valid for five minutes. Do not print, share, log or persist it.

expiresAtstring date-time required
instructionsstring required

Changes

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • info

      response property anyOf[InvalidRequestError]/details/items/path/items/ list-of-types was narrowed by removing types number from media type application/json of response 400

    • info

      response property anyOf[subschema #2]/currentRevision list-of-types was narrowed by removing types null from media type application/json of response 409

    • info

      response property anyOf[subschema #2]/modifiedTime list-of-types was narrowed by removing types null from media type application/json of response 409

    • info

      response property download/extension list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      response property file/modifiedTime list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      response property file/revision list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      response property file/webUrl list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      the response's property pattern was changed from ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ to ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$ for the status

    • info

      endpoint added