Hierarchy

  • CommonHttpService
    • AuditService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

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

    Returns AuditService

Methods

  • Exports audit records as a CSV file or ZIP file.

    Permissions required: 'Confluence Administrator' global permission.

    Parameters

    • params: {
          endDate?: string;
          format?: "csv" | "zip";
          searchString?: string;
          startDate?: string;
      } = {}
      • OptionalendDate?: string

        Filters the exported results to the records on or before the endDate. The endDate must be specified as epoch time in milliseconds.

      • Optionalformat?: "csv" | "zip"

        The format of the export file for the audit records.

      • OptionalsearchString?: string

        Filters the exported results to records that have string property values matching the searchString.

      • OptionalstartDate?: string

        Filters the exported results to the records on or after the startDate. The startDate must be specified as epoch time in milliseconds.

    Returns Promise<WithResponse<{
        body: Blob;
        mediaType: "application/zip" | "text/csv";
        status: 200;
    }>>

    • status: 200, mediaType: application/zip

      Returned if the requested export of the audit records is returned.

    • status: 200, mediaType: text/csv

      Returned if the requested export of the audit records is returned.

    GET /wiki/rest/api/audit/export @scopes-current read:audit-log:confluence

  • Returns all records in the audit log, optionally for a certain date range. This contains information about events like space exports, group membership changes, app installations, etc. For more information, see Audit log in the Confluence administrator's guide.

    Permissions required: 'Confluence Administrator' global permission.

    Parameters

    • params: {
          endDate?: string;
          limit?: number;
          searchString?: string;
          start?: number;
          startDate?: string;
      } = {}
      • OptionalendDate?: string

        Filters the results to the records on or before the endDate. The endDate must be specified as epoch time in milliseconds.

      • Optionallimit?: number

        The maximum number of records to return per page. Note, this may be restricted by fixed system limits.

      • OptionalsearchString?: string

        Filters the results to records that have string property values matching the searchString.

      • Optionalstart?: number

        The starting index of the returned records.

      • OptionalstartDate?: string

        Filters the results to the records on or after the startDate. The startDate must be specified as epoch time in milliseconds.

    Returns Promise<AuditRecordArray>

    Returned if the requested records are returned.

    GET /wiki/rest/api/audit @scopes-current read:audit-log:confluence

  • Returns records from the audit log, for a time period back from the current date. For example, you can use this method to get the last 3 months of records.

    This contains information about events like space exports, group membership changes, app installations, etc. For more information, see Audit log in the Confluence administrator's guide.

    Permissions required: 'Confluence Administrator' global permission.

    Parameters

    • params: {
          limit?: number;
          number?: number;
          searchString?: string;
          start?: number;
          units?:
              | "NANOS"
              | "MICROS"
              | "MILLIS"
              | "SECONDS"
              | "MINUTES"
              | "HOURS"
              | "HALF_DAYS"
              | "DAYS"
              | "WEEKS"
              | "MONTHS"
              | "YEARS"
              | "DECADES"
              | "CENTURIES";
      } = {}
      • Optionallimit?: number

        The maximum number of records to return per page. Note, this may be restricted by fixed system limits.

      • Optionalnumber?: number

        The number of units for the time period.

      • OptionalsearchString?: string

        Filters the results to records that have string property values matching the searchString.

      • Optionalstart?: number

        The starting index of the returned records.

      • Optionalunits?:
            | "NANOS"
            | "MICROS"
            | "MILLIS"
            | "SECONDS"
            | "MINUTES"
            | "HOURS"
            | "HALF_DAYS"
            | "DAYS"
            | "WEEKS"
            | "MONTHS"
            | "YEARS"
            | "DECADES"
            | "CENTURIES"

        The unit of time that the time period is measured in.

    Returns Promise<AuditRecordArray>

    Returned if the requested records are returned.

    GET /wiki/rest/api/audit/since @scopes-current read:audit-log:confluence

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

    Returns void