Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete attachments

Velan Krishnan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 21, 2023

Hi, I have a confluence page which has lot of attachments. I need to delete all the attachments using rest api. Is there any way to achieve this?

I tried below, getting 403

curl  -u ${USER_NAME}:${USER_PASSWORD} -H 'Content-Type: application/json' -H 'Accept: application/json' -X DELETE ${CONFLUENCE_BASEURL}'/rest/api/content/'${ATTACHMENT_ID}'?status=current'

3 answers

0 votes
Stavros_Rougas_EasyApps
Atlassian Partner
March 17, 2025

If you are looking to bulk delete attachments look at our new app Attachment Manager by Easy Apps. It is one of the features.

0 votes
Rick Westbrock
Contributor
August 28, 2023

I think that authorization requires an API token instead of password. See the Basic auth for REST APIs page here: https://developer.atlassian.com/cloud/confluence/basic-auth-for-rest-apis/

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events