Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

I am trying to check if an attachment already exists or not in confluence page. How to do that?

pooja1997 November 17, 2019

I want to check if an attachment exists in confluence page using rest API using attachment name. 

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 22, 2019

Hello there,

Welcome to Atlassian Community! It's nice to meet you.

You can check if an attachment exists by sending a GET request to the /rest/api/content/{id}/child/attachment endpoint:

In response you will get the list of all the attachments for the desired page and then you can scan the response in order to see if the attachment with the given name exists.

Can you give that a try and let me know if you have any trouble?

Regards,
Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events