The Admin Key feature is only offered with Confluence Cloud Premium and Enterprise to organization or site admins.

NOTE: Users can only make calls to our public REST APIs using a valid Admin Key by adding the following HTTP header on their requests: Atl-Confluence-With-Admin-Key: true. Visit the Confluence Cloud Changelog for more details.

Hierarchy

  • CommonHttpService
    • AdminKeyService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

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

    Returns AdminKeyService

Methods

  • Enables admin key access for the calling user within the site. If an admin key already exists for the user, a new one will be issued with an updated expiration time.

    Note: The durationInMinutes field within the request body is optional. If the request body is empty or if the durationInMinutes is set to 0 minutes, a new admin key will be issued to the calling user with a default duration of 10 minutes.

    Permissions required: User must be an organization or site admin.

    Parameters

    • params: {
          requestBody: {
              durationInMinutes?: number;
          } & {
              [key: string]: unknown;
          };
      }
      • requestBody: {
            durationInMinutes?: number;
        } & {
            [key: string]: unknown;
        }

    Returns Promise<AdminKeyResponse>

    Returned if a new admin key is successfully issued for the calling user.

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

    Returns void