diff --git a/.devproxy/api-specs/sharepoint.yaml b/.devproxy/api-specs/sharepoint.yaml index 0733249d969..3898aca7638 100644 --- a/.devproxy/api-specs/sharepoint.yaml +++ b/.devproxy/api-specs/sharepoint.yaml @@ -104,6 +104,47 @@ paths: responses: 200: description: OK + /_api/web/GetFileById({fileId})/versions/: + get: + parameters: + - name: fileId + in: path + required: true + schema: + type: string + example: "'19bbfec4-4425-4660-95cb-da1887baa7b9'" + security: + - delegated: + - AllSites.Read + - AllSites.Write + - AllSites.Manage + - AllSites.FullControl + responses: + 200: + description: OK + /_api/web/GetFileById({fileId})/versions({versionId})/SetExpirationDate(): + post: + parameters: + - name: fileId + in: path + required: true + schema: + type: string + example: "'19bbfec4-4425-4660-95cb-da1887baa7b9'" + - name: versionId + in: path + required: true + schema: + type: integer + example: 1030 + security: + - delegated: + - AllSites.Write + - AllSites.Manage + - AllSites.FullControl + responses: + 200: + description: OK /_api/web/GetFolderByServerRelativePath(DecodedUrl={folderPath}): get: parameters: diff --git a/docs/docs/cmd/spo/file/file-version-keep.mdx b/docs/docs/cmd/spo/file/file-version-keep.mdx new file mode 100644 index 00000000000..ca1ae5cf1da --- /dev/null +++ b/docs/docs/cmd/spo/file/file-version-keep.mdx @@ -0,0 +1,68 @@ +import Global from '/docs/cmd/_global.mdx'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +# spo file version keep + +Ensure that a specific file version will never expire. + +## Usage + +```sh +m365 spo file version keep [options] +``` + +## Options + +```md definition-list +`-u, --webUrl ` +: The URL of the site where the file is located. + +`--fileUrl [fileUrl]` +: The server- or site-relative decoded URL. Specify either `fileUrl` or `fileId` but not both. + +`-i, --fileId [fileId]` +: The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both. + +`--label