Hierarchy

  • CommonHttpService
    • ContentWatchesService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

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

    Returns ContentWatchesService

Methods

  • Adds a user as a watcher to a piece of content. Choose the user by doing one of the following:

    • Specify a user via a query parameter: Use the accountId to identify the user.
    • Do not specify a user: The currently logged-in user will be used.

    Note, you must add the X-Atlassian-Token: no-check header when making a request, as this operation has XSRF protection.

    Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).

    Parameters

    • params: {
          accountId?: string;
          contentId: string;
          key?: string;
          username?: string;
      }
      • OptionalaccountId?: string

        The account ID of the user. The accountId uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.

      • contentId: string

        The ID of the content to add the watcher to.

      • Optionalkey?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

      • Optionalusername?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

    Returns Promise<void>

    POST /wiki/rest/api/user/watch/content/{contentId} @scopes-current write:confluence-content @scopes-beta write:watcher:confluence

  • Adds a user as a watcher to a label. Choose the user by doing one of the following:

    • Specify a user via a query parameter: Use the accountId to identify the user.
    • Do not specify a user: The currently logged-in user will be used.

    Note, you must add the X-Atlassian-Token: no-check header when making a request, as this operation has XSRF protection.

    Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).

    Parameters

    • params: {
          accountId?: string;
          key?: string;
          labelName: string;
          username?: string;
          xAtlassianToken: string;
      }
      • OptionalaccountId?: string

        The account ID of the user. The accountId uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.

      • Optionalkey?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

      • labelName: string

        The name of the label to add the watcher to.

      • Optionalusername?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

      • xAtlassianToken: string

        Note, you must add header when making a request, as this operation has XSRF protection.

    Returns Promise<void>

    POST /wiki/rest/api/user/watch/label/{labelName} @scopes-current write:confluence-content @scopes-beta write:watcher:confluence

  • Adds a user as a watcher to a space. Choose the user by doing one of the following:

    • Specify a user via a query parameter: Use the accountId to identify the user.
    • Do not specify a user: The currently logged-in user will be used.

    Note, you must add the X-Atlassian-Token: no-check header when making a request, as this operation has XSRF protection.

    Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).

    Parameters

    • params: {
          accountId?: string;
          key?: string;
          spaceKey: string;
          username?: string;
          xAtlassianToken: string;
      }
      • OptionalaccountId?: string

        The account ID of the user. The accountId uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.

      • Optionalkey?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

      • spaceKey: string

        The key of the space to add the watcher to.

      • Optionalusername?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

      • xAtlassianToken: string

        Note, you must add header when making a request, as this operation has XSRF protection.

    Returns Promise<void>

    POST /wiki/rest/api/user/watch/space/{spaceKey} @scopes-current write:confluence-content @scopes-beta write:watcher:confluence

  • Returns whether a user is watching a piece of content. Choose the user by doing one of the following:

    • Specify a user via a query parameter: Use the accountId to identify the user.
    • Do not specify a user: The currently logged-in user will be used.

    Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).

    Parameters

    • params: {
          accountId?: string;
          contentId: string;
          key?: string;
          username?: string;
      }
      • OptionalaccountId?: string

        The account ID of the user. The accountId uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.

      • contentId: string

        The ID of the content to be queried for whether the specified user is watching it.

      • Optionalkey?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

      • Optionalusername?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

    Returns Promise<UserWatch>

    Returned if the requested watch status is returned.

    GET /wiki/rest/api/user/watch/content/{contentId} @scopes-current read:confluence-content.summary @scopes-beta read:watcher:confluence

  • Returns whether a user is watching a label. Choose the user by doing one of the following:

    • Specify a user via a query parameter: Use the accountId to identify the user.
    • Do not specify a user: The currently logged-in user will be used.

    Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).

    Parameters

    • params: {
          accountId?: string;
          key?: string;
          labelName: string;
          username?: string;
      }
      • OptionalaccountId?: string

        The account ID of the user. The accountId uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.

      • Optionalkey?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

      • labelName: string

        The name of the label to be queried for whether the specified user is watching it.

      • Optionalusername?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

    Returns Promise<UserWatch>

    Returned if the requested watch status is returned.

    GET /wiki/rest/api/user/watch/label/{labelName} @scopes-current read:confluence-content.summary @scopes-beta read:watcher:confluence

  • Returns whether a user is watching a space. Choose the user by doing one of the following:

    • Specify a user via a query parameter: Use the accountId to identify the user.
    • Do not specify a user: The currently logged-in user will be used.

    Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).

    Parameters

    • params: {
          accountId?: string;
          key?: string;
          spaceKey: string;
          username?: string;
      }
      • OptionalaccountId?: string

        The account ID of the user. The accountId uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.

      • Optionalkey?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

      • spaceKey: string

        The key of the space to be queried for whether the specified user is watching it.

      • Optionalusername?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

    Returns Promise<UserWatch>

    Returned if the requested watch status is returned.

    GET /wiki/rest/api/user/watch/space/{spaceKey} @scopes-current read:confluence-content.summary @scopes-beta read:watcher:confluence

  • Removes a user as a watcher from a piece of content. Choose the user by doing one of the following:

    • Specify a user via a query parameter: Use the accountId to identify the user.
    • Do not specify a user: The currently logged-in user will be used.

    Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).

    Parameters

    • params: {
          accountId?: string;
          contentId: string;
          key?: string;
          username?: string;
          xAtlassianToken: string;
      }
      • OptionalaccountId?: string

        The account ID of the user. The accountId uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.

      • contentId: string

        The ID of the content to remove the watcher from.

      • Optionalkey?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

      • Optionalusername?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

      • xAtlassianToken: string

        Note, you must add header when making a request, as this operation has XSRF protection.

    Returns Promise<void>

    DELETE /wiki/rest/api/user/watch/content/{contentId} @scopes-current write:confluence-content @scopes-beta write:watcher:confluence

  • Removes a user as a watcher from a label. Choose the user by doing one of the following:

    • Specify a user via a query parameter: Use the accountId to identify the user.
    • Do not specify a user: The currently logged-in user will be used.

    Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).

    Parameters

    • params: {
          accountId?: string;
          key?: string;
          labelName: string;
          username?: string;
      }
      • OptionalaccountId?: string

        The account ID of the user. The accountId uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.

      • Optionalkey?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

      • labelName: string

        The name of the label to remove the watcher from.

      • Optionalusername?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

    Returns Promise<void>

    DELETE /wiki/rest/api/user/watch/label/{labelName} @scopes-current write:confluence-content @scopes-beta write:watcher:confluence

  • Removes a user as a watcher from a space. Choose the user by doing one of the following:

    • Specify a user via a query parameter: Use the accountId to identify the user.
    • Do not specify a user: The currently logged-in user will be used.

    Permissions required: 'Confluence Administrator' global permission if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).

    Parameters

    • params: {
          accountId?: string;
          key?: string;
          spaceKey: string;
          username?: string;
      }
      • OptionalaccountId?: string

        The account ID of the user. The accountId uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.

      • Optionalkey?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

      • spaceKey: string

        The key of the space to remove the watcher from.

      • Optionalusername?: string

        This parameter is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

    Returns Promise<void>

    DELETE /wiki/rest/api/user/watch/space/{spaceKey} @scopes-current write:confluence-content @scopes-beta write:watcher:confluence

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

    Returns void