Hierarchy

  • CommonHttpService
    • ContentVersionsService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

    • getClientInstance: (() => CommonHttpClient)
        • (): CommonHttpClient
        • Returns CommonHttpClient

    Returns ContentVersionsService

Methods

  • Delete a historical version. This does not delete the changes made to the content in that version, rather the changes for the deleted version are rolled up into the next version. Note, you cannot delete the current version.

    Permissions required: Permission to update the content.

    Parameters

    • params: {
          id: string;
          versionNumber: number;
      }
      • id: string

        The ID of the content that the version will be deleted from.

      • versionNumber: number

        The number of the version to be deleted. The version number starts from 1 up to current version.

    Returns Promise<void>

    DELETE /wiki/rest/api/content/{id}/version/{versionNumber} @scopes-current write:confluence-content @scopes-beta delete:content:confluence

  • 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

    • params: {
          expand?: string[];
          id: string;
          versionRestore: VersionRestore;
      }
      • Optionalexpand?: 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.
      • id: string

        The ID of the content for which the history will be restored.

      • versionRestore: VersionRestore

        The content version to be restored.

    Returns Promise<null | VersionV1>

    Returned if the version is restored.

    POST /wiki/rest/api/content/{id}/version @scopes-current write:confluence-content @scopes-beta read:content-details:confluence, write:content:confluence

  • Method to initialize the class. Normally used to set up validation rules.

    Returns void