Updating parent container of an attachment 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!

0 answers

Suggest an answer

Log in or Join to answer
Community showcase
Louis De Jaeger
Posted Thursday in Off-topic

Friday fun: your best joke

Hi all Lets make this Friday fun really fun and post one (or more) of your best jokes! The joke can be about an Atlassian product, or just a really fun joke you want to share! I’m not the best j...

189 views 12 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot