GET

Get attachments

Returns all attachments. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

Permissions required: Permission to view the container of the attachment.

Data Security Policy: Not exempt from app access rules
Scopes
read:attachment:confluence

Connect app scope requiredREAD

Request

Query parameters

sort

AttachmentSortOrder

cursor

string

status

array<string>

mediaType

string

filename

string

limit

integer

Responses

Returned if the requested attachments are returned.

Headers

Link

string

application/json

MultiEntityResult<Attachment>
GET/attachments
1 2 3 4 5 6 7 8 9 10 11 12 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; const response = await api.asUser().requestConfluence(route`/wiki/api/v2/attachments`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 { "results": [ { "id": "<string>", "status": "current", "title": "<string>", "createdAt": "<string>", "pageId": "<string>", "blogPostId": "<string>", "customContentId": "<string>", "mediaType": "<string>", "mediaTypeDescription": "<string>", "comment": "<string>", "fileId": "<string>", "fileSize": 28, "webuiLink": "<string>", "downloadLink": "<string>", "version": { "createdAt": "<string>", "message": "<string>", "number": 19, "minorEdit": true, "authorId": "<string>" }, "_links": { "webui": "<string>", "download": "<string>" } } ], "_links": { "next": "<string>", "base": "<string>" } }
GET

Get attachment by id

Returns a specific attachment.

Permissions required: Permission to view the attachment's container.

Data Security Policy: Not exempt from app access rules
Scopes
read:attachment:confluence

Connect app scope requiredREAD

Request

Path parameters

id

string

Required

Query parameters

version

integer

include-labels

boolean

include-properties

boolean

include-operations

boolean

include-versions

boolean

include-version

boolean

include-collaborators

boolean

Responses

Returned if the requested attachment is returned.

application/json

allOf [AttachmentSingle, object]

AttachmentSingle
object
GET/attachments/{id}
1 2 3 4 5 6 7 8 9 10 11 12 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; const response = await api.asUser().requestConfluence(route`/wiki/api/v2/attachments/{id}`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 { "id": "<string>", "status": "current", "title": "<string>", "createdAt": "<string>", "pageId": "<string>", "blogPostId": "<string>", "customContentId": "<string>", "mediaType": "<string>", "mediaTypeDescription": "<string>", "comment": "<string>", "fileId": "<string>", "fileSize": 28, "webuiLink": "<string>", "downloadLink": "<string>", "version": { "createdAt": "<string>", "message": "<string>", "number": 19, "minorEdit": true, "authorId": "<string>" }, "labels": { "results": [ { "id": "<string>", "name": "<string>", "prefix": "<string>" } ], "meta": { "hasMore": true, "cursor": "<string>" }, "_links": { "self": "<string>" } }, "properties": { "results": [ { "id": "<string>", "key": "<string>", "version": {} } ], "meta": { "hasMore": true, "cursor": "<string>" }, "_links": { "self": "<string>" } }, "operations": { "results": [ { "operation": "<string>", "targetType": "<string>" } ], "meta": { "hasMore": true, "cursor": "<string>" }, "_links": { "self": "<string>" } }, "versions": { "results": [ { "createdAt": "<string>", "message": "<string>", "number": 19, "minorEdit": true, "authorId": "<string>" } ], "meta": { "hasMore": true, "cursor": "<string>" }, "_links": { "self": "<string>" } }, "_links": { "base": "<string>" } }
DEL

Delete attachment

Delete an attachment by id.

Deleting an attachment moves the attachment to the trash, where it can be restored later. To permanently delete an attachment (or "purge" it), the endpoint must be called on a trashed attachment with the following param purge=true.

Permissions required: Permission to view the container of the attachment. Permission to delete attachments in the space. Permission to administer the space (if attempting to purge).

Data Security Policy: Not exempt from app access rules
Scopes
delete:attachment:confluence

Connect app scope requiredDELETE

Request

Path parameters

id

integer

Required

Query parameters

purge

boolean

Responses

Returned if the attachment was successfully deleted.

DEL/attachments/{id}
1 2 3 4 5 6 7 8 9 10 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; const response = await api.asUser().requestConfluence(route`/wiki/api/v2/attachments/{id}`, { method: 'DELETE' }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.text());
GET

Get attachments for blog post

Returns the attachments of specific blog post. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

Permissions required: Permission to view the content of the blog post and its corresponding space.

Data Security Policy: Not exempt from app access rules
Scopes
read:attachment:confluence

Connect app scope requiredREAD

Request

Path parameters

id

integer

Required

Query parameters

sort

AttachmentSortOrder

cursor

string

status

array<string>

mediaType

string

filename

string

limit

integer

Responses

Returned if the requested attachments are returned.

Headers

Link

string

application/json

MultiEntityResult<Attachment>
GET/blogposts/{id}/attachments
1 2 3 4 5 6 7 8 9 10 11 12 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; const response = await api.asUser().requestConfluence(route`/wiki/api/v2/blogposts/{id}/attachments`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 { "results": [ { "id": "<string>", "status": "current", "title": "<string>", "createdAt": "<string>", "pageId": "<string>", "blogPostId": "<string>", "customContentId": "<string>", "mediaType": "<string>", "mediaTypeDescription": "<string>", "comment": "<string>", "fileId": "<string>", "fileSize": 28, "webuiLink": "<string>", "downloadLink": "<string>", "version": { "createdAt": "<string>", "message": "<string>", "number": 19, "minorEdit": true, "authorId": "<string>" }, "_links": { "webui": "<string>", "download": "<string>" } } ], "_links": { "next": "<string>", "base": "<string>" } }
GET

Get attachments for custom content

Returns the attachments of specific custom content. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

Permissions required: Permission to view the content of the custom content and its corresponding space.

Data Security Policy: Not exempt from app access rules
Scopes
read:attachment:confluence

Connect app scope requiredREAD

Request

Path parameters

id

integer

Required

Query parameters

sort

AttachmentSortOrder

cursor

string

status

array<string>

mediaType

string

filename

string

limit

integer

Responses

Returned if the requested attachments are returned.

Headers

Link

string

application/json

MultiEntityResult<Attachment>
GET/custom-content/{id}/attachments
1 2 3 4 5 6 7 8 9 10 11 12 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; const response = await api.asUser().requestConfluence(route`/wiki/api/v2/custom-content/{id}/attachments`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 { "results": [ { "id": "<string>", "status": "current", "title": "<string>", "createdAt": "<string>", "pageId": "<string>", "blogPostId": "<string>", "customContentId": "<string>", "mediaType": "<string>", "mediaTypeDescription": "<string>", "comment": "<string>", "fileId": "<string>", "fileSize": 28, "webuiLink": "<string>", "downloadLink": "<string>", "version": { "createdAt": "<string>", "message": "<string>", "number": 19, "minorEdit": true, "authorId": "<string>" }, "_links": { "webui": "<string>", "download": "<string>" } } ], "_links": { "next": "<string>", "base": "<string>" } }
GET

Get attachments for label

Returns the attachments of specified label. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

Permissions required: Permission to view the attachment and its corresponding space.

Data Security Policy: Not exempt from app access rules
Scopes
read:attachment:confluence

Connect app scope requiredREAD

Request

Path parameters

id

integer

Required

Query parameters

sort

AttachmentSortOrder

cursor

string

limit

integer

Responses

Returned if the requested attachments for specified label were successfully fetched.

Headers

Link

string

application/json

MultiEntityResult<Attachment>
GET/labels/{id}/attachments
1 2 3 4 5 6 7 8 9 10 11 12 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; const response = await api.asUser().requestConfluence(route`/wiki/api/v2/labels/{id}/attachments`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 { "results": [ { "id": "<string>", "status": "current", "title": "<string>", "createdAt": "<string>", "pageId": "<string>", "blogPostId": "<string>", "customContentId": "<string>", "mediaType": "<string>", "mediaTypeDescription": "<string>", "comment": "<string>", "fileId": "<string>", "fileSize": 28, "webuiLink": "<string>", "downloadLink": "<string>", "version": { "createdAt": "<string>", "message": "<string>", "number": 19, "minorEdit": true, "authorId": "<string>" }, "_links": { "webui": "<string>", "download": "<string>" } } ], "_links": { "next": "<string>", "base": "<string>" } }
GET

Get attachments for page

Returns the attachments of specific page. The number of results is limited by the limit parameter and additional results (if available) will be available through the next URL present in the Link response header.

Permissions required: Permission to view the content of the page and its corresponding space.

Data Security Policy: Not exempt from app access rules
Scopes
read:attachment:confluence

Connect app scope requiredREAD

Request

Path parameters

id

integer

Required

Query parameters

sort

AttachmentSortOrder

cursor

string

status

array<string>

mediaType

string

filename

string

limit

integer

Responses

Returned if the requested attachments are returned.

Headers

Link

string

application/json

MultiEntityResult<Attachment>
GET/pages/{id}/attachments
1 2 3 4 5 6 7 8 9 10 11 12 // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import api, { route } from "@forge/api"; const response = await api.asUser().requestConfluence(route`/wiki/api/v2/pages/{id}/attachments`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json());
200Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 { "results": [ { "id": "<string>", "status": "current", "title": "<string>", "createdAt": "<string>", "pageId": "<string>", "blogPostId": "<string>", "customContentId": "<string>", "mediaType": "<string>", "mediaTypeDescription": "<string>", "comment": "<string>", "fileId": "<string>", "fileSize": 28, "webuiLink": "<string>", "downloadLink": "<string>", "version": { "createdAt": "<string>", "message": "<string>", "number": 19, "minorEdit": true, "authorId": "<string>" }, "_links": { "webui": "<string>", "download": "<string>" } } ], "_links": { "next": "<string>", "base": "<string>" } }

Rate this page: