Constructors

Properties

client: Client

Methods

  • Add one or more attachments to a Confluence Content entity, with optional comments.

    Comments are optional, but if included there must be as many comments as there are files, and the comments must be in the same order as the files.

    This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. Most client libraries have classes that make dealing with multipart posts simple. For instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST.

    In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked.

    The name of the multipart/form-data parameter that contains attachments must be "file"

    A simple example to attach a file called "myfile.txt" to the container with id "123", with a comment included: curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" -F "comment=This is my File" http://myhost/rest/api/content/123/child/attachment A example to attach a file called "myfile.txt" to the container with id "123", with a comment, and set the minorEdits flag to be true: curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" -F "minorEdit=true" -F "comment=This is my File" http://myhost/rest/api/content/123/child/attachment An example to attach the same file, with no comment: curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" http://myhost/rest/api/content/123/child/attachment

    Type Parameters

    Parameters

    Returns Promise<void>

  • Add one or more attachments to a Confluence Content entity, with optional comments.

    Comments are optional, but if included there must be as many comments as there are files, and the comments must be in the same order as the files.

    This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. Most client libraries have classes that make dealing with multipart posts simple. For instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST.

    In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked.

    The name of the multipart/form-data parameter that contains attachments must be "file"

    A simple example to attach a file called "myfile.txt" to the container with id "123", with a comment included: curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" -F "comment=This is my File" http://myhost/rest/api/content/123/child/attachment A example to attach a file called "myfile.txt" to the container with id "123", with a comment, and set the minorEdits flag to be true: curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" -F "minorEdit=true" -F "comment=This is my File" http://myhost/rest/api/content/123/child/attachment An example to attach the same file, with no comment: curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" http://myhost/rest/api/content/123/child/attachment

    Type Parameters

    Parameters

    Returns Promise<T>

  • Creates a new piece of Content or publishes the draft if the content id is present.For the case publishing draft, a new piece of content will be created and all metadata from the draft will be transferred into the newly created content.

    Type Parameters

    Parameters

    Returns Promise<void>

  • Creates a new piece of Content or publishes the draft if the content id is present.For the case publishing draft, a new piece of content will be created and all metadata from the draft will be transferred into the newly created content.

    Type Parameters

    Parameters

    Returns Promise<T>

  • Trashes or purges a piece of Content, based on its ContentType and ContentStatus. There are three cases:

    • If the content is trashable and its status is current, it will be trashed.
    • If the content is trashable, its status is trashed and the "status" query parameter in the request is "trashed", the content will be purged from the trash and deleted permanently.
    • If the content is not trashable it will be deleted permanently without being trashed.

    Type Parameters

    • T = void

    Parameters

    Returns Promise<void>

  • Trashes or purges a piece of Content, based on its ContentType and ContentStatus. There are three cases:

    • If the content is trashable and its status is current, it will be trashed.
    • If the content is trashable, its status is trashed and the "status" query parameter in the request is "trashed", the content will be purged from the trash and deleted permanently.
    • If the content is not trashable it will be deleted permanently without being trashed.

    Type Parameters

    • T = void

    Parameters

    Returns Promise<T>

  • Deletes a labels to the specified content. When calling this method through REST the label parameter doesn't accept "/" characters in label names, because of security constraints. For this case please use the query parameter version of this method (/content/{id}/label?name={label}Responses

    Type Parameters

    • T = void

    Parameters

    Returns Promise<void>

  • Deletes a labels to the specified content. When calling this method through REST the label parameter doesn't accept "/" characters in label names, because of security constraints. For this case please use the query parameter version of this method (/content/{id}/label?name={label}Responses

    Type Parameters

    • T = void

    Parameters

    Returns Promise<T>

  • Returns a map of the direct children of a piece of Content. Content can have multiple types of children - for example a Page can have children that are also Pages, but it can also have Comments and Attachments.

    The ContentType(s) of the children returned is specified by the "expand" query parameter in the request - this parameter can include expands for multiple child types.

    If no types are included in the expand parameter, the map returned will just list the child types that are available to be expanded for the Content referenced by the "id" path parameter.

    Type Parameters

    Parameters

    Returns Promise<void>

  • Returns a map of the direct children of a piece of Content. Content can have multiple types of children - for example a Page can have children that are also Pages, but it can also have Comments and Attachments.

    The ContentType(s) of the children returned is specified by the "expand" query parameter in the request - this parameter can include expands for multiple child types.

    If no types are included in the expand parameter, the map returned will just list the child types that are available to be expanded for the Content referenced by the "id" path parameter.

    Type Parameters

    Parameters

    Returns Promise<T>

  • Returns a map of the descendants of a piece of Content. Content can have multiple types of descendants - for example a Page can have descendants that are also Pages, but it can also have Comments and Attachments.

    The ContentType(s) of the descendants returned is specified by the "expand" query parameter in the request - this parameter can include expands for multiple descendant types.

    If no types are included in the expand parameter, the map returned will just list the descendant types that are available to be expanded for the Content referenced by the "id" path parameter.

    Currently the only supported descendants are comment descendants of non-comment Content.

    Type Parameters

    Parameters

    Returns Promise<void>

  • Returns a map of the descendants of a piece of Content. Content can have multiple types of descendants - for example a Page can have descendants that are also Pages, but it can also have Comments and Attachments.

    The ContentType(s) of the descendants returned is specified by the "expand" query parameter in the request - this parameter can include expands for multiple descendant types.

    If no types are included in the expand parameter, the map returned will just list the descendant types that are available to be expanded for the Content referenced by the "id" path parameter.

    Currently the only supported descendants are comment descendants of non-comment Content.

    Type Parameters

    Parameters

    Returns Promise<T>

  • Returns the direct descendants of a piece of Content, limited to a single descendant type.

    The ContentType(s) of the descendants returned is specified by the "type" path parameter in the request.

    Currently the only supported descendants are comment descendants of non-comment Content.

    Type Parameters

    Parameters

    Returns Promise<void>

  • Returns the direct descendants of a piece of Content, limited to a single descendant type.

    The ContentType(s) of the descendants returned is specified by the "type" path parameter in the request.

    Currently the only supported descendants are comment descendants of non-comment Content.

    Type Parameters

    Parameters

    Returns Promise<T>

  • Returns the body of a macro (in storage format) with the given hash. This resource is primarily used by connect applications that require the body of macro to perform their work.

    The hash is generated by connect during render time of the local macro holder and is usually only relevant during the scope of one request. For optimisation purposes, this hash will usually live for multiple requests.

    Collecting a macro by its hash should now be considered deprecated and will be replaced, transparently with macroIds. This resource is currently only called from connect addons which will eventually all use the #getContentById(com.atlassian.confluence.api.model.content.id.ContentId, java.util.List, Integer, String) resource.

    To make the migration as seamless as possible, this resource will match macros against a generated hash or a stored macroId. This will allow add ons to work during the migration period.

    Type Parameters

    Parameters

    Returns Promise<void>

  • Returns the body of a macro (in storage format) with the given hash. This resource is primarily used by connect applications that require the body of macro to perform their work.

    The hash is generated by connect during render time of the local macro holder and is usually only relevant during the scope of one request. For optimisation purposes, this hash will usually live for multiple requests.

    Collecting a macro by its hash should now be considered deprecated and will be replaced, transparently with macroIds. This resource is currently only called from connect addons which will eventually all use the #getContentById(com.atlassian.confluence.api.model.content.id.ContentId, java.util.List, Integer, String) resource.

    To make the migration as seamless as possible, this resource will match macros against a generated hash or a stored macroId. This will allow add ons to work during the migration period.

    Type Parameters

    Parameters

    Returns Promise<T>

  • Returns the body of a macro (in storage format) with the given id. This resource is primarily used by connect applications that require the body of macro to perform their work.

    When content is created, if no macroId is specified, then Confluence will generate a random id. The id is persisted as the content is saved and only modified by Confluence if there are conflicting IDs.

    To preserve backwards compatibility this resource will also match on the hash of the macro body, even if a macroId is found. This check will become redundant as pages get macroId's generated for them and transparently propagate out to all instances.

    Type Parameters

    Parameters

    Returns Promise<void>

  • Returns the body of a macro (in storage format) with the given id. This resource is primarily used by connect applications that require the body of macro to perform their work.

    When content is created, if no macroId is specified, then Confluence will generate a random id. The id is persisted as the content is saved and only modified by Confluence if there are conflicting IDs.

    To preserve backwards compatibility this resource will also match on the hash of the macro body, even if a macroId is found. This check will become redundant as pages get macroId's generated for them and transparently propagate out to all instances.

    Type Parameters

    Parameters

    Returns Promise<T>

  • Update the binary data of an Attachment, and optionally the comment and the minor edit field. This adds a new version of the attachment, containing the new binary data, filename, and content-type.

    When updating the binary data of an attachment, the comment related to it together with the field that specifies if it's a minor edit can be updated as well, but are not required. If an update is considered to be a minor edit, notifications will not be sent to the watchers of that content.

    This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. Most client libraries have classes that make dealing with multipart posts simple. For instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST.

    In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked.

    The name of the multipart/form-data parameter that contains attachments must be "file"

    A simple example to upload a file called "myfile.txt" to the Attachment with id "456" in a container with id "123", with the comment updated, and minorEdit set to true: curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" -F "minorEdit=true" -F "comment=This is my updated File" http://myhost/rest/api/content/123/child/attachment/456/data

    An example to upload the same file, with no comment: curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" http://myhost/rest/api/content/123/child/attachment/456/data

    Type Parameters

    Parameters

    Returns Promise<void>

  • Update the binary data of an Attachment, and optionally the comment and the minor edit field. This adds a new version of the attachment, containing the new binary data, filename, and content-type.

    When updating the binary data of an attachment, the comment related to it together with the field that specifies if it's a minor edit can be updated as well, but are not required. If an update is considered to be a minor edit, notifications will not be sent to the watchers of that content.

    This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. Most client libraries have classes that make dealing with multipart posts simple. For instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST.

    In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked.

    The name of the multipart/form-data parameter that contains attachments must be "file"

    A simple example to upload a file called "myfile.txt" to the Attachment with id "456" in a container with id "123", with the comment updated, and minorEdit set to true: curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" -F "minorEdit=true" -F "comment=This is my updated File" http://myhost/rest/api/content/123/child/attachment/456/data

    An example to upload the same file, with no comment: curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" http://myhost/rest/api/content/123/child/attachment/456/data

    Type Parameters

    Parameters

    Returns Promise<T>

  • Updates a piece of Content, including changes to content status To update a piece of content you must increment the version.number, supplying the number of the version you are creating. The title property can be updated on all content, body can be updated on all content that has a body (not attachments).

    Type Parameters

    Parameters

    Returns Promise<void>

  • Updates a piece of Content, including changes to content status To update a piece of content you must increment the version.number, supplying the number of the version you are creating. The title property can be updated on all content, body can be updated on all content that has a body (not attachments).

    Type Parameters

    Parameters

    Returns Promise<T>

  • Updates a content property. The body contains the representation of the content property. Must include the property id, and the new version number. Attempts to create a new content property if the given version number is 1, just like #create(com.atlassian.confluence.api.model.content.id.ContentId, String, com.atlassian.confluence.api.model.content.JsonContentProperty).

    Type Parameters

    Parameters

    Returns Promise<void>

  • Updates a content property. The body contains the representation of the content property. Must include the property id, and the new version number. Attempts to create a new content property if the given version number is 1, just like #create(com.atlassian.confluence.api.model.content.id.ContentId, String, com.atlassian.confluence.api.model.content.JsonContentProperty).

    Type Parameters

    Parameters

    Returns Promise<T>

Generated using TypeDoc v0.25.12