restoreContentVersion method

Future<Version> restoreContentVersion({
  1. required String id,
  2. List<String>? expand,
  3. required VersionRestore body,
})

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.

Implementation

Future<Version> restoreContentVersion(
    {required String id,
    List<String>? expand,
    required VersionRestore body}) async {
  return Version.fromJson(await _client.send(
    'post',
    'wiki/rest/api/content/{id}/version',
    pathParameters: {
      'id': id,
    },
    queryParameters: {
      if (expand != null) 'expand': expand.map((e) => e).join(','),
    },
    body: body.toJson(),
  ));
}