Forums

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

User Permission

Abhishek Rana October 5, 2021

HI Team,

To push to image/file to Confluence page, what kind of permission required for the user.

 

Because  while performing the below tow steps, we are not able to see any attachments in confluence page.

 

Step:- 1

USER_NAME=<username> # the user must have the necessary permissions on the target page and space
USER_PASSWORD=<user password>
CONFLUENCE_BASE_URL=<Confluence Base URL>
ATTACHMENT_TYPE=<image | file>
ATTACHMENT_FILE_NAME=<full path to the attachment file>
PAGE_ID=<target pageid>

Step:- 2

curl -u $USER_NAME:$USER_PASSWORD \
 -X POST \
 -H "X-Atlassian-Token: nocheck" -F "file=@${ATTACHMENT_FILE_NAME}" -F "comment=File attached via REST API" \
 ${CONFLUENCE_BASE_URL}/rest/api/content/${PAGE_ID}/child/attachment 2>/dev/null \
 | jq -r '.results[].title'

 

So we are assuming that, might the user don’t  have proper access to push the image.

 

Please assit

 

 

Regards,

Abhishek

3 answers

3 accepted

0 votes
Answer accepted
Kishan Sharma
Community Champion
October 5, 2021

@Alex Medved _ConfiForms_ is right, you need "Attachments" add and "Pages" add (ie page edit) permissions in the space in order to add attachments to a page in your space.

0 votes
Answer accepted
Alex Koxaras -Relational-
Community Champion
October 5, 2021

Hi @Abhishek Rana 

What is the response code you are getting from this request?

Abhishek Rana October 5, 2021

Hi

Not getting any response.

 

Regards,

Abhishek

0 votes
Answer accepted
Alex Medved _ConfiForms_
Community Champion
October 5, 2021

Hi

As far as I know you need Create Attachment global permission and Edit Page permission

Alex

Abhishek Rana October 5, 2021

Thank you.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events