Function: restoreContentVersion()
ts
function restoreContentVersion(client, parameters): Promise<Version>;Defined in: src/v1/api/contentVersions.ts:12
Restores a historical version to be the latest version. That is, a new version is created with the content of the historical version.
Permissions required: Permission to update the content.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { expand?: string[]; id: string; operationKey: "restore"; params: { [key: string]: unknown; message: string; restoreTitle?: boolean; versionNumber: number; }; } | - |
parameters.expand? | string[] | A multi-value parameter indicating which properties of the content to expand. By default, the content object is expanded. - collaborators returns the users that collaborated on the version. - content returns the content for the version. |
parameters.id | string | The ID of the content for which the history will be restored. |
parameters.operationKey | "restore" | Set to 'restore'. |
parameters.params | { [key: string]: unknown; message: string; restoreTitle?: boolean; versionNumber: number; } | - |
parameters.params.message | string | Description for the version. |
parameters.params.restoreTitle? | boolean | If true, the content title will be the same as the title from the version restored. Defaults to false. |
parameters.params.versionNumber | number | The version number to be restored. |
Returns
Promise<Version>