APIs in this section can change without any prior deprecation notice.

Hierarchy

  • CommonHttpService
    • ExperimentalService

Constructors

  • Internal

    Create a new instance of the service.

    Parameters

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

    Returns ExperimentalService

Methods

  • Moves a pagetree rooted at a page to the space's trash:

    • If the content's type is page and its status is current, it will be trashed including all its descendants.
    • For every other combination of content type and status, this API is not supported.

    This API accepts the pageTree delete request and returns a task ID. The delete process happens asynchronously.

    Response example:

     {
    "id" : "1180606",
    "links" : {
    "status" : "/rest/api/longtask/1180606"
    }
    }

    Use the /longtask/<taskId> REST API to get the copy task status.

    Permissions required: 'Delete' permission for the space that the content is in.

    Parameters

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

        The ID of the content which forms root of the page tree, to be deleted.

    Returns Promise<LongTask>

    Returned if the request to trash content and all its current page descendants, is successfully accepted.

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

  • Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different types of labels.

    Parameters

    • params: {
          limit?: number;
          prefix?: "global" | "my" | "team";
          spaceKey: string;
          start?: number;
      }
      • Optionallimit?: number

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

      • Optionalprefix?: "global" | "my" | "team"

        Filters the results to labels with the specified prefix. If this parameter is not specified, then labels with any prefix will be returned.

        • global prefix is used by labels that are on content within the provided space.
        • my prefix can be explicitly added by a user when adding a label via the UI, e.g. 'my:example-label'.
        • team prefix is used for labels applied to the space.
      • spaceKey: string

        The key of the space to get labels for.

      • Optionalstart?: number

        The starting index of the returned labels.

    Returns Promise<LabelArray>

    Returned if the list of labels is returned.

    GET /wiki/rest/api/space/{spaceKey}/label @scopes-current read:confluence-space.summary @scopes-beta read:label:confluence

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

    Returns void