Forums

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

Updating parent container of an attachment

Supreetha Upadhya April 7, 2017 edited

I'd like to update the parent container (non-binary data) of an attachment in a Confluence page using Cloud REST API and "curl" command. I looked up the REST API endpoint URL and found this: PUT /rest/api/content/{id}/child/attachment/{attachmentId}

Could somebody provide an example for a correctly constructed JSON input to achieve this? I tried the one below but it fails:

curl -v -u 'admin:xxx' -X PUT -d '{"id": “att000","title":"test.jpeg","type":"attachment","version": {"number": 2,"minorEdit": false},"container":"/rest/api/space/xxx"}' -H 'X-Atlassian-Token:xxx' -H 'Content-Type:application/json' https://xxx.atlassian.net/wiki/rest/api/space

Thank you for your time!

1 answer

0 votes
Gonchik Tsymzhitov
Community Champion
January 4, 2021

Hi! 

introduced a snippets, please checkout 

https://developer.atlassian.com/cloud/confluence/rest/intro/

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events