Constructors

Properties

client: Client

Methods

  • Archives a list of pages. The pages to be archived are specified as a list of content IDs. This API accepts the archival request and returns a task ID. The archival process happens asynchronously. Use the /longtask/ REST API to get the copy task status.

    Each content ID needs to resolve to page objects that are not already in an archived state. The content IDs need not belong to the same space.

    Permissions required: 'Archive' permission for each of the pages in the corresponding space it belongs to.

    Type Parameters

    Parameters

    Returns Promise<void>

  • Archives a list of pages. The pages to be archived are specified as a list of content IDs. This API accepts the archival request and returns a task ID. The archival process happens asynchronously. Use the /longtask/ REST API to get the copy task status.

    Each content ID needs to resolve to page objects that are not already in an archived state. The content IDs need not belong to the same space.

    Permissions required: 'Archive' permission for each of the pages in the corresponding space it belongs to.

    Type Parameters

    Parameters

    Returns Promise<T>

  • Creates a new piece of content or publishes an existing draft.

    To publish a draft, add the id and status properties to the body of the request. Set the id to the ID of the draft and set the status to 'current'. When the request is sent, a new piece of content will be created and the metadata from the draft will be transferred into it.

    By default, the following objects are expanded: space, history, version.

    Permissions required: 'Add' permission for the space that the content will be created in, and permission to view the draft if publishing a draft.

    Type Parameters

    Parameters

    Returns Promise<void>

  • Creates a new piece of content or publishes an existing draft.

    To publish a draft, add the id and status properties to the body of the request. Set the id to the ID of the draft and set the status to 'current'. When the request is sent, a new piece of content will be created and the metadata from the draft will be transferred into it.

    By default, the following objects are expanded: space, history, version.

    Permissions required: 'Add' permission for the space that the content will be created in, and permission to view the draft if publishing a draft.

    Type Parameters

    Parameters

    Returns Promise<T>

  • Moves a piece of content to the space's trash or purges it from the trash, depending on the content's type and status:

    • If the content's type is page or blogpost and its status is current, it will be trashed.
    • If the content's type is page or blogpost and its status is trashed, the content will be purged from the trash and deleted permanently. Note, you must also set the status query parameter to trashed in your request.
    • If the content's type is comment or attachment, it will be deleted permanently without being trashed.

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

    Type Parameters

    • T = void

    Parameters

    Returns Promise<void>

  • Moves a piece of content to the space's trash or purges it from the trash, depending on the content's type and status:

    • If the content's type is page or blogpost and its status is current, it will be trashed.
    • If the content's type is page or blogpost and its status is trashed, the content will be purged from the trash and deleted permanently. Note, you must also set the status query parameter to trashed in your request.
    • If the content's type is comment or attachment, it will be deleted permanently without being trashed.

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

    Type Parameters

    • T = void

    Parameters

    Returns Promise<T>

  • Returns all content in a Confluence instance.

    By default, the following objects are expanded: space, history, version.

    Permissions required: Permission to access the Confluence site ('Can use' global permission). Only content that the user has permission to view will be returned.

    Type Parameters

    Parameters

    Returns Promise<void>

  • Returns all content in a Confluence instance.

    By default, the following objects are expanded: space, history, version.

    Permissions required: Permission to access the Confluence site ('Can use' global permission). Only content that the user has permission to view will be returned.

    Type Parameters

    Parameters

    Returns Promise<T>

  • Returns a single piece of content, like a page or a blog post.

    By default, the following objects are expanded: space, history, version.

    Permissions required: Permission to view the content. If the content is a blog post, 'View' permission for the space is required.

    Type Parameters

    Parameters

    Returns Promise<void>

  • Returns a single piece of content, like a page or a blog post.

    By default, the following objects are expanded: space, history, version.

    Permissions required: Permission to view the content. If the content is a blog post, 'View' permission for the space is required.

    Type Parameters

    Parameters

    Returns Promise<T>

  • Publishes a legacy draft of a page created from a blueprint. Legacy drafts will eventually be removed in favor of shared drafts. For now, this method works the same as Publish shared draft.

    By default, the following objects are expanded: body.storage, history, space, version, ancestors.

    Permissions required: Permission to view the draft and 'Add' permission for the space that the content will be created in.

    Type Parameters

    Parameters

    Returns Promise<void>

  • Publishes a legacy draft of a page created from a blueprint. Legacy drafts will eventually be removed in favor of shared drafts. For now, this method works the same as Publish shared draft.

    By default, the following objects are expanded: body.storage, history, space, version, ancestors.

    Permissions required: Permission to view the draft and 'Add' permission for the space that the content will be created in.

    Type Parameters

    Parameters

    Returns Promise<T>

  • Publishes a shared draft of a page created from a blueprint.

    By default, the following objects are expanded: body.storage, history, space, version, ancestors.

    Permissions required: Permission to view the draft and 'Add' permission for the space that the content will be created in.

    Type Parameters

    Parameters

    Returns Promise<void>

  • Publishes a shared draft of a page created from a blueprint.

    By default, the following objects are expanded: body.storage, history, space, version, ancestors.

    Permissions required: Permission to view the draft and 'Add' permission for the space that the content will be created in.

    Type Parameters

    Parameters

    Returns Promise<T>

  • Returns the list of content that matches a Confluence Query Language (CQL) query. For information on CQL, see: Advanced searching using CQL.

    When additional results are available, returns next and prev URLs to retrieve them in subsequent calls. The URLs each contain a cursor that points to the appropriate set of results. Use limit to specify the number of results returned in each call. Example subsequent call (taken from example response):

    https://your-domain.atlassian.net/wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg
    

    The response to this will have a prev URL similar to the next in the example response.

    Permissions required: Permission to access the Confluence site ('Can use' global permission). Only content that the user has permission to view will be returned.

    Type Parameters

    Parameters

    Returns Promise<void>

  • Returns the list of content that matches a Confluence Query Language (CQL) query. For information on CQL, see: Advanced searching using CQL.

    When additional results are available, returns next and prev URLs to retrieve them in subsequent calls. The URLs each contain a cursor that points to the appropriate set of results. Use limit to specify the number of results returned in each call. Example subsequent call (taken from example response):

    https://your-domain.atlassian.net/wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg
    

    The response to this will have a prev URL similar to the next in the example response.

    Permissions required: Permission to access the Confluence site ('Can use' global permission). Only content that the user has permission to view will be returned.

    Type Parameters

    Parameters

    Returns Promise<T>

  • Updates a piece of content. Use this method to update the title or body of a piece of content, change the status, change the parent page, and more.

    Note, updating draft content is currently not supported.

    Permissions required: Permission to update the content.

    Type Parameters

    Parameters

    Returns Promise<void>

  • Updates a piece of content. Use this method to update the title or body of a piece of content, change the status, change the parent page, and more.

    Note, updating draft content is currently not supported.

    Permissions required: Permission to update the content.

    Type Parameters

    Parameters

    Returns Promise<T>

Generated using TypeDoc v0.25.12