/** * The Confluence Cloud REST API * This document describes the REST API and resources provided by Confluence. The REST APIs are for developers who want to integrate Confluence into their application and for administrators who want to script interactions with the Confluence server.Confluence\'s REST APIs provide access to resources (data entities) via URI paths. To use a REST API, your application will make an HTTP request and parse the response. The response format is JSON. Your methods will be the standard HTTP methods like GET, PUT, POST and DELETE. Because the REST API is based on open standards, you can use any web development language to access the API. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import { AttachmentUpdate, Content, ContentArray, CreateAttachmentsPayload } from '../models'; export interface CreateAttachmentsRequest { id: string; status?: CreateAttachmentsStatusEnum; CreateAttachmentsPayload?: CreateAttachmentsPayload; } export interface CreateOrUpdateAttachmentsRequest { id: string; status?: CreateOrUpdateAttachmentsStatusEnum; CreateAttachmentsPayload?: CreateAttachmentsPayload; } export interface UpdateAttachmentDataRequest { id: string; attachmentId: string; CreateAttachmentsPayload?: CreateAttachmentsPayload; } export interface UpdateAttachmentPropertiesRequest { id: string; attachmentId: string; AttachmentUpdate: AttachmentUpdate; } /** * no description */ export declare class ContentIdChildAttachmentApi extends runtime.BaseAPI { /** * Adds an attachment to a piece of content. This method only adds a new attachment. If you want to update an existing attachment, use [Create or update attachments](#api-content-id-child-attachment-put). Note, you must set a `X-Atlassian-Token: nocheck` header on the request for this method, otherwise it will be blocked. This protects against XSRF attacks, which is necessary as this method accepts multipart/form-data. The media type \'multipart/form-data\' is defined in [RFC 1867](https://www.ietf.org/rfc/rfc1867.txt). Most client libraries have classes that make it easier to implement multipart posts, like the [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) Java class provided by Apache HTTP Components. Example: This curl command attaches a file (\'example.txt\') to a container (id=\'123\') with a comment and `minorEdits`=true. ``` bash curl -D- \\ -u admin:admin \\ -X POST \\ -H \"X-Atlassian-Token: nocheck\" \\ -F \"file=@example.txt\" \\ -F \"minorEdit=true\" \\ -F \"comment=Example attachment comment\" \\ http://myhost/rest/api/content/123/child/attachment ``` **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. * Create attachment */ createAttachmentsRaw(requestParameters: CreateAttachmentsRequest): Promise>; /** * Adds an attachment to a piece of content. This method only adds a new attachment. If you want to update an existing attachment, use [Create or update attachments](#api-content-id-child-attachment-put). Note, you must set a `X-Atlassian-Token: nocheck` header on the request for this method, otherwise it will be blocked. This protects against XSRF attacks, which is necessary as this method accepts multipart/form-data. The media type \'multipart/form-data\' is defined in [RFC 1867](https://www.ietf.org/rfc/rfc1867.txt). Most client libraries have classes that make it easier to implement multipart posts, like the [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) Java class provided by Apache HTTP Components. Example: This curl command attaches a file (\'example.txt\') to a container (id=\'123\') with a comment and `minorEdits`=true. ``` bash curl -D- \\ -u admin:admin \\ -X POST \\ -H \"X-Atlassian-Token: nocheck\" \\ -F \"file=@example.txt\" \\ -F \"minorEdit=true\" \\ -F \"comment=Example attachment comment\" \\ http://myhost/rest/api/content/123/child/attachment ``` **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. * Create attachment */ createAttachments(requestParameters: CreateAttachmentsRequest): Promise; /** * Adds an attachment to a piece of content. If the attachment already exists for the content, then the attachment is updated (i.e. a new version of the attachment is created). Note, you must set a `X-Atlassian-Token: nocheck` header on the request for this method, otherwise it will be blocked. This protects against XSRF attacks, which is necessary as this method accepts multipart/form-data. The media type \'multipart/form-data\' is defined in [RFC 1867](https://www.ietf.org/rfc/rfc1867.txt). Most client libraries have classes that make it easier to implement multipart posts, like the [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) Java class provided by Apache HTTP Components. Example: This curl command attaches a file (\'example.txt\') to a piece of content (id=\'123\') with a comment and `minorEdits`=true. If the \'example.txt\' file already exists, it will update it with a new version of the attachment. ``` bash curl -D- \\ -u admin:admin \\ -X PUT \\ -H \"X-Atlassian-Token: nocheck\" \\ -F \"file=@example.txt\" \\ -F \"minorEdit=true\" \\ -F \"comment=Example attachment comment\" \\ http://myhost/rest/api/content/123/child/attachment ``` **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. * Create or update attachment */ createOrUpdateAttachmentsRaw(requestParameters: CreateOrUpdateAttachmentsRequest): Promise>; /** * Adds an attachment to a piece of content. If the attachment already exists for the content, then the attachment is updated (i.e. a new version of the attachment is created). Note, you must set a `X-Atlassian-Token: nocheck` header on the request for this method, otherwise it will be blocked. This protects against XSRF attacks, which is necessary as this method accepts multipart/form-data. The media type \'multipart/form-data\' is defined in [RFC 1867](https://www.ietf.org/rfc/rfc1867.txt). Most client libraries have classes that make it easier to implement multipart posts, like the [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) Java class provided by Apache HTTP Components. Example: This curl command attaches a file (\'example.txt\') to a piece of content (id=\'123\') with a comment and `minorEdits`=true. If the \'example.txt\' file already exists, it will update it with a new version of the attachment. ``` bash curl -D- \\ -u admin:admin \\ -X PUT \\ -H \"X-Atlassian-Token: nocheck\" \\ -F \"file=@example.txt\" \\ -F \"minorEdit=true\" \\ -F \"comment=Example attachment comment\" \\ http://myhost/rest/api/content/123/child/attachment ``` **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. * Create or update attachment */ createOrUpdateAttachments(requestParameters: CreateOrUpdateAttachmentsRequest): Promise; /** * Updates the binary data of an attachment, given the attachment ID, and optionally the comment and the minor edit field. This method is essentially the same as [Create or update attachments](#api-content-id-child-attachment-put), except that it matches the attachment ID rather than the name. Note, you must set a `X-Atlassian-Token: nocheck` header on the request for this method, otherwise it will be blocked. This protects against XSRF attacks, which is necessary as this method accepts multipart/form-data. The media type \'multipart/form-data\' is defined in [RFC 1867](https://www.ietf.org/rfc/rfc1867.txt). Most client libraries have classes that make it easier to implement multipart posts, like the [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) Java class provided by Apache HTTP Components. Example: This curl command updates an attachment (id=\'att456\') that is attached to a piece of content (id=\'123\') with a comment and `minorEdits`=true. ``` bash curl -D- \\ -u admin:admin \\ -X POST \\ -H \"X-Atlassian-Token: nocheck\" \\ -F \"file=@example.txt\" \\ -F \"minorEdit=true\" \\ -F \"comment=Example attachment comment\" \\ http://myhost/rest/api/content/123/child/attachment/att456/data ``` **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. * Update attachment data */ updateAttachmentDataRaw(requestParameters: UpdateAttachmentDataRequest): Promise>; /** * Updates the binary data of an attachment, given the attachment ID, and optionally the comment and the minor edit field. This method is essentially the same as [Create or update attachments](#api-content-id-child-attachment-put), except that it matches the attachment ID rather than the name. Note, you must set a `X-Atlassian-Token: nocheck` header on the request for this method, otherwise it will be blocked. This protects against XSRF attacks, which is necessary as this method accepts multipart/form-data. The media type \'multipart/form-data\' is defined in [RFC 1867](https://www.ietf.org/rfc/rfc1867.txt). Most client libraries have classes that make it easier to implement multipart posts, like the [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html) Java class provided by Apache HTTP Components. Example: This curl command updates an attachment (id=\'att456\') that is attached to a piece of content (id=\'123\') with a comment and `minorEdits`=true. ``` bash curl -D- \\ -u admin:admin \\ -X POST \\ -H \"X-Atlassian-Token: nocheck\" \\ -F \"file=@example.txt\" \\ -F \"minorEdit=true\" \\ -F \"comment=Example attachment comment\" \\ http://myhost/rest/api/content/123/child/attachment/att456/data ``` **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. * Update attachment data */ updateAttachmentData(requestParameters: UpdateAttachmentDataRequest): Promise; /** * Updates the attachment properties, i.e. the non-binary data of an attachment like the filename, media-type, comment, and parent container. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. * Update attachment properties */ updateAttachmentPropertiesRaw(requestParameters: UpdateAttachmentPropertiesRequest): Promise>; /** * Updates the attachment properties, i.e. the non-binary data of an attachment like the filename, media-type, comment, and parent container. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. * Update attachment properties */ updateAttachmentProperties(requestParameters: UpdateAttachmentPropertiesRequest): Promise; } /** * @export * @enum {string} */ export declare enum CreateAttachmentsStatusEnum { Current = "current", Draft = "draft" } /** * @export * @enum {string} */ export declare enum CreateOrUpdateAttachmentsStatusEnum { Current = "current", Draft = "draft" }