Sameer
Sameer

Reputation: 3183

Graph Api: Download file of a particular version in sharepoint

I can get the file metadata of a particular version:

/beta/sites/siteid/items/itemid/versions/versionid?expand=fields

I could not find an API to download the file of that version.

How can I download a file for a given version?

Upvotes: 1

Views: 1537

Answers (1)

Marc LaFleur
Marc LaFleur

Reputation: 33094

Retrieving a previous version uses the same mechanism as downloading the current file version. If you append /content to your URI it will retrieve the actual file rather than just it's metadata:

/beta/sites/{site-id}/drives/{drive-id}/items/{item-id}/versions/{version-id}/content

Upvotes: 1

Related Questions