Hierarchy

  • CommonHttpService
    • VersionService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

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

    Returns VersionService

Methods

  • Returns the versions of specific attachment.

    Permissions required: Permission to view the attachment and its corresponding space.

    Parameters

    • params: {
          cursor?: string;
          id: string;
          limit?: number;
          sort?: VersionSortOrder;
      }
      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: string

        The ID of the attachment to be queried for its versions. If you don't know the attachment ID, use Get attachments and filter the results.

      • Optionallimit?: number

        Maximum number of versions per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalsort?: VersionSortOrder

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: AttachmentVersion[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested attachment versions are returned.

    GET /attachments/{id}/versions @scopes-current read:attachment:confluence

  • Returns the versions of specific blog post.

    Permissions required: Permission to view the blog post and its corresponding space.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentation;
          cursor?: string;
          id: number;
          limit?: number;
          sort?: VersionSortOrder;
      }
      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format types to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the blog post to be queried for its versions. If you don't know the blog post ID, use Get blog posts and filter the results.

      • Optionallimit?: number

        Maximum number of versions per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalsort?: VersionSortOrder

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: BlogPostVersion[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested blog post versions are returned.

    GET /blogposts/{id}/versions @scopes-current read:page:confluence

  • Returns the versions of specific custom content.

    Permissions required: Permission to view the custom content and its corresponding page and space.

    Parameters

    • params: {
          bodyFormat?: CustomContentBodyRepresentation;
          cursor?: string;
          customContentId: number;
          limit?: number;
          sort?: VersionSortOrder;
      }
      • OptionalbodyFormat?: CustomContentBodyRepresentation

        The content format types to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

        Note: If the custom content body type is storage, the storage and atlas_doc_format body formats are able to be returned. If the custom content body type is raw, only the raw body format is able to be returned.

      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • customContentId: number

        The ID of the custom content to be queried for its versions. If you don't know the custom content ID, use Get custom-content by type and filter the results.

      • Optionallimit?: number

        Maximum number of versions per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalsort?: VersionSortOrder

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: CustomContentVersion[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested custom content versions are returned.

    GET /custom-content/{custom-content-id}/versions @scopes-current read:custom-content:confluence

  • Retrieves the versions of the specified footer comment.

    Permissions required: Permission to view the content of the page or blog post and its corresponding space.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentation;
          cursor?: string;
          id: number;
          limit?: number;
          sort?: VersionSortOrder;
      }
      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format types to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the footer comment for which versions should be returned

      • Optionallimit?: number

        Maximum number of versions per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalsort?: VersionSortOrder

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: CommentVersion[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested footer comment versions are returned.

    GET /footer-comments/{id}/versions @scopes-current read:comment:confluence

  • Retrieves the versions of the specified inline comment.

    Permissions required: Permission to view the content of the page or blog post and its corresponding space.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentation;
          cursor?: string;
          id: number;
          limit?: number;
          sort?: VersionSortOrder;
      }
      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format types to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the inline comment for which versions should be returned

      • Optionallimit?: number

        Maximum number of versions per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalsort?: VersionSortOrder

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: CommentVersion[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested inline comment versions are returned.

    GET /inline-comments/{id}/versions @scopes-current read:comment:confluence

  • Returns the versions of specific page.

    Permissions required: Permission to view the page and its corresponding space.

    Parameters

    • params: {
          bodyFormat?: PrimaryBodyRepresentation;
          cursor?: string;
          id: number;
          limit?: number;
          sort?: VersionSortOrder;
      }
      • OptionalbodyFormat?: PrimaryBodyRepresentation

        The content format types to be returned in the body field of the response. If available, the representation will be available under a response field of the same name under the body field.

      • Optionalcursor?: string

        Used for pagination, this opaque cursor will be returned in the next URL in the Link response header. Use the relative URL in the Link header to retrieve the next set of results.

      • id: number

        The ID of the page to be queried for its versions. If you don't know the page ID, use Get pages and filter the results.

      • Optionallimit?: number

        Maximum number of versions per result to return. If more results exist, use the Link header to retrieve a relative URL that will return the next set of results.

      • Optionalsort?: VersionSortOrder

        Used to sort the result by a particular field.

    Returns Promise<{
        _links?: MultiEntityLinks;
        results?: PageVersion[];
    } & {
        [key: string]: unknown;
    }>

    Returned if the requested page versions are returned.

    GET /pages/{id}/versions @scopes-current read:page:confluence

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

    Returns void